Google Maps Autocomplete WITHOUT Atmosphere Data

前端 未结 3 1090
眼角桃花
眼角桃花 2020-12-29 12:18

I am currently using the Google Maps Places Autocomplete Javascript API to let users select a location by searching for the address or establishment name. Example code:

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-29 12:34

    Just call setField() after instantiating the autocomplete object, for example:

    autocomplete.setFields(['address_components', 'formatted_address', 'geometry', 'icon', 'name']);
    

    Nice try Google. After the hefty price change, instead of deprecating the APIs and make it obvious the requests will cost a fortune, they silently allowed the current code to request everything, thus profiting from the sudden charge increase.

    Nice move but it's already backfiring: Will remove all the Google services from my systems. OpenStreetMap and ArcGIS and Mapbox are much more affordable

提交回复
热议问题