Get latitude and longitude based on location name with Google Autocomplete API

前端 未结 7 1613
终归单人心
终归单人心 2020-11-30 20:49

I have a textbox in my page which gets a location name and button with text getLat&Long. Now on clicking my button I have to show an alert of latitude

7条回答
  •  借酒劲吻你
    2020-11-30 21:28

    I hope this will be more useful for future scope contain auto complete Google API feature with latitude and longitude

    var latitude = place.geometry.location.lat();
    var longitude = place.geometry.location.lng();  
    

    Complete View

    
    
        
        Place Autocomplete With Latitude & Longitude 
        
        
        
        
        
        
        
    
    

提交回复
热议问题