Search code examples
openlayersgoogle-latitude

Use Google Latitude data as layer in OpenLayers


I have an map application built on OpenLayers that displays a basemap and different transmission sites which our service personnel is maintaining. To be able to send the closest techician to a site when an error occurs we want to track them and display their latest position on a map.

We just started using Google Latitude and it works in the Latitude application as expected, but what is the best approach on how to use this data as a separate layer in OpenLayers? To display all users that are connected on the same map?

I'm thinking maybe a Vector layer with a GeoJSON service that queries the Latitude API, but any thoughts and ideas are welcome.


Solution

  • Well, it can be your own web service that quires Latitude API, or you can call Google's API directly from the client since it's REST based.

    On the OpenLayers side I would also prefer Vector layer as it's very flexible and seems to fulfill your requirements.

    You will probably also want to create a timer(setTimeout()) that calls Latitude API every minute or so and updates user's positions.