Class Qww.Ctls.Map.GoogleMapsProvider
JavaScript class to provide google maps functionality for the Qww.Ctls.Map.Mgr.
Defined in: <JavaScript\QWW\GoogleMapsProvider.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Constructs a new Qww.Ctls.Map.GoogleMapsProvider instance.
|
| Method Attributes | Method Name and Description |
|---|---|
|
AddMarker(marker)
Adds a marker to the map control created by the CreateMarker method.
|
|
|
AttachOnChangeViewHandler(handler)
Attaches an event to the view change event of the underlying concrete map control.
|
|
|
AttachOnMarkerClickedHandler(handler)
Attaches an event to the marker/pin click event of the underlying concrete map control.
|
|
|
ContainsLatLong(lat, lon)
Method to call to position the underlying map control.
|
|
|
CreateMarker(lat, lon, obj)
Method to call to create a pin/marker for the map.
|
|
|
Method to call to get the centre and zoom of the map.
|
|
|
GetMap(elementId)
Returns a reference to the map control.
|
|
|
GetView()
Method to call to get the bounding rectangle for the map.
|
|
|
Initialise(elementId)
Initialises the map control and returns a reference to it.
|
|
|
Method to call to remove all pins/markers from the map.
|
|
|
SetCentreAndZoom(lat, lon, zoom)
Method to call to position the underlying map control.
|
|
|
SetMapStyle(style)
Sets the style for the map control.
|
|
|
SetView(bounds, maximumZoomLevel)
Method to call to set the bounding rectangle for the map.
|
|
|
UpdateMarkerIcon(marker, icon)
Updates the icon for a marker which has already been added to the map.
|
Class Detail
Qww.Ctls.Map.GoogleMapsProvider()
Constructs a new Qww.Ctls.Map.GoogleMapsProvider instance.
Method Detail
AddMarker(marker)
Adds a marker to the map control created by the CreateMarker method.
You should implement this if you are developing your own Mapping Provider.
- Parameters:
- marker
- Marker object. As created by the CreateMarkerMethod.
AttachOnChangeViewHandler(handler)
Attaches an event to the view change event of the underlying concrete map control.
You should implement this if you are developing your own Mapping Provider.
- Parameters:
- {Function} handler
- Function to call when the map view changes.
AttachOnMarkerClickedHandler(handler)
Attaches an event to the marker/pin click event of the underlying concrete map control.
You should implement this if you are developing your own Mapping Provider.
- Parameters:
- {Function} handler
- Function to call when the marker/pin is clicked.
{Bool}
ContainsLatLong(lat, lon)
Method to call to position the underlying map control.
You should implement this if you are developing your own Mapping Provider AND the map 'wraps' (e.g. google maps).
- Parameters:
- {Number} lat
- Latitude to check against.
- {Number} lon
- Longitude to check against.
- Returns:
- {Bool} True of the lat, long point is contained within the currently visible map bounds. False otherwise.
{GMarker}
CreateMarker(lat, lon, obj)
Method to call to create a pin/marker for the map.
You should implement this if you are developing your own Mapping Provider.
- Parameters:
- {Number} lat
- Latitude to place pin at.
- {Number} lon
- Longitude to place pin at.
- {Object} obj
- Object containing additional information for pin. This is the object which is returned by the .OnCreateMapObject handler on the Qww.Ctls.Map.Mgr object.
- {String} obj.Title Optional
- Title for the map pin.
- {String} obj.Description Optional
- Description for the map pin. Can contain html.
- {String} obj.Icon Optional
- Path to icon to use for the map pin.
- {GIcon} obj.GoogleIcon Optional
- Actual GIcon to use for the map pin.
- {Function} obj.OnGetZIndex Optional
- Function which returns whether this marker should be placed above or below another one. See documentation on zIndexProcess for more information on this.
- Returns:
- {GMarker} Returns the GMarker instance representing the pin.
{Object}
GetCentreAndZoom()
Method to call to get the centre and zoom of the map.
You should implement this if you are developing your own Mapping Provider.
- Returns:
- {Object} Should return an object with .Zoom, .Latitude and .Longitude properties.
{GMap2}
GetMap(elementId)
Returns a reference to the map control.
You should implement this if you are developing your own Mapping Provider.
- Parameters:
- {String} elementId
- ID of html element to show the map control in.
- Returns:
- {GMap2} Reference to the google map control.
{Object}
GetView()
Method to call to get the bounding rectangle for the map.
You should implement this if you are developing your own Mapping Provider.
- Returns:
- {Object} Should return an object containing .Left, .Right, .Top and .Bottom properties.
{GMap2}
Initialise(elementId)
Initialises the map control and returns a reference to it.
You should implement this if you are developing your own Mapping Provider.
- Parameters:
- {String} elementId
- ID of html element to show the map control in.
- Returns:
- {GMap2} Reference to the google map control.
RemoveAllMarkers()
Method to call to remove all pins/markers from the map.
You should implement this if you are developing your own Mapping Provider.
SetCentreAndZoom(lat, lon, zoom)
Method to call to position the underlying map control.
You should implement this if you are developing your own Mapping Provider.
- Parameters:
- {Number} lat
- Latitude to centre the map on.
- {Number} lon
- Longitude to centre the map on.
- {Int} zoom
- Zoom level to set the map to.
SetMapStyle(style)
Sets the style for the map control.
- Parameters:
- {String} style
- Style for map (hybrid, satellite, default).
SetView(bounds, maximumZoomLevel)
Method to call to set the bounding rectangle for the map.
You should implement this if you are developing your own Mapping Provider.
- Parameters:
- {Object} bounds
- Object containing the bounds of the zoom.
- {Number} bounds.Left
- Left longitude of the bounding box.
- {Number} bounds.Right
- Right longitude of the bounding box.
- {Number} bounds.Top
- Top latitude of the bounding box.
- {Number} bounds.Bottom
- Bottom latitude of the bounding box.
- {Number} maximumZoomLevel Optional
- Maximum zoom level which the map can be set to.
UpdateMarkerIcon(marker, icon)
Updates the icon for a marker which has already been added to the map.
You should implement this if you are developing your own Mapping Provider.
- Parameters:
- marker
- Marker to update.
- {String} icon
- Path to new icon image.
