C# 클래스 Engage.Dnn.Locator.Maps.MapProvider

An abstract base class for map providers, including the ability to display maps in HTML and JavaScript, and the ability to geocode locations.
파일 보기 프로젝트 열기: EngageSoftware/Engage-Locator

공개 메소드들

메소드 설명
CreateInstance ( MapProviderType providerType, string apiKey ) : MapProvider

Creates a concrete instance of a MapProvider with the given providerType.

CreateInstance ( string className, string apiKey ) : MapProvider

Creates a concrete instance of a MapProvider with the given className.

GenerateMapScriptCore ( ScriptManager scriptManager, MapType mapType, string mapSectionId, string currentLocationSpanId, string noLocationSpanId, string instructionSpanId, string directionsLinkId, string directionsSectionId, LocationCollection locations, bool showAllLocationsOnLoad ) : void

Registers the JavaScript to display the map.

GeocodeLocation ( string street, string city, int regionId, string zip, int countryId ) : GeocodeResult

Gets the latitude and longitude of the given location.

IsKeyValid ( ) : bool

Determines whether this provider's is in a valid format.

RegisterMapScript ( ScriptManager scriptManager, MapType mapType, string mapSectionId, string currentLocationSpanId, string noLocationSpanId, string instructionSpanId, string directionsLinkId, string directionsSectionId, LocationCollection locations, bool showAllLocationsOnLoad ) : void

Registers the JavaScript to display the map.

보호된 메소드들

메소드 설명
GetElementJavaScript ( string elementId ) : string

Returns the JavaScript to select the element with the given ID.

GetRegionAbbreviation ( int regionId ) : string

Gets the abbreviation for the region with the given ID.

메소드 상세

CreateInstance() 공개 정적인 메소드

Creates a concrete instance of a MapProvider with the given providerType.
public static CreateInstance ( MapProviderType providerType, string apiKey ) : MapProvider
providerType MapProviderType Type of the map provider.
apiKey string The API key for this provider.
리턴 MapProvider

CreateInstance() 공개 정적인 메소드

Creates a concrete instance of a MapProvider with the given className.
public static CreateInstance ( string className, string apiKey ) : MapProvider
className string The fully qualified name of the type to instantiate.
apiKey string The API key for this provider.
리턴 MapProvider

GenerateMapScriptCore() 공개 추상적인 메소드

Registers the JavaScript to display the map.
public abstract GenerateMapScriptCore ( ScriptManager scriptManager, MapType mapType, string mapSectionId, string currentLocationSpanId, string noLocationSpanId, string instructionSpanId, string directionsLinkId, string directionsSectionId, LocationCollection locations, bool showAllLocationsOnLoad ) : void
scriptManager ScriptManager The page's script manager.
mapType MapType Type of the map.
mapSectionId string The ID of the section (div) on the page in which the map should be created.
currentLocationSpanId string The ID of the span showing the current location text.
noLocationSpanId string The ID of the span shown when no location is selected.
instructionSpanId string The ID of the span with driving directions, etc.
directionsLinkId string The ID of the link to driving directions.
directionsSectionId string The ID of the section (div) with driving directions text.
locations LocationCollection The list of locations to display.
showAllLocationsOnLoad bool if set to true shows the map with all locations on it by default.
리턴 void

GeocodeLocation() 공개 추상적인 메소드

Gets the latitude and longitude of the given location.
public abstract GeocodeLocation ( string street, string city, int regionId, string zip, int countryId ) : GeocodeResult
street string The street of the address.
city string The city of the address.
regionId int The ID of the region of the address.
zip string The zip code of the address.
countryId int The ID of the country of the address
리턴 GeocodeResult

GetElementJavaScript() 보호된 정적인 메소드

Returns the JavaScript to select the element with the given ID.
protected static GetElementJavaScript ( string elementId ) : string
elementId string The ID of the element to get.
리턴 string

GetRegionAbbreviation() 보호된 정적인 메소드

Gets the abbreviation for the region with the given ID.
protected static GetRegionAbbreviation ( int regionId ) : string
regionId int The region id.
리턴 string

IsKeyValid() 공개 추상적인 메소드

Determines whether this provider's is in a valid format.
public abstract IsKeyValid ( ) : bool
리턴 bool

RegisterMapScript() 공개 메소드

Registers the JavaScript to display the map.
public RegisterMapScript ( ScriptManager scriptManager, MapType mapType, string mapSectionId, string currentLocationSpanId, string noLocationSpanId, string instructionSpanId, string directionsLinkId, string directionsSectionId, LocationCollection locations, bool showAllLocationsOnLoad ) : void
scriptManager ScriptManager The page's script manager.
mapType MapType Type of the map.
mapSectionId string The ID of the section (div) on the page in which the map should be created.
currentLocationSpanId string The ID of the span showing the current location text.
noLocationSpanId string The ID of the span shown when no location is selected.
instructionSpanId string The ID of the span with driving directions, etc.
directionsLinkId string The ID of the link to driving directions.
directionsSectionId string The ID of the section (div) with driving directions text.
locations LocationCollection The list of locations to display.
showAllLocationsOnLoad bool if set to true shows the map with all locations on it by default.
리턴 void