I want to convert (google sourced) longitude and latitude coordinates to x and y to place points on a SVG map
I can get the longitude converted to X but I can't nail latitude.
- red dots = place holders
- green dot = calculated position from longitude/latitude
I have read so much about Mercator projections and other projection system API's I am now completely confused. I also followed Proj4JS library threads but couldn't find an example that was close to my task.
I attempted to emulate @Raphael Wichmann and @betamax solution, unfortunately I got something wrong.
Could someone please have a look at my jsfiddle and see if it's an obvious mistake?
b.ylat change to
265 it covers my left red dot place holder nearly perfectly.
I think I'm close, any help would be really appreciated.
Note: the longitude/latitude bounds I used for my SVG map are best guesstimates, worked surprisingly well for the longitude calculation.
Original SVG from here.