Optimizing mobile app usage of Google Places API

  • Can any one help suggest what changes I can make to my question to solicit answers - would appreciate it
  • Apologies if this has been answered already, as a new user I was not able to find anything similar:

    Current Setup:

    I am building a POC mobile app that displays a Google Map with markers of specific franchise-businesses within 500m of the user's gps location. The franchise names are maintained server-side as a manual list. Sometimes there are multiple branches of the same franchise in close proximity to the user. My current workflow is something like this:

    a) Ping my own server to acquire list of franchise names for my app b) Show Google Map screen on mobile app c) For each franchise name, perform a Google Places API search centered around user's Gps, with 500m proximity d) If result(s) is found for that franchise, add marker(s) to mobile app Google map. This takes a while and markers show up one at a time on the map.

    I currently have about 85 franchises. I foresee this growing over time.

    Issue:

    I would like to find a more efficient experience for the user. Currently user waits while mobile app pings Google Places API 85+ times for any locations that are in proximity. Ideally I'd like the map to load with franchise markers, or franchise markers to drop in very quickly.

    One option I have considered:

    -geocoding all branches of each franchise into a table, caching that table as part of the mobile install package, and calculating proximity to user's GPS on the mobile client before placing a Google Map marker (bypassing Places API iterative call altogether). However this sort of geocode data is not available to me, nor are the addresses guaranteed to be fixed over time

    I see a lot of commercial apps that have done this quite well, would appreciate any feedback that will help me grow and do this better.

    Thank you,

    链接地址: http://www.djcxy.com/p/63162.html

    上一篇: 从Google Places API存储数据

    下一篇: 优化Google Places API的移动应用使用情况