Menu

Location based services

Sebastian Reitenbach

OGo location based services

OGo has the ability to geocode addresses if needed, and to use the result to connect to location based services. When configured, then there will be Icons over each address, looking up the configured web service based on the address.
Further its possible to show markers on a map for a group of contacts as a result of a search or a custom tab.

Note: this is still considered an experimental feature, and might be subject to change.
For geocoding its still using the deprecated GoogleGeocoding API version 2.0.

defaults write NSGlobalDomain GoogleMapsXMLCoordinatesFileBaseURL /var/www/htdocs/coordinates
defaults write NSGlobalDomain GoogleMapsXMLCoordinatesWebBaseURL https://www.my-domain.de/coordinates
defaults write NSGlobalDomain GoogleMapsURL http://maps.google.com/maps?file=api&v=2&key=YOURKEYFORYOURDOMAIN
defaults write NSGlobalDomain GoogleMapsCenterCoordinates 52.000,12.0000
defaults write NSGlobalDomain GoogleGeocodingURL http://maps.google.com/maps/geo?q=$STREET$+$CITY$+$ZIP$+$COUNTRY$&output=csv&key=YOURKEYFORYOURDOMAIN
defaults write NSGlobalDomain OGoAddressMapLinks '{ \
    GeoCaching = { \
        UseGoogleMapsAPI = YES; \
        icon = "GeoCaching.png"; \
        target = "_new"; \
        url = "http://www.geocaching.com/seek/nearest.aspx?origin_lat=$LATITUDE$&origin_long=$LONGITUDE$"; \
    }; \
    GermanWeatherService = { \
        UseGoogleMapsAPI = NO; \
        icon = "Wetter.png"; \
        target = "_new"; \
        url = "http://wetter.rtl.de/shared/php/search_plz_ort.php?in=$ZIP$";
    }; \
    GoogleMaps = { \
        UseGoogleMapsAPI = NO; \
        icon = "GoogleMaps.png"; \
        target = "_new"; \
        url = "http://maps.google.de/maps?f=q&output=html&q=$COUNTRY$+$ZIP$+$CITY$+$STREET$&btnG=Maps-Suche"; \
    }; \
    OpenStreetMap = { \
        UseGoogleMapsAPI = YES; \
        icon = "OpenStreetMap.png"; \
        target = "_new"; \
        url = "http://www.openstreetmap.org/?lat=$LATITUDE$&lon=$LONGITUDE$&zoom=15&layers=B00FF"; \
    }; \
}'
  • GoogleMapsXMLCoordinatesFileBaseURL: the filesystem path, where OGo stores the coordinates and information about users. This directory should be accessible by the Apache, and writable by the OGo daemon
  • GoogleMapsURL: the URL to above path
  • GoogleMapsCenterCoordinates: when showing multiple markers on a map, this is the coordinate where the map is centered around
  • GoogleGeocodingURL: The URL used to connect to the Google GeoCoding API.
  • OGoAddressMapLinks: This is the parameter to specify the web services that can be accessed by icons showing up over each address. Each entry has a name, as is configured with the following parameters:
    • UseGoogleMapsAPI: set to YES, if the service needs LAT/LON information, NO if it can work with the address
    • icon: the icon that should show up for that service over the address
    • target: the name of the window/tab that should be used, use "_new" to always open up a new window/tab
    • url: the URL where the service can be accessed. When the service needs LAT/LON then use the placeholders $LATITUDE$ and $LONGITUDE$, else use the placeholders $COUNTRY$, $ZIP$, $CITY$, $STREET$ taken from the address directly.