From f9c2788e5cc2b4c957185569be3e436ae4b3ebd1 Mon Sep 17 00:00:00 2001 From: Silvio Date: Mon, 29 Jul 2013 19:00:18 -0300 Subject: Open panoramio in a new window --- gmap_arcgis.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- cgit v1.2.3