开发者

Use Google Latitude data as layer in OpenLayers

开发者 https://www.devze.com 2023-02-20 02:14 出处:网络
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 wh

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号