stuff related to maps
Client to receive coordinates from a webservice. Plugins implemented:
- Y!Boss (Yahoo)
- Nominatim (OSM)
Usage
use Geo\Coder\Plugin;
$geocoder = new \Geo\Coder(
new Nominatim( array(
'requestURI' => 'http://nominatim.openstreetmap.org/search',
'i118n' => 'en'
))
);
$result = self::$geocoder->fetchCoords(
'Muellerstr. 40, 80469 München',
Coder::PRECISION_HIGH
);
$result->getLat();
$result->getLon();
// etc.
degreesToPixels lat/lng to pixels on a map
Usage
$mapProjection = new \Geo\Projection();
$pixelCoordinates = $mapProjection->degreesToPixels( $latitude, $longitude, $mapWidth, $mapHeight );
# composer install
php drawPointsOnMap.php
requires
- php >= 5.3.2
- php-gd (optionally compiled with freetype support)