My Location Control for Google Maps API v3

Apr 13
2016

My Location Control for Google Maps API v3

Tags | osgeo, maptiler, google

We have made a Google Maps API v3 component, which anybody can use in custom projects to add a control showing current geolocation with just one line of code:

var geoloccontrol = new klokantech.GeolocationControl(map, mapMaxZoom);

after including in the HTML header this JavaScript:

<script src="https://cdn.klokantech.com/maptilerlayer/v1/index.js"></script>

See: http://www.maptiler.com/maptilerlayer/

for an example code and documentation.

It adds the standard control to the map - and once tapped - it shows the blue circle around your location with size derived from precision of the location data available. If you don’t drag the map it will keep you positioned once you move.

This control has been developed for viewer automatically generated by http://www.maptiler.com/ software - which creates tiles for map overlays and custom layers made from images and raster geodata.

Author | Petr Pridal Published | 2016-04-13

Share | 

Labels

maps 18

javascript 12

google 11

presentations 20

osgeo 46

maptiler 38

gdal 6

labs 8

open-source 25

openlayers 7

oldmapsonline 12

iipimage 7

customers 23

georeferencer 23

webglearth 4

awards 7

projects 7

omeka 3

tileserver 9

iiif 3

docker 3

vector tiles 9

openstreetmap 9

openmaptiles 9

RSS

Blog posts

MapTiler posts

Georeferencer posts

OpenStreetMap posts

OSGEO posts

Archive

2018 6

2017 12

2016 14

2015 11

2014 19

2013 16

2012 10

2011 9

2010 8

2009 3

2008 9

Admin