Google Maps geocoding (address to GLatLng)

后端 未结 1 1673
轻奢々
轻奢々 2021-01-06 13:17

I am trying to draw a geodesic polyline with Google Maps JavaScript API from two address points.

var polyOptions = {geodesic:true};
var pol         


        
1条回答
  •  失恋的感觉
    2021-01-06 14:01

    You may want to check out the following example. First it tries to geocode address1. If it succeeds, it tries to geocode address2. If both succeed, it plots the geodesic polyline between the two coordinates, and two markers:

    
     
     
       
      Google Maps API Geocoding Demo 
      
     
    
      

    Screenshot:

    Google Maps API Geocoding Demo

    0 讨论(0)
提交回复
热议问题