From: Anthony Talarico Date: Tue, 15 Jan 2019 21:07:06 +0000 (-0500) Subject: changing the click behavior for the county on click function, making it so it goes... X-Git-Tag: v1.0.0^2~18 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=e7c008dcc7c473fecb76bd4fca357a597891c07d;p=WP-Plugins%2Fglm-member-db-county-map.git changing the click behavior for the county on click function, making it so it goes to the associated page --- diff --git a/views/front/map/display.html b/views/front/map/display.html index b7f3abf..a78e0ed 100644 --- a/views/front/map/display.html +++ b/views/front/map/display.html @@ -12,8 +12,13 @@ // Create map with default center and size var countyMap = L.map('area-map',{ - gestureHandling: true + gestureHandling: true, + }).setView([46.45, -87.0], 8); + + + + var countiesDirectory = '{$assets}/counties/'; // Tile Server URL var tileServer = 'https://maps.gaslightmedia.com/12312029-NoPlaceNames-95bfebd37e9e7d649daafa8762629084/'+ {literal}'{z}/{x}/{y}.png'{/literal}; @@ -137,7 +142,9 @@ } }, mouseout: resetSelectedCounty, - click: zoomToCounty + click: function(){ + window.location = page; + } }); // Get center of the county and add offsets var center = countyLayer.getBounds().getCenter();