Google地图WebService API - 在地图上显示路线结果 [英] Google Maps WebService API - show directions result on map

查看:92
本文介绍了Google地图WebService API - 在地图上显示路线结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑:


  1. 如何从Google Maps Web Service APIv3中获取DirectionsResult json对象而不破坏如果是这样,如何解析该结果并将其显示在地图上(在我使用DirectionsRenderer的js API中)?


我可以使用js API来完成上述操作,但是使用Web服务失败了。也可以使用JQuery / JQM。



任何想法?

解决方案

听起来你实际上并不想执行Javascript,你只是想解析JSON。有许多图书馆可以做到这一点。


EDIT:

  1. How is it possible to get a DirectionsResult json object from Google maps Web Service APIv3 without breaking the "laws" of xss?

  2. if so, how is it possible to parse that result and show it on a map (in the js API I use DirectionsRenderer) ?

I can do the above with the js API, but am failing miserably with the Web Service. also, use of JQuery / JQM is available.

Any ideas?

解决方案

Sounds like you don't actually want to execute Javascript, you just want to parse JSON. There are many libraries available to do this.

这篇关于Google地图WebService API - 在地图上显示路线结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆