Skip to content

alafgani1000/Nearer-marker-to-given-location

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Nearer-marker-to-given-location

  1. Add the places that you want in location array. i.e. add lat, long.
    e.g. var locations = [ ['Viman Nagar',18.574674, 73.912417, 1], ['Pimpari Chinchwad',18.630026, 73.803868, 2], ['Hinjewadi',18.592884, 73.741360, 3], ['Kothrud',18.507608, 73.795669,4], ['Kondwa',18.470501, 73.891788,5]
    ];

  1. Add lat and long for area locality.
    e.g.function initialize() { var haightAshbury = new google.maps.LatLng(18.596815, 73.763575); // Locality Area var mapOptions = { zoom: 12, center: haightAshbury, mapTypeId: google.maps.MapTypeId.TERRAIN };

  1. Add your API Key in following url.
    <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initialize"> </script>

  1. To find your api key goto following url:
    https://developers.google.com/maps/documentation/embed/get-api-key

5. When you click on map it will alert nearer location to click.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages