Skip to content

Instantly share code, notes, and snippets.

@psibi
Created October 22, 2012 15:57
Show Gist options
  • Save psibi/3932219 to your computer and use it in GitHub Desktop.
Save psibi/3932219 to your computer and use it in GitHub Desktop.
Popup
function setHTML(response){
document.getElementById('nodelist').innerHTML = response.responseText;
var popup_info = response.responseText;
if (popup != null) {
popup.destroy();
popup = null;
}
popup = new OpenLayers.Popup("Sample",
mouseloc,
new OpenLayers.Size(250,120),
popup_info,
null,
true);
popup.setBackgroundColor("#bcd2ee");
// popup.setOpacity(.7);
map.addPopup(popup);
popup.events.register("click", map, popupDestroy);
}
function popupDestroy(e) {
popup.destroy();
popup = null;
OpenLayers.Util.safeStopPropagation(e);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment