Comments (7)
Hello ! I'm glad you appreciate jQuery Mapael.
I'm currently working on a tutorial for creating maps for jQuery mapael. It will be available very soon, with the release of mapael 1.0.0 ! Here is the part regarding the getCoords() function :
"If you want to go further with your map, you may want plot cities by latitude and longitude on it. We assume that the projection of your map is an equirectangular one.
With this projection, the algorithm to convert a latitude and a longitude to x and y coordinates is as simple as that :
x = xFactor + latitude + xOffset
y = yFactor * longitude + yOffset
You just have to found the proper values for xFactor, yFactor, xOffset and yoffset in order to be able to plot cities by latitude and longitude on your map.
To get the values of xFactor and xOffset, you just have to resolve an equation with two unknowns. Plot two points at the max left and the max right of your map with x and y coordinates. Go to Google Map in order to find the matching latitudes for these two points (Right clic > More info about this place on Google map) .
You can now find the values for xFactor and xOffset by resolving this equation (tedious way, there is a tool for that, see below ;-) ) :
x1 = xFactor + latitude1 + xOffset
x2 = xFactor + latitude2 + xOffset
Then, you have to do exactly the same thing to get the values of yFactor and yOffset.
You can use the getCoords() generator tool that will resolve equations and generate the getCoords() method for you !"
The getCoords() generator is available here : http://www.neveldo.fr/mapael/getcoords.php .
I hope it will help you !
from jquery-mapael.
Thank you very much for your quick answer!
It's great that you've created automatic coordinates calculator! Thank you for thinking of users!
from jquery-mapael.
You are welcome :) Feel free to contribute to 'mapael-maps' repository (https://github.com/neveldo/mapael-maps) by adding your brand new map !
from jquery-mapael.
Of course I will contribute the new my to the mapael's repository after finishing it. It's a map of Commonwealth of Independent States. Neveldo, thank You very much!
from jquery-mapael.
Hi Neveldo,
I am using this for one of my project. but i am confusing in Coordinates system that is How we can calculate X1, Y1??
Thanks
from jquery-mapael.
Hi,
All the steps are explained in this tutorial : http://www.vincentbroute.fr/mapael/create-map.php , did you check it ?
from jquery-mapael.
Thread close. Open a new thread if you have another issue.
from jquery-mapael.
Related Issues (20)
- How to get zoom level when you click zoom buttons or mousewheel
- GetCoords function not working properly, what I'm doing wrong?
- How does Event afterZoom works?
- multiple_legends_plotted_cities.html with just one state (Maine)
- Map of a Mexico state divided in munipies
- change the map into dotted map.
- Resize the Map by Inkscape
- How to change color of all areas in a row in jquery HOT 1
- getCoord HOT 2
- attrs text-anchor HOT 2
- Allow click in tooltip content HOT 3
- GetCoords and Mercator Projection ? HOT 2
- dynamic value for areas
- Mouseover issues
- Overflow in horizontal legends
- zoom in mousewheele
- mobile hover problem
- Hongkong and Singapore is not shown in world map.
- French Guiana !== France
- My Map is Coming upside down
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery-mapael.