Get latitude and longitude points in Google Maps polyline - google-maps

I want to draw Polylines with the Google Maps JavaScript API. Is there a tool that will help me get the latitude and longitude points by just clicking on the map, then exporting an array of lat-long pairs?
I imagine something like the personalized maps service (My Places) in Google Maps where you can click-snap on the roads to specify your own driving directions. I'd like to take that one step further. That is, to export an array of lat-long pairs that specify the roads traveled.

I know this answer might be a little late but today I was trying to figure out what I believe to be the same issue as this question. So, you can draw the points on the map then get that encoded polyline with Google's Interactive Polyline Encoder Utility then I recommend using Mapbox polyline utility to convert the overview_polyline to latitude and longitude pairs values. The latitude and longitude pairs are also on Googles Utility but it is a bit of a hassle to continuously copy each coordinate.
For more information about the Mapbox Polyline Utility process:
http://zevross.com/blog/2014/09/23/convert-google-directions-to-geojson-points-or-polylines/
And here is Google's Encoder Utility:
https://developers.google.com/maps/documentation/utilities/polylineutility

You can use the Drawing Tools library:
http://code.google.com/apis/maps/documentation/javascript/overlays.html#drawing_tools
which will give you an encoded polyline. You can use that to draw a line, or you can decode it to get the specific points using the geometry library:
http://code.google.com/apis/maps/documentation/javascript/geometry.html

Related

Converting coordinates to Google Maps

I want to find where the following coordinates fall on Google Maps.
I know Google Maps works in WGS 84 Standard, however, I can't figure out in what standard this coordinates works. Been helplessly looking the internet but I can't find a reliable source:
<EPSGCode>32636</EPSGCode>
<Eastings>750400</Eastings>
<Northings>3000500</Northings>
Any idea how to convert those to WGS 84? Thanks
Global Coordinate Converter by Reality GIS can be found Here
<EPSGCode>32636</EPSGCode>
<Eastings>750400</Eastings>
<Northings>3000500</Northings>
gives latitude 27.1042722 and logitude 35.5256594

How to Get Google My Maps Location Pins in Latitude and Longitude

I have created a custom map via http://www.google.com/mymaps/ and have added a few locations.
Is there a way for me to retrieve these locations (in lat and lng format) via Google Map Javascript API?
First you will need to export your map as a KML layer. To see how to do that, you can read about it here.
After that, you will need to import your KML layer to Google Maps. Here is an example.
Then you can use KML Feature Details and use position to get lat/long

How to draw route using lat long coordinates without reverse geocoding?

I would like to plot route between 2 points using lat long coordinates using Google maps direction service. I have to plot many routes in a single map. I have heard some where that it takes time for reverse geocoding and also there is a limit for it. Is it possible to do it without reverse geocoding the coordinates?
If you already got the coordinates then you can just use LeafLet or OpenLayers to display them on a map. This doesn't involve Google Maps at all and you can also directy display a GPX file if you like to.

How are markers added to a map (Google JS api, Leaflet, or Mapbox)?

I am playing around with the Google Maps JS API, Mapbox API and I was curious, how are markers actually added to a map? Does the backend code take a set of map tiles, convert the edges to lat/long, and then simply interpolate the lat/long of the marker coordinates along the X and Y axes?
I ask because I am building an application that would need 1000-5000 simultaneous markers, and want to build my own backend system as using the Google Fusion Tables API can get expensive.
how are markers actually added to a map
In the simplest implementation, markers are represented as GeoJSON or similar, and requested from the server, and then 'projected' into screen coordinates from lat/lon; see node-sphericalmercator for one example of that logic.
For the 'performant' case, like TileMill or Google's pre-rendering mode, markers are baked into raster tiles, PNG files, that show them and their locations, and you do magic like UTFGrid to do interaction.
Note that both of these are compromises: you can get speed, flexibility, and simplicity, but it's very hard to get all at the same time.

Google Static Map

I need to use Google Static Map api, but I need to give it from (latitude, longitude) to (latitude, longitude) and show maps between those two places
can anyone support in this part please
I'm using this code this get map of one place
http://maps.google.com/staticmap?center=30.0566,31.2262&format=png32&zoom=10&size=360x602
but I want to get the map between two places
from : 30.0566,31.2262
to : 25.6969,32.6422
Thanks in Advance
Google Static Maps does not support driving directions. However it does support drawing lines, including encoded polylines. Everything is subject to the maximum length of a URL (2048 characters).
This means you can use the Directions API server-side, extract the encoded polyline from the results and construct the Static Maps URL using the line.
Documentation for the Directions API