How do I use Google Maps geocoder.getLatLng() and store its result in a database?

后端 未结 5 1179
死守一世寂寞
死守一世寂寞 2021-01-04 10:10

Hey everybody! Im trying to use getLatLng() to geocode a list of postal/zip codes and store the generated point in the database to be placed on a map later. This is what I\'

5条回答
  •  迷失自我
    2021-01-04 10:50

    In V3 the coordinates must be first serialized as a string as shown by Arnoldiuss, before sending as json post data.

    var lat = latlong.lat().toString().substr(0, 12); var lng = latlong.lng().toString().substr(0, 12);

提交回复
热议问题