@@ -37,7 +37,7 @@ var map = new OpenLayers.Map({
|
|||||||
function loadFeatures(data) {
|
function loadFeatures(data) {
|
||||||
var features = new OpenLayers.Format.GeoJSON().read(data);
|
var features = new OpenLayers.Format.GeoJSON().read(data);
|
||||||
states.addFeatures(features);
|
states.addFeatures(features);
|
||||||
};
|
}
|
||||||
|
|
||||||
// update filter and redraw when form is submitted
|
// update filter and redraw when form is submitted
|
||||||
var cql = document.getElementById("cql");
|
var cql = document.getElementById("cql");
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ function startAnimation() {
|
|||||||
filter.lowerBoundary = currentDate;
|
filter.lowerBoundary = currentDate;
|
||||||
filter.upperBoundary = new Date(currentDate.getTime() + (span * 1000));
|
filter.upperBoundary = new Date(currentDate.getTime() + (span * 1000));
|
||||||
filterStrategy.setFilter(filter);
|
filterStrategy.setFilter(filter);
|
||||||
currentDate = new Date(currentDate.getTime() + (step * 1000))
|
currentDate = new Date(currentDate.getTime() + (step * 1000));
|
||||||
} else {
|
} else {
|
||||||
stopAnimation(true);
|
stopAnimation(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ var map = new OpenLayers.Map({
|
|||||||
].join("");
|
].join("");
|
||||||
}
|
}
|
||||||
}, options)
|
}, options)
|
||||||
),
|
)
|
||||||
],
|
],
|
||||||
center: new OpenLayers.LonLat(10.2, 48.9).transform("EPSG:4326", "EPSG:3857"),
|
center: new OpenLayers.LonLat(10.2, 48.9).transform("EPSG:4326", "EPSG:3857"),
|
||||||
zoom: 5
|
zoom: 5
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ OpenLayers.Animation = (function(window) {
|
|||||||
} else {
|
} else {
|
||||||
delete loops[id];
|
delete loops[id];
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
requestFrame(loops[id], element);
|
requestFrame(loops[id], element);
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
*/
|
*/
|
||||||
draw: function() {
|
draw: function() {
|
||||||
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
OpenLayers.Control.prototype.draw.apply(this, arguments);
|
||||||
if(!(this.layers.length > 0)) {
|
if (this.layers.length === 0) {
|
||||||
if (this.map.baseLayer) {
|
if (this.map.baseLayer) {
|
||||||
var layer = this.map.baseLayer.clone();
|
var layer = this.map.baseLayer.clone();
|
||||||
this.layers = [layer];
|
this.layers = [layer];
|
||||||
@@ -356,7 +356,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
this.minimizeControl();
|
this.minimizeControl();
|
||||||
} else if (evt.buttonElement === this.maximizeDiv) {
|
} else if (evt.buttonElement === this.maximizeDiv) {
|
||||||
this.maximizeControl();
|
this.maximizeControl();
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ OpenLayers.Format.CQL = (function() {
|
|||||||
var result = buildAst(tokenize(text));
|
var result = buildAst(tokenize(text));
|
||||||
if (this.keepData) {
|
if (this.keepData) {
|
||||||
this.data = result;
|
this.data = result;
|
||||||
};
|
}
|
||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommo
|
|||||||
range.maxValue = this.getChildValue(node);
|
range.maxValue = this.getChildValue(node);
|
||||||
},
|
},
|
||||||
"Identifier": function(node, obj) {
|
"Identifier": function(node, obj) {
|
||||||
obj.identifier = this.getChildValue(node);
|
obj.identifier = this.getChildValue(node);
|
||||||
},
|
},
|
||||||
"SupportedCRS": function(node, obj) {
|
"SupportedCRS": function(node, obj) {
|
||||||
obj.supportedCRS = this.getChildValue(node);
|
obj.supportedCRS = this.getChildValue(node);
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ OpenLayers.Format.SOSCapabilities.v1_0_0 = OpenLayers.Class(
|
|||||||
offering.resultModels.push(this.getChildValue(node));
|
offering.resultModels.push(this.getChildValue(node));
|
||||||
},
|
},
|
||||||
"responseMode": function(node, offering) {
|
"responseMode": function(node, offering) {
|
||||||
offering.responseModes.push(this.getChildValue(node));;
|
offering.responseModes.push(this.getChildValue(node));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
|
"ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
|
||||||
|
|||||||
@@ -1044,7 +1044,7 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
version: server.version
|
version: server.version
|
||||||
};
|
};
|
||||||
if (server.title) {
|
if (server.title) {
|
||||||
attributes.title = server.title
|
attributes.title = server.title;
|
||||||
}
|
}
|
||||||
this.setAttributes(node, attributes);
|
this.setAttributes(node, attributes);
|
||||||
|
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
var name = (child.prefix) ?
|
var name = (child.prefix) ?
|
||||||
child.nodeName.split(":")[1] : child.nodeName;
|
child.nodeName.split(":")[1] : child.nodeName;
|
||||||
if (grandchildren.length == 0) {
|
if (grandchildren.length == 0) {
|
||||||
attributes[name] = null
|
attributes[name] = null;
|
||||||
} else if (grandchildren.length == 1) {
|
} else if (grandchildren.length == 1) {
|
||||||
var grandchild = grandchildren[0];
|
var grandchild = grandchildren[0];
|
||||||
if (grandchild.nodeType == 3 ||
|
if (grandchild.nodeType == 3 ||
|
||||||
|
|||||||
@@ -447,7 +447,7 @@ OpenLayers.Handler.Path = OpenLayers.Class(OpenLayers.Handler.Point, {
|
|||||||
}
|
}
|
||||||
if(this.maxVertices && this.line &&
|
if(this.maxVertices && this.line &&
|
||||||
this.line.geometry.components.length === this.maxVertices) {
|
this.line.geometry.components.length === this.maxVertices) {
|
||||||
this.removePoint()
|
this.removePoint();
|
||||||
this.finalize();
|
this.finalize();
|
||||||
} else {
|
} else {
|
||||||
this.addPoint(evt.xy);
|
this.addPoint(evt.xy);
|
||||||
|
|||||||
@@ -255,8 +255,7 @@ OpenLayers.Layer.EventPane = OpenLayers.Class(OpenLayers.Layer, {
|
|||||||
var moOldZoom = this.getMapObjectZoom();
|
var moOldZoom = this.getMapObjectZoom();
|
||||||
var oldZoom= this.getOLZoomFromMapObjectZoom(moOldZoom);
|
var oldZoom= this.getOLZoomFromMapObjectZoom(moOldZoom);
|
||||||
|
|
||||||
if ( !(newCenter.equals(oldCenter)) ||
|
if (!(newCenter.equals(oldCenter)) || newZoom != oldZoom) {
|
||||||
!(newZoom == oldZoom) ) {
|
|
||||||
|
|
||||||
if (!zoomChanged && oldCenter && this.dragPanMapObject &&
|
if (!zoomChanged && oldCenter && this.dragPanMapObject &&
|
||||||
this.smoothDragPan) {
|
this.smoothDragPan) {
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class({
|
|||||||
if (this.map.baseLayer !== this) {
|
if (this.map.baseLayer !== this) {
|
||||||
zoom = this.map.baseLayer.getZoomForResolution(
|
zoom = this.map.baseLayer.getZoomForResolution(
|
||||||
this.getResolutionForZoom(zoom)
|
this.getResolutionForZoom(zoom)
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return zoom;
|
return zoom;
|
||||||
|
|||||||
@@ -227,10 +227,10 @@ OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, {
|
|||||||
var h = this.standardTileSize;
|
var h = this.standardTileSize;
|
||||||
if (x == this.tierSizeInTiles[z].w -1 ) {
|
if (x == this.tierSizeInTiles[z].w -1 ) {
|
||||||
var w = this.tierImageSize[z].w % this.standardTileSize;
|
var w = this.tierImageSize[z].w % this.standardTileSize;
|
||||||
};
|
}
|
||||||
if (y == this.tierSizeInTiles[z].h -1 ) {
|
if (y == this.tierSizeInTiles[z].h -1 ) {
|
||||||
var h = this.tierImageSize[z].h % this.standardTileSize;
|
var h = this.tierImageSize[z].h % this.standardTileSize;
|
||||||
};
|
}
|
||||||
return (new OpenLayers.Size(w, h));
|
return (new OpenLayers.Size(w, h));
|
||||||
} else {
|
} else {
|
||||||
return this.tileSize;
|
return this.tileSize;
|
||||||
|
|||||||
+10
-11
@@ -513,10 +513,9 @@ OpenLayers.Popup = OpenLayers.Class({
|
|||||||
this.contentDiv.innerHTML +
|
this.contentDiv.innerHTML +
|
||||||
"</div>";
|
"</div>";
|
||||||
|
|
||||||
var containerElement = (this.map) ? this.map.div
|
var containerElement = (this.map) ? this.map.div : document.body;
|
||||||
: document.body;
|
|
||||||
var realSize = OpenLayers.Util.getRenderedDimensions(
|
var realSize = OpenLayers.Util.getRenderedDimensions(
|
||||||
preparedHTML, null, {
|
preparedHTML, null, {
|
||||||
displayClass: this.displayClass,
|
displayClass: this.displayClass,
|
||||||
containerElement: containerElement
|
containerElement: containerElement
|
||||||
}
|
}
|
||||||
@@ -839,11 +838,11 @@ OpenLayers.Popup = OpenLayers.Class({
|
|||||||
var contentDivPadding = this._contentDivPadding;
|
var contentDivPadding = this._contentDivPadding;
|
||||||
if (!contentDivPadding) {
|
if (!contentDivPadding) {
|
||||||
|
|
||||||
if (this.div.parentNode == null) {
|
if (this.div.parentNode == null) {
|
||||||
//make the div invisible and add it to the page
|
//make the div invisible and add it to the page
|
||||||
this.div.style.display = "none";
|
this.div.style.display = "none";
|
||||||
document.body.appendChild(this.div);
|
document.body.appendChild(this.div);
|
||||||
}
|
}
|
||||||
|
|
||||||
//read the padding settings from css, put them in an OL.Bounds
|
//read the padding settings from css, put them in an OL.Bounds
|
||||||
contentDivPadding = new OpenLayers.Bounds(
|
contentDivPadding = new OpenLayers.Bounds(
|
||||||
@@ -857,9 +856,9 @@ OpenLayers.Popup = OpenLayers.Class({
|
|||||||
this._contentDivPadding = contentDivPadding;
|
this._contentDivPadding = contentDivPadding;
|
||||||
|
|
||||||
if (this.div.parentNode == document.body) {
|
if (this.div.parentNode == document.body) {
|
||||||
//remove the div from the page and make it visible again
|
//remove the div from the page and make it visible again
|
||||||
document.body.removeChild(this.div);
|
document.body.removeChild(this.div);
|
||||||
this.div.style.display = "";
|
this.div.style.display = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return contentDivPadding;
|
return contentDivPadding;
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ OpenLayers.Protocol.HTTP = OpenLayers.Class(OpenLayers.Protocol, {
|
|||||||
});
|
});
|
||||||
this.filterToParams = function(filter, params) {
|
this.filterToParams = function(filter, params) {
|
||||||
return format.write(filter, params);
|
return format.write(filter, params);
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -570,7 +570,7 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {
|
|||||||
geometry.components[i], style, featureId) && rendered;
|
geometry.components[i], style, featureId) && rendered;
|
||||||
}
|
}
|
||||||
return rendered;
|
return rendered;
|
||||||
};
|
}
|
||||||
|
|
||||||
rendered = false;
|
rendered = false;
|
||||||
var removeBackground = false;
|
var removeBackground = false;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ OpenLayers.Request = {
|
|||||||
* will be the same as the provided url.
|
* will be the same as the provided url.
|
||||||
*/
|
*/
|
||||||
makeSameOrigin: function(url, proxy) {
|
makeSameOrigin: function(url, proxy) {
|
||||||
var sameOrigin = !(url.indexOf("http") == 0);
|
var sameOrigin = url.indexOf("http") !== 0;
|
||||||
var urlParts = !sameOrigin && url.match(this.URL_SPLIT_REGEX);
|
var urlParts = !sameOrigin && url.match(this.URL_SPLIT_REGEX);
|
||||||
if (urlParts) {
|
if (urlParts) {
|
||||||
var location = window.location;
|
var location = window.location;
|
||||||
|
|||||||
Reference in New Issue
Block a user