Hi Artur, Your d="M462..." string is basically a set of instructions to move a virtual "pen" to draw a series of straight-line sections to make up a polygon. The "M" and "L" parts of the string are commands which tell the "pen" where to go and what to do; so
M462 399 instructs the "pen" to Move to the point (462, 399), and L454 405 instructs the "pen" to draw a straight Line from the previous point (462, 399) to the point (454, 405), and so on, until the "z" command tells the system to close the path. For more information on those commands see e.g. SVG Paths <https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths> So, you will note that the coordinates given ((462, 399), (454, 405), etc.) are all simple integer values which represent (I'm guessing here) pixel coordinates in the "leaflet-interactive" component where you got the code you posted. In other words, these integer values IN NO WAY represent lat/long coordinates, and so - unless you can convert somehow between pixels-to-lat/long values in the original (Leaflet?) component - you will not be able to use the values in your string to create a polygon at the correct position in the map using the Google maps API. Best regards, Rob On Thursday, 7 December 2017 11:20:48 UTC+1, artur....@gmail.com wrote: > > Good day. > Have an interesting task: to convert coordinates of poligons from map here > to LatLng format in order to use in google maps API. > "Digging" the code of that map I discovered strings like > <path class="leaflet-interactive" stroke="black" stroke-opacity="1" > stroke-width="3" stroke-linecap="round" stroke-linejoin="round" > stroke-dasharray="0" fill="#ffff00" fill-opacity="0.3" fill-rule="evenodd" > d="M462 399L454 405L454 408L451 406L452 409L445 414L445 418L448 417L448 > 419L451 418L453 420L457 418L466 418L467 413L469 411L467 411L465 407L460 > 407L463 402L462 400z"> > > > So I am assuming, that > d="M462 399L454 405L454 408L451 406L452 409L445 414L445 418L448 417L448 > 419L451 418L453 420L457 418L466 418L467 413L469 411L467 411L465 407L460 > 407L463 402L462 400z" > > > is coordinates to convert. > > BUT > I have no idea how to convert it into LatLng format. > Does anyone has any suggestions? > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-maps-js-api-v3+unsubscr...@googlegroups.com. To post to this group, send email to google-maps-js-api-v3@googlegroups.com. Visit this group at https://groups.google.com/group/google-maps-js-api-v3. For more options, visit https://groups.google.com/d/optout.