Matching coordinates on Google Maps to planetary.js - google-maps

I am looking to migrate from Google Maps to planetary.js and I need to move a bunch of markers. Does anyone know how Google Maps coordinates match to coordinates in planetary.js?
If I have a Google Maps location such as "-33.654437, 151.188164" - what does this map to in planetary.js?

Those should be latitude/longitude coordinates, and you can be converted into x/y coordinates on the planet's projection via D3's projection. The projection is exposed in Planetary.js as planet.projection.

As it seems they are the same, switching the x and y coordinate works for me.
Google / Openstreetmap: "-33.654437, 151.188164"
Planetary.js: (151.188164, -33.654437)

Related

Google Maps draw area / shape / region and export as latitude longitude

I need a Google Map with marked up areas with different colors.
GADM data
The first article I came across was this one:
https://ourcodeworld.com/articles/read/830/how-to-highlight-an-area-city-state-or-country-in-google-maps-with-javascript
It links to this service for getting coordinates:
https://gadm.org/download_country_v3.html
The problem is that there are too many points so it would end up with 3MB for an embedded map.
Google Maps draw
Then I tried Google Maps service to draw a shape. While it works, I could not find any export function to get the longitude and latitude.
https://www.google.com/maps/d/u/0/viewer?mid=1IlydZDXB-tkN8K8pAR57BRFqBOTv3c8z&ll=59.681023024095936%2C18.40997752499993&z=9
Question
How can I draw an area on a map and then get longitude and latitude for the points? On Google Maps, a tool or something else does not matter.
I solved my problem very differently. I simply used an svg file of just the country and highlighted areas there.
I used this site:
https://simplemaps.com/custom/country

Different coordinates in mapbox maps in relation with google maps?

I've changed a directory site with google maps to mapbox map, due to the payment policy of google...Everything is okay but the same coordinates of poi in google maps are in different places on mapbox maps? Why? Is there any formula to fix this issue?
Ok, it's simple....Coordinates are in reverse in both cases....
lat, long --> long, lat....

How to adjust the difference between the coordinate from openstreetMap and google map

I have downloaded the OSM from OpenstreeMap that came with all nodes from the map and their respective coordinates. Now I have to plot a node (latitude and longitude) on Google Map, but all coordinates goes in different places than it should be.
To illustrate I got the node -12.92122,-38.34991 (lat,long) on google maps and openStreetMap as you can see on screenshots.
My question is how can I adjust these values.. so I can plot the node on google maps at the same place of openStreetMap.

Coordinates from a KML file not displayed properly in Google Maps

I have a KML file and I extract the last coordinates and try to set them as a center of a Google Map but the marker is in a completely different place .
Do I have to "convert" KML coordinates into google maps coordinates ?
Thanks a lot
KML coordinates are x,y (longitude, latitude), whereas Maps uses LatLng (or y,x / latitude, longitude).
Just switch the x and y order and you should be all set.

google maps ruler

does someone know how can i add the distance ruler to my api map, or any other quick way to se the distance bwtween 2 direct points?
You could try some of the js extensions available online. For example:
http://code.google.com/p/earth-api-utility-library/source/browse/trunk/extensions/examples/ruler.html?r=41
I'm not familiar with the Google Maps API, but given latitude and longitude of any two points you can use a great circle calculation to determine the distance between them.