google maps API v3 - 如何绘制动态多边形/折线? [英] google maps API v3 - how to draw dynamic polygons/polylines?

查看:15
本文介绍了google maps API v3 - 如何绘制动态多边形/折线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 4 天使用 Google Maps Javascript API 的经验,我发现他们的文档和信息共享充其量是令人困惑的.

I have 4 days of experience with Google Maps Javascript API and i find their documentation and information sharing confusing at best.

有没有人有关于如何在谷歌地图上绘制多边形/折线的经验或知识(使用 Javascript API V3)类似于 这个 示例?(我在 this 2008 年的博文)

Does anyone have experience or knowledge on how to draw polygons/polylines on a google map (using Javascript API V3) similar to this example? (which i found on this blogPost from 2008)

据我的研究可以告诉我,该示例​​直接使用 Javascript API V2 或使用 V2 中的 GeometryControl 实用程序库(可以在 此处 供参考).我似乎无法找到 Javascript API V3 是否有任何方式允许此类接口.

So far as my research can tell me the example uses the Javascript API V2 directly or uses the GeometryControl utility library from V2 (which can be found here for reference). I cannot seem to find if the Javascript API V3 has any way of allowing such interface.

我将继续我的研究,但希望得到任何有用的评论、链接或建议.即使您为我指明了进一步研究的正确方向.:)

I will be continuing my research but would appreciate any helpful comment or link or suggestion. Even if you point me in the correct direction for further research. :)

推荐答案

经过大量研究,我发现了 这个 示例.在发现它并在谷歌上搜索之后,这似乎是对像我这样的问题的一般答案.这是非常基本的,但根据 V3 API 是正确的.

After much research i came across this example. Which, after discovering it and googling it, seems the general answer to questions like mine. This is very basic but correct according to the V3 API.

使用本示例中的代码,我成功构建了我需要的原型.代码是基本的,但我发现可以对其进行扩展以更好地适应我的规范,这很好.

Using the code in this example i am successfully building a prototype that i need. The code is basic but i have found that it can be extended to better fit my specifications, which is good.

我在评论中提供的 plexer 答案链接将是最好的解决方案,但开发人员表示它仍在开发中,因此不够稳定,无法用于发布应用程序.

The link provided in my comment to plexer's answer would be the best solution but the person developing it states that it is still under development and thus not stable enough for use in release applications.

这篇关于google maps API v3 - 如何绘制动态多边形/折线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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