Skip to content

Instantly share code, notes, and snippets.

@davidlevy
davidlevy / convertGeoToPixel.php
Created July 1, 2013 07:32
Function to convert Geo coordinates To Pixels
<?php
function convertGeoToPixel($lat, $lon){
$mapWidth = 400;
$mapHeight = 260;
$mapLonLeft = -180;
$mapLonRight = 180;
$mapLonDelta = $mapLonRight - $mapLonLeft;