-1

I have been trying to make a google maps center on someones location when the press a button using html5 geolocation. But i dont know how it works and i have too many other things to focus on so it would be really nice if someone could tell me.

theAlex
  • 48
  • 6
  • 1
    I wouldn't want to waste your precious time reading my answer when you don't have any time. Counter proposal, will you write my answer? cause i don't have the time! – Brunis Aug 02 '14 at 13:05

1 Answers1

-1

Here is an example from google

https://developers.google.com/maps/documentation/javascript/examples/map-geolocation

Ties
  • 5,726
  • 3
  • 28
  • 37
  • Thanks for the link but now it says "SyntaxError: missing ) after argument list" and dose not work. The code i have is `function initialize() { if(navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); } var mapOptions = { center: pos, //new google.maps.LatLng(51.762841,-2.2454), zoom: 6, mapTypeId: google.maps.MapTypeId.HYBRID };)} ` – theAlex Aug 02 '14 at 14:03
  • I can't work with this, I'm sorry. You can always hire people to do it for you... – Ties Aug 02 '14 at 14:11
  • thanks a lot anyway you pointed me in the right direction – theAlex Aug 02 '14 at 14:16