A button that activates an open layers Geolocate control.
Parameters:
Name |
Type |
Description |
config |
Object
|
Configuration for this object. The config supplied directly extends the control |
Extends
Members
autoActivate
Properties:
Name |
Type |
Description |
autoActivate |
boolean
|
Activate the control when it is added to a map |
bind
Properties:
Name |
Type |
Description |
bind |
boolean
|
If true, map center will be set on location update |
Properties:
Name |
Type |
Description |
buttonOptions |
Object
|
Passed to the jQuery UI button constructor |
- Inherited From:
geolocationOptions
Properties:
Name |
Type |
Description |
bind |
Object
|
Options to pass to the navigator’s geolocation API |
id
Properties:
Name |
Type |
Description |
id |
string
|
The id for this control |
- Inherited From:
locationFailedMessage
Properties:
Name |
Type |
Description |
locationFailedMessage |
string
|
The message to display if the current browser failed to get the current locationfrom the GeoLocation API |
locationUncapableMessage
Properties:
Name |
Type |
Description |
locationUncapableMessage |
string
|
The message to display if the current browser does not support the GeoLocation API |
map
Properties:
Name |
Type |
Description |
map |
OpenLayers.Map
|
The map this button will interact with |
- Inherited From:
watch
Properties:
Name |
Type |
Description |
bind |
boolean
|
If true, position will be update regularly |
Methods
Called when the button is clicked.
Gets the current location from the GeoLocation API
Parameters:
Name |
Type |
Description |
eventArgs |
Object
|
The jQuery event object |
- Overrides:
(protected) locationFailed()
Event handler for locationfailed event
(protected) locationUncapable()
Event handler for locationuncapable event
(protected) locationUpdated()
Event handler for locationupdated event
(protected) mapAfterInitHandler(eventArgs)
Event handler for mapafterinit
Parameters:
Name |
Type |
Description |
eventArgs |
Object
|
The event arguments |
- Inherited From: