Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Define map at the top

  • Loading branch information...
commit f5b53740e617c9111c75479f5f4e7b6c722ae203 1 parent 47e5b04
@ahocevar ahocevar authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 examples/vector-layer.js
View
4 examples/vector-layer.js
@@ -17,6 +17,8 @@ goog.require('ol.style.Rule');
goog.require('ol.style.Style');
+var map;
+
var raster = new ol.layer.TileLayer({
source: new ol.source.MapQuestOpenAerial()
});
@@ -58,7 +60,7 @@ xhr.onload = function() {
};
xhr.send();
-var map = new ol.Map({
+map = new ol.Map({
layers: new ol.Collection([raster, vector]),
renderer: ol.RendererHint.CANVAS,
target: 'map',
Please sign in to comment.
Something went wrong with that request. Please try again.