0

I was wondering if someone could help me out on where to start. I have an accurate (2d) map of the Netherlands as an svg. The idea is to create a PHP function that puts a dot on the map based on Longitude & Latitude input and return it to accurate pixels coordinates (x, y). It all has to be based on the country (a part of the world) and not the whole world.

I have gathered the following information:

$img_width_px = 612.54211; // Width in pixels from image
$img_height_px = 723.61865; // Height in pixels from image

$N = 53.560406; //Latitude at top edge of map, in decimal degrees
$E = 7.227496; //Longitude at right edge of map, in decimal degrees
$S = 50.750938; //Latitude at bottom edge of map, in decimal degrees
$W = 3.359403; //Longitude at left edge of map, in decimal degrees

//top-left reference point
$p0_lat = 53.560406; 
$p0_lng = 3.359403;

//bottom-right reference point
$p1_lat = 50.750938; 
$p1_lng = 7.227496;

$radius = 6371; //Earth Radius in Km

function converter($lat, $lng) {

}

It's a personal project and I really love learning some new stuff. Every tip is much appreciated on how to make progress <3.

Devi
  • 41
  • 9
  • This question has some great answers: https://stackoverflow.com/questions/16266809/convert-from-latitude-longitude-to-x-y – Jacob Mulquin Oct 30 '21 at 22:59

0 Answers0