Capture Coordinates in Google Map on User Click

前端 未结 5 539
感情败类
感情败类 2020-12-13 03:35

I\'m using this code to capture the co-ordinates when user clicks on the map by using below event listener:

google.map         


        
5条回答
  •  -上瘾入骨i
    2020-12-13 04:34

    This example demonstrates the use of click event listeners on POIs (points of interest). It listens for the click event on a POI icon and then uses the placeId from the event data with a directionsService.route request to calculate and display a route to the clicked place. It also uses the placeId to get more details of the place.

    Read the google documentation.

    
    
      
        POI Click Events
        
        
        
      
      
        

    Place ID

提交回复
热议问题