Showing geographic location on a world map of a user
问题 I'm trying to make a simple script that takes lon/lat as an argument and places an dot on a word map image, simple. <?php if(empty($long))$long = 56.946536; if(empty($lat)) $lat = 24.10485; $im = imagecreatefromjpeg("earth_310.jpg"); $red = imagecolorallocate ($im, 255,0,0); $scale_x = imagesx($im); $scale_y = imagesy($im); $pt = getlocationcoords($lat, $long, $scale_x, $scale_y); imagefilledrectangle($im,$pt["x"]-2,$pt["y"]-2,$pt["x"]+2,$pt["y"]+2,$red); header("Content-Type: image/png");