Skip to content

Instantly share code, notes, and snippets.

@erochest
Created August 28, 2012 15:17
Show Gist options
  • Save erochest/3499003 to your computer and use it in GitHub Desktop.
Save erochest/3499003 to your computer and use it in GitHub Desktop.
Wandering OL points
var _this = this;
var Map = OpenLayers.Map;
if (jQuery.browser.webkit) {
Map = OpenLayers.Class(OpenLayers.Map, {
updateSize: function() {
OpenLayers.Map.prototype.updateSize.apply(this, arguments);
var mapHeight = _this.element.height(),
mapWidth = _this.element.width();
_this.element.find('svg').each(function (i, el) {
jQuery(el).height(mapHeight).width(mapWidth);
});
}
});
}
this.map = new Map(this.element.attr('id'), options);
.nlfeatures {
.olMap {
svg {
display: block;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment