aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2013-07-29 19:00:18 -0300
committerSilvio <silvio@socioambiental.org>2013-07-29 19:00:18 -0300
commitf9c2788e5cc2b4c957185569be3e436ae4b3ebd1 (patch)
treed9890274081072b28be44bcac82badd47d15a5bc
parentec5d461b898b7c6b39cd3b1776230f34bce05f5b (diff)
downloadgmap_arcgis_js-f9c2788e5cc2b4c957185569be3e436ae4b3ebd1.tar.gz
gmap_arcgis_js-f9c2788e5cc2b4c957185569be3e436ae4b3ebd1.tar.bz2
Open panoramio in a new window
-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