如何在KML数据点周围添加具有不同半径的圆? [英] How do I add circles with varying radii around KML data points?

查看:428
本文介绍了如何在KML数据点周围添加具有不同半径的圆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个地址列表,需要放置在地图上,并以不同半径的圆圈显示。



我有一个KML文件,列出所有我希望在KML中添加一个半径自定义字段,并且能够根据自定义字段在每个点周围绘制一个圆圈。



我在正确的轨道上还是有更简单的方法来做到这一点?

解决方案

取决于你有多少个地址。如果您的KML文件大小很大,那么您可能会走在正确的轨道上。但是,Google Maps API中的KmlLayer不能直接访问点中的数据,因此您添加半径自定义字段的计划将无法使用。看起来你可能会更好地将单个点渲染为地址。以下是一些可能有用的文章:
https://developers.google.com/ maps / articles / toomanymarkers
https://developers.google.com/maps/articles/phpsqlsearch_v3
https://developers.google.com/maps/articles/phpsqlgeocode 然后在周围创建一个圆形对象它。


I have a list of addresses that need to be placed on a map and displayed with a circle around each of varying radii.

I have a KML file listing all of my points and I want to add a 'radius' custom field within the KML and be able to draw a circle around each point based on the custom field.

Am I on the right track or is there an easier way to do this?

解决方案

Depends on how many addresses you have. If your KML file is a couple of megs large, then you might be on the right track. However, KmlLayer in the Google Maps API doesn't give you direct access to the data in the points, so your plan to add a radius custom field won't work. It seems like you might be better off rendering the individual points as addresses. These are some articles that might be helpful: https://developers.google.com/maps/articles/toomanymarkers https://developers.google.com/maps/articles/phpsqlsearch_v3 https://developers.google.com/maps/articles/phpsqlgeocode

And then creating a circle object around it.

这篇关于如何在KML数据点周围添加具有不同半径的圆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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