English 中文(简体)
使用哪一个-Kml或谷歌地图Api
原标题:Which one to use - Kml or Google Map Api

我想在谷歌地图上显示基于用户搜索标准的位置,即;如果用户选择了伦敦,那么应该显示来自伦敦的所有记录,如果用户输入了他的邮政编码,那么它应该在谷歌地图上显示距离他的邮政编码25英里以内的结果(所有数据都来自数据库php/mysql)。

现在的问题是我应该用什么?KML或谷歌地图api V3,由于我想给用户提供查看位置简要信息的选项,当他将鼠标悬停在该标记上时,点击该标记我想显示位置和评论计数的图像,以及距离(根据他的邮政编码动态计算),我还想取消自定义标记。我以前在api V3上做过一些工作,但想了解KML。它支持我的需求吗?根据我的理解,KML只是一个静态文件,不能给出这样的动态。如果是,你能提供任何样品以及如何做到这一点吗。

谢谢

问题回答

你的理解是正确的,KML只是静态文件。您应该能够使用谷歌地图api v3方法的组合来完成您的需求,如地理编码、计算距离等。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签