开发者

Google maps API - GStreetviewPanorama - Remove Address Overlay

开发者 https://www.devze.com 2023-01-23 12:59 出处:网络
GEvent.addListener(marker, \"click\", function() { 开发者_开发知识库 panoramaOptions = { addressControl: false,navigationControl: false };
GEvent.addListener(marker, "click", function() {

开发者_开发知识库 panoramaOptions = { addressControl: false,navigationControl: false };
  panorama = new GStreetviewPanorama(smallNode,panoramaOptions);
 GEvent.addListener(panorama, 'error', function(errorCode) {
         if (errorCode == 600) {
           smallNode.innerHTML = 'No Streetview data was found.';
         }
       }); 
  panorama.setLocationAndPOV(marker.getLatLng());
marker.openInfoWindowTabs(tabs);

 });  

Hi - I am displaying a Street View from a lat long value, but the address displayed in the Panorama (street View) is slightly off from the address I have stored in the database. For example, the overlay will display "91 xxx Street" in the top right corner of the Street View map, when I have "93 xxx Street" as my marker which was geocoded.

I would like to remove the address overlay and user photos overlay from this map, using the above code as a reference - could you please assist in removing the address and photo overlays?

Any help appreciated.


You can hide the user photos, but not the address.

The properties available for GStreetViewPanoramaOptions are available in the reference.

In particular, to remove user photos:

var panoramaOptions = { features: { userPhotos: false } };

addressControls and navigationControls are not supported options.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号