Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How to best display HTML5 geolocation accuracy on a Google Map?
To display HTML5 geolocation accuracy on a Google Map, use the following code −
var lat = position.coords.latitude;
var longitude = position.coords.longitude;
var accuracy = position.coords.accuracy;
var center = new google.maps.LatLng(lat, longitude);
var a = new google.maps.Marker({
position: center
map:
icon:
});
var mySphere = new google.maps.Circle({
center: centerPosition,
radius: accuracy,
map:
fillColor:
fillOpacity:
strokeColor:
strokeOpacity:
});
map.fitBounds(mySphere.getBounds()); Advertisements
