aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gmap_arcgis.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/gmap_arcgis.js b/gmap_arcgis.js
index f777d5f..77b2f7a 100644
--- a/gmap_arcgis.js
+++ b/gmap_arcgis.js
@@ -651,6 +651,22 @@ function gmapArcgis(config) {
self.config.panoramio.infoWindow.setContent(photoDiv);
});
}
+
+ // See https://groups.google.com/forum/#!msg/panoramio-api/oQUJzcI-NM8/ARGPKppY33YJ
+ panoramio.events.listen(this.config.panoramio.photoWidget, panoramio.events.EventType.PHOTO_CLICKED, photoClicked);
+
+ function photoClicked(event) {
+ var photo=event.getPhoto();
+
+ if(photo){
+ MaximizeWindow(window.open(photo.getPhotoUrl())); // opens a new window
+ }
+
+ function MaximizeWindow(hWnd){
+ hWnd.moveTo(0,0);
+ hWnd.resizeTo(screen.width, screen.height);
+ }
+ }
},
// Set the current map center, optionally updating the map