0

I'm looking for a way to show the coordinates LAT / LONG of the Bus (Markers) of a particular bus line shown on Google Maps, but I can not extract this information from the site. I used Firebug and have not found the Coordinates LAT / LONG.

The address for the url I'm trying to extract LAT / LONG is:

http://olhovivo.sptrans.com.br/#sp?cat=Mapa&l=34694&s=857P-10&sc=TERMINAL%20CAMPO%20LIMPO

(.. OR ..)

http://olhovivo.sptrans.com.br/#sp?cat=Mapa&l=829&s=9789-10&sc=BARRA%20FUNDA&nc

I want to use a script Javascript to capture Coordinates (LAT / LONG). I'm trying the following code in Firebug console:

javascript:void(prompt("TEST",gApplication.getMap().getCenter()));

, but it only works on URLs that have the domain GoogleMaps.

Have any tip or trick to help extract the Long / Lat objects (bus) on Google Map?

Which adjustments do you recommend? Any suggestions would be appreciated. Thanks...

4

1 回答 1

0

这不是世界上最漂亮的东西,但坐标位于地图中“点击在 Google 地图上查看该区域”的链接内,所以如果你抓住那个链接,你可以发挥一些神奇的作用。例如,将其复制/粘贴到 Firebug 中,您应该会得到您正在寻找的东西......

var x=($('a[title="Click to see this area on Google Maps"]').attr("href")); x.split("?ll=")[1].split("&z")[0];

祝你好运!:-)

于 2013-02-14T01:51:17.793 回答