Dieses Plug-in erlaubt das nachschlagen von Geo-Koordinaten für eine Adresse. Das Ergebnis wird als Smarty Daten übergeben. Neben den Koordinaten werden auch grobe Zusatzdaten wie Land oder Stadt zurück gegeben.
Mehr dazu auf der entsprechenden Wiki Seite: http://wiki.cmsmadesimple.org/index.php ... i_geocoder
Das Plug-in kann im Forge auf der Seite der API Collection heruntergeladen werden: http://dev.cmsmadesimple.org/project/files/604
Verfügbare Daten eines Geo-Coding Ergebnisses (GPS Daten sind bis auf die String-Version vom Typ FLOAT):
Code: Select all
n = integer
$geoinfo [n] -> gps -> lat ---- Latitude of position (e.g 53.1234567)
$geoinfo [n] -> gps -> lng ---- Longitude of position
$geoinfo [n] -> gps -> short_lat ---- Latitude in short (e.g 53.123)
$geoinfo [n] -> gps -> short_lng ---- Longitude in short
$geoinfo [n] -> gps -> space_string ---- Coordinates String (e.g. "123.124 15.231466")
$geoinfo [n] -> gps -> comma_string ---- Coordinates String (e.g. "123.124,15.231466")
$geoinfo [n] -> box -> north ---- bounding box of geocoded location (address, city... etc)
$geoinfo [n] -> box -> south
$geoinfo [n] -> box -> east
$geoinfo [n] -> box -> west
$geoinfo [n] -> details -> accuracy ---- Accuracy level of address (9-1)
$geoinfo [n] -> details -> address ---- Street Address of location
$geoinfo [n] -> details -> localityname ---- Usually this is the Cityname
$geoinfo [n] -> details -> sub_admin_area_name ---- This depends on the location, city district or county
$geoinfo [n] -> details -> admin_area_name ---- Usually a federal state, large admin district
$geoinfo [n] -> details -> countryname ---- name of the country
$geoinfo [n] -> details -> countrycode
Ach ja... der große Gag ist natürlich, dass sich diese Plug-in einfach mit den Twitter und Youtube Search API Plug-ins verknüpfen lässt. Hier mal ein Beispiel:
Code: Select all
{nh_essentials}
{nh_api_geocoder location="München Germany" api_key="YOUR API KEY"}
{nh_api_twittersearch coordinates=$geoinfo[0]->gps->comma_string max=10}
{nh_api_youtubesearch coordinates=$geoinfo[0]->gps->space_string max=10}
Wünsche viel Spaß beim ausprobieren
Beste Grüße
Nils