getCoords parameter
Hi , i am new for vector map. i want to design new custom map and i also i created to svg map but i don't know how to use getcoords() function for projections.please explain function parameter x1,x2,y1,y2 it's map width or height or latitude and longitude value for google map?. please guide me how to get lat,long coordinate values from google map. thanks for your updates
Hi @subbuweb ,
Did you take a look at the tutorial https://www.vincentbroute.fr/mapael/create-map.php ? For the getCoords() function, you can use this tool : https://www.vincentbroute.fr/mapael/getcoords.php to resolve your equation, be careful, it works only if your map is equirectangular.
In order to find x1,x2,y1 and y2 coordinates values easily, you can use this tool with your map : https://www.vincentbroute.fr/mapael/try.html (the x, y info are displayed at the top of the map).
x1 => The x coordinate of a point far at the west of the map long1 => The related longitude of the same previous point (you can use google maps to find it, as explained in the tutorial)
x2 => The x coordinate of a point far at the east of the map long2 => The related longitude of the same previous point
y1 => The x coordinate of a point far at the north of the map lat1 => The related latitude of the same previous point
y2 => The y coordinate of a point far at the south of the map lat2 => The related latitude of the same previous point
I hope it will help you !
Hi, Special thanks for your quick reply.i can't understand what is The x coordinate of a point far at the west of the map it is mean latitude point or what is it? please give me some examples how to take x1,x2,y1,y2 points. i need this area https://www.google.co.in/maps/place/Iyer+Bungalow,+Madurai,+Tamil+Nadu/@9.9677495,78.1261277,15z/data=!3m1!4b1!4m5!3m4!1s0x3b00c66d76f00403:0xedba6ceae83033f7!8m2!3d9.9670301!4d78.1343516 please explain how to take points (x1,x2,y1,y2) from this area. thanks
Hi @subbuweb ,
The latitude is a geographic coordinate that specifies the north–south position of a point on the Earth's surface. The longitude is a geographic coordinate that specifies the east-west position of a point on the Earth's surface.
So the x1, x2 coordinates have to match with the related longitudes (horizontal coordinates). y1, y2 coordinates have to match with the related latitude (vertical coordinates).
All is explained within the tutorial : https://www.vincentbroute.fr/mapael/create-map.php . It's a matter of finding four extreme point on your map, and get the coordinates for these points on the mapael map (x,y, through the online dedicated tool), and the latitudes an,d longitudes of these points (through google maps for instance). Then, the tool https://www.vincentbroute.fr/mapael/getcoords.php will help you to solve the equation and will output the getCoords() function. This function allows to translate any latitude,longitude that belong to the area covered by your map into x,y coordinates, in order to plot cities, etc.