Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var image = 'https://cdn6.aptoide.com/imgs/e/d/1/ed1671f920af9021ed52b80f00460f91_icon.png?w=50'; //image icone
- // Ta position géographique
- navigator.geolocation.getCurrentPosition(function(position){
- var pos = {
- lat: position.coords.latitude,
- lng: position.coords.longitude
- };
- // Le marker pour ta position
- var geoPositionMarker = new google.maps.Marker({
- position: pos, // ton objet pos de geolocation
- animation: google.maps.Animation.DROP, // petit animation oklm
- map: map, // ton instance de map
- icon: image // ton image icone
- });
- map.setCenter(pos); // centrage sur ta pos
- })
Add Comment
Please, Sign In to add comment