Google Maps - Street View Static Image

前端 未结 3 1504
时光取名叫无心
时光取名叫无心 2020-12-30 14:50

Is there a way to insert an address into a link and have it bring up the street view?

For instance:



        
3条回答
  •  悲&欢浪女
    2020-12-30 15:39

    Might be best to use Google Maps JavaScript API v3 to do it. See documentation and sample code at http://code.google.com/apis/maps/documentation/javascript/services.html#StreetView.

    Here's code from that page (with a few extraneous bits removed) that displays a street view:

    
    
    
    Google Maps JavaScript API Example: Embedded StreetView
    
    
    
    
      

    Note that the code uses latitude and longitude rather than address. If all you have is a street address, you can use Google's Geocoder object to convert an address to a LatLng object.

提交回复
热议问题