Skip to content

Instantly share code, notes, and snippets.

@dkobia
Created February 8, 2011 17:36
Show Gist options
  • Save dkobia/816816 to your computer and use it in GitHub Desktop.
Save dkobia/816816 to your computer and use it in GitHub Desktop.
diff --git a/application/views/main_js.php b/application/views/main_js.php
index 3cce2f9..452c07b 100644
--- a/application/views/main_js.php
+++ b/application/views/main_js.php
@@ -40,6 +40,7 @@
var defaultZoom = <?php echo $default_zoom; ?>;
var markerRadius = <?php echo $marker_radius; ?>;
var markerOpacity = "<?php echo $marker_opacity; ?>";
+ var selectedFeature;
var activeZoom = null;
@@ -121,11 +122,7 @@
*/
function onPopupClose(evt)
{
- // selectControl.unselect(selectedFeature);
- for (var i=0; i<map.popups.length; ++i)
- {
- map.removePopup(map.popups[i]);
- }
+ selectControl.unselect(selectedFeature);
}
/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment