Google Maps API v3对多个地址进行地理编码 [英] Google maps api v3 geocoding multiple addresses

查看:58
本文介绍了Google Maps API v3对多个地址进行地理编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个小型应用程序,我想在一次页面加载中需要对比Google限制更多的地址进行地址解析.是否可以发送具有多个地址的 geocoder.geocode({'address':addreses [address] [1]},placeOnMap); ?因为响应应该给出多个.

I'm making a small app, that needs to geocode more addresses than google limits in one page-load, i guess. Is it possible to send in geocoder.geocode( { 'address': addreses[address][1]}, placeOnMap); with multiple addresses? Because response is supposed to give multiple.

谢谢.

推荐答案

JS地理编码器服务用于加载页面时不知道的地址(例如,用户提供的数据).如果您事先知道地址,则应该使用网络服务并存储坐标,这样就不必一遍又一遍地对相同的数据进行地理编码.否则,这会浪费Google的资源和用户的时间(因为页面将等待地址解析器执行其工作,而不是让页面代码提供所有数据).

The JS geocoder service is intended for addresses you cannot know when the page is loaded (for example, data provided by users). If you know addresses beforehand, you should use the webservice and store the coordinates so you don't have to re-geocode the same data over and over. To do otherwise is wasteful of Google's resources and your users' time (because the page will wait for the geocoder to do its stuff instead of having all the data provided with the page code).

这个问题和我的回答也很重要.您可以在此处使用该解决方案对多个地址进行地理编码并获取其坐标,以存储它们以备将来使用.

This question and my answer are also relevant. You can use the solution there to geocode a number of addresses and get their coordinates in order to store them for future use.

请注意,《 Google服务条款》仅允许您存储其数据以在Google地图上使用.

Note that the Google Terms of Service only allow you to store their data for use on Google Maps.

这篇关于Google Maps API v3对多个地址进行地理编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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