简体   繁体   中英

Parsing Google Maps API GeoCode - server side or client side?

With this url:

http://maps.googleapis.com/maps/api/geocode/json?latlng=31.376356,34.811039&sensor=false

I can obtain the type of the location (road, street etc.).

  1. Is there any other solution?
  2. If I use on server side, it's going to consume the company queries, right?
    • If so, doing it on client side consume the client queries?

My goal is obtaining the type of coordinate (road, street etc) preferably on server side without consume the company queries.

Ideas anyone?

Is this a website or an application that you need to hit geocoding servers on every request? If so, you should use client-side.

If you have some predefined latLng values then you can use server side geocoding and cache the results for a couple of hours. This way, you probably won't need to worry about quota.

From Google Developers' site:

When to Use Client-Side Geocoding

The basic answer is "almost always." As geocoding limits are per user session, there is no risk that your application will reach a global limit as your userbase grows. Client-side geocoding will not face a quota limit unless you perform a batch of geocoding requests within a user session. Therefore, running client-side geocoding, you generally don't have to worry about your quota.

See here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM