如何在Google或OpenStreetMap上自动绘制地址标记? [英] How can I automatically plot markers for addresses on a Google or OpenStreetMap?

查看:340
本文介绍了如何在Google或OpenStreetMap上自动绘制地址标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个英国地址列表,并希望在Google或openstreetmap上绘制它们(我不介意哪个)。



有没有办法渲染一个为了使事情稍微复杂一些,我想改变颜色和颜色,使用颜色来表示位置(而不是标准标记)。

一些标记的大小。



数据源是包含邮编和街道标记类型(大小,颜色)的街道地址。



任何人都知道一个网站,脚本,过程,以实现这一目标?

地理区域将是一个郊区,所以它是一个相当小的区域。

$ b $您可以使用

> Google地理编码服务可以浏览您的地址并将其转换为可以在地图上绘制的纬度/经度值。您向 http://maps.googleapis.com/maps/api/geocode 发送HTTP请求,以获取所需数据的JSON(或XML)响应。



将所有地址进行地理编码后,即可使用标准 Google Maps API ,以便将您的位置呈现为标记在地图上。您可以自定义标记的外观,方法是指定创建 google.maps.marker 时使用适当的选项对象。


I have a list of UK addresses and would like to plot them on a google or openstreetmap (I dont mind which).

Is there a way to render a batch of addresses on a map with dots to represent the location (rather then the standard marker).

To make things slightly more complex, I would like to change the colour and size of some markers.

The data source is a street address including postcode and a marker type (size, color).

Does anyone know of a site, script, process to achieve this?

The geographic region will be a suburb so it is quite a small area.

解决方案

You can use the Google Geocoding service to spin through your addresses and translate them to latitude/longitude values that you can plot on a map. You make HTTP requests to http://maps.googleapis.com/maps/api/geocode to get back JSON (or XML) responses with the data you need.

Once you have geocoded all your addresses you can use the standard Google Maps API to create render your locations as markers on a map. You can customize the look of your markers by specifying the appropriate options when you create your google.maps.marker objects.

这篇关于如何在Google或OpenStreetMap上自动绘制地址标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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