-
Notifications
You must be signed in to change notification settings - Fork 20
Get User Location using HTML5 Geolocation
objectivehtml edited this page Sep 6, 2014
·
1 revision
Getting a user's current location and displaying it on the map is pretty simple. You have some additional options from what is shown in this example, but this will get you started. Simply instantiate the map and use the currentLocation
tag with your map's id.
{% set options = {
id: 'map',
width: '400px',
height: '300px',
options: {
disableDoubleClickZoom: true,
maxZoom: 10
}
} %}
{{ craft.googleMaps.map(options) }}
{{ craft.googleMaps.currentLocation('map') }}