Recommend this page to a friend! |
Download .zip |
Info | Example | Demos | View files (4) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2021-01-28 (1 month ago) | Not enough user ratings | Total: 157 | All time: 8,820 This week: 375 |
Version | License | PHP version | Categories | |||
ah-map-helper 1.0 | GNU General Publi... | 5 | PHP 5, Geography, Parsers |
------------------------------------------------------------------------------- ahmaphelper map position helper (Php class) This helper class can parse urls of a map services Google maps, Openstreetmap and Yandex. It fetches the position longitude and latitude from an url. It generates urls with the same position with other map services. Licence GPL 3.0 author: Axel Hahn https://www.axel-hahn.de see DEMO https://www.axel-hahn.de/demos/maphelper/ DOCS https://www.axel-hahn.de/docs/ahmaphelper/index.htm ------------------------------------------------------------------------------- 2016-04-17 1.0 first public release 2016-05-25 1.1 added options minzoom; new methods getUrls() + fixPosition() 2017-01-15 1.2 added support for regional maps (provider map1eu) ------------------------------------------------------------------------------- USAGE: require_once 'ahmaphelper.class.php'; $oMaphelper = new ahmaphelper(); (1) get a position from url: go to a map provider: https://www.google.ch/maps http://www.openstreetmap.org/ https://yandex.ru/maps/ Zoom in, go to any position and copy the url $aPos = $oMaphelper->getPos($sUrl); (2) generate urls with the same position print_r($oMaphelper->getUrls()); (3) fix position data to be compatible to all map providers. print_r($oMaphelper->fixPosition()); print_r($oMaphelper->getUrls()); (4) manually generate links with position data and zoom level (returns an array): print_r($oMaphelper->generateUrls($aPos['lat'], $aPos['lon'], $aPos['zoom'])); (5) manually generate link with position data and zoom level to a given provider (returns a string): echo $oMaphelper->generateUrl([provider], $aPos['lat'], $aPos['lon'], $aPos['zoom']); echo $oMaphelper->generateUrls("google", $aPos['lat'], $aPos['lon'], $aPos['zoom']); (6) helper functions: generate url with the same position to a specific provider $oMaphelper->getProviders() ... returns names of known providers $oMaphelper->getMinZoom() ... returns lowest maxzoom level of all providers ------------------------------------------------------------------------------- |
Files |
File | Role | Description |
---|---|---|
ahmaphelper.class.php | Class | Class source |
ahmaphelper.maps.php | Aux. | Auxiliary script |
demo.php | Example | Example script |
readme.txt | Doc. | Documentation |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.