Get exact geo coordinates along an entire route, Google Maps or OpenStreetMap

OSRM gives you routes with road geometries as they are in the OpenStreetMap database. For example, you can get the route as GPX (and post-process this file if you want). This would look like the following: GET http://router.project-osrm.org/viaroute?hl=en&loc=47.064970,15.458470&loc=47.071100,15.476760&output=gpx Read more: OSRM API docs.

Find center of multiple locations in Google Maps

First you can create a LatLngBounds object by including all the dynamically generated locations. Use the extend method to include the points. Then you can get the center of the bound using the getCenter method. UPDATE: Code: var bound = new google.maps.LatLngBounds(); for (i = 0; i < locations.length; i++) { bound.extend( new google.maps.LatLng(locations[i][2], locations[i][3]) …

Read more

Decoding the Google Maps embedded parameters

This intermediate is not the final answer, and the sequel follows)), just some thoughts Undocumented method. (with ftid instead of place_id parameter) Places API Web Service No warranty in future: https://maps.googleapis.com/maps/api/place/details/json?key=YOUR_API_KEY&ftid=0xd62377123a70817:0x85e89b65fcf7c648& The documented request is: https://maps.googleapis.com/maps/api/place/details/json?key=YOUR_API_KEY&placeid=ChIJFwinI3E3Yg0RSMb3_GWb6IU Need API KEY for this requests Setting up API keys Answer from Google: (JSON – light parsing) { “html_attributions”: …

Read more

Google Map API – Removing Markers

You need to keep an array of the google.maps.Marker objects to hide (or remove or run other operations on them). In the global scope: var gmarkers = []; Then push the markers on that array as you create them: var marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i].latitude, locations[i].longitude), title: locations[i].title, icon: icon, map:map }); // …

Read more

Google Map icons with VisualRefresh [closed]

I don’t have an official list, but did do some research. https://mt.google.com/vt/icon/text=A&psize=16&font=fonts/arialuni_t.ttf&color=ff330000&name=icons/spotlight/spotlight-waypoint-b.png&ax=44&ay=48&scale=1 Use that URL and you can easily change the text, size,font and color to your preference, however the color parameter will only change the color of the text. but if you change waypoint-b.png to waypoint-a.png you get a green marker. Icon list: Markers: …

Read more