Merge branch 'master' into bigbackbuffer
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function parseData(req) {
|
function parseData(req) {
|
||||||
g = new OpenLayers.Format.KML({extractStyles: true});
|
g = new OpenLayers.Format.KML({extractStyles: true});
|
||||||
html = ""
|
html = "";
|
||||||
features = g.read(req.responseText);
|
features = g.read(req.responseText);
|
||||||
for(var feat in features) {
|
for(var feat in features) {
|
||||||
html += "Feature: Geometry: "+ features[feat].geometry+",";
|
html += "Feature: Geometry: "+ features[feat].geometry+",";
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
for (var j in features[feat].attributes) {
|
for (var j in features[feat].attributes) {
|
||||||
html += "<li>Attribute "+j+":"+features[feat].attributes[j]+"</li>";
|
html += "<li>Attribute "+j+":"+features[feat].attributes[j]+"</li>";
|
||||||
}
|
}
|
||||||
html += "</ul>"
|
html += "</ul>";
|
||||||
html += "<ul>";
|
html += "<ul>";
|
||||||
for (var j in features[feat].style) {
|
for (var j in features[feat].style) {
|
||||||
html += "<li>Style "+j+":"+features[feat].style[j]+"</li>";
|
html += "<li>Style "+j+":"+features[feat].style[j]+"</li>";
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function parseData(req) {
|
function parseData(req) {
|
||||||
format = new OpenLayers.Format.WMSDescribeLayer();
|
format = new OpenLayers.Format.WMSDescribeLayer();
|
||||||
html = "<br>"
|
html = "<br>";
|
||||||
resp = format.read(req.responseText);
|
resp = format.read(req.responseText);
|
||||||
for(var i = 0; i < resp.length; i++) {
|
for(var i = 0; i < resp.length; i++) {
|
||||||
html += "Layer: typeName: "+ resp[i].typeName+",";
|
html += "Layer: typeName: "+ resp[i].typeName+",";
|
||||||
|
|||||||
+20
-20
@@ -131,14 +131,14 @@ Animator.prototype = {
|
|||||||
str += ">";
|
str += ">";
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// merge the properties of two objects
|
// merge the properties of two objects
|
||||||
Animator.applyDefaults = function(defaults, prefs) {
|
Animator.applyDefaults = function(defaults, prefs) {
|
||||||
prefs = prefs || {};
|
prefs = prefs || {};
|
||||||
var prop, result = {};
|
var prop, result = {};
|
||||||
for (prop in defaults) result[prop] = prefs[prop] !== undefined ? prefs[prop] : defaults[prop];
|
for (prop in defaults) result[prop] = prefs[prop] !== undefined ? prefs[prop] : defaults[prop];
|
||||||
return result;
|
return result;
|
||||||
}
|
};
|
||||||
// make an array from any object
|
// make an array from any object
|
||||||
Animator.makeArray = function(o) {
|
Animator.makeArray = function(o) {
|
||||||
if (o == null) return [];
|
if (o == null) return [];
|
||||||
@@ -146,7 +146,7 @@ Animator.makeArray = function(o) {
|
|||||||
var result = [];
|
var result = [];
|
||||||
for (var i=0; i<o.length; i++) result[i] = o[i];
|
for (var i=0; i<o.length; i++) result[i] = o[i];
|
||||||
return result;
|
return result;
|
||||||
}
|
};
|
||||||
// convert a dash-delimited-property to a camelCaseProperty (c/o Prototype, thanks Sam!)
|
// convert a dash-delimited-property to a camelCaseProperty (c/o Prototype, thanks Sam!)
|
||||||
Animator.camelize = function(string) {
|
Animator.camelize = function(string) {
|
||||||
var oStringList = string.split('-');
|
var oStringList = string.split('-');
|
||||||
@@ -161,27 +161,27 @@ Animator.camelize = function(string) {
|
|||||||
camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
|
camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
|
||||||
}
|
}
|
||||||
return camelizedString;
|
return camelizedString;
|
||||||
}
|
};
|
||||||
// syntactic sugar for creating CSSStyleSubjects
|
// syntactic sugar for creating CSSStyleSubjects
|
||||||
Animator.apply = function(el, style, options) {
|
Animator.apply = function(el, style, options) {
|
||||||
if (style instanceof Array) {
|
if (style instanceof Array) {
|
||||||
return new Animator(options).addSubject(new CSSStyleSubject(el, style[0], style[1]));
|
return new Animator(options).addSubject(new CSSStyleSubject(el, style[0], style[1]));
|
||||||
}
|
}
|
||||||
return new Animator(options).addSubject(new CSSStyleSubject(el, style));
|
return new Animator(options).addSubject(new CSSStyleSubject(el, style));
|
||||||
}
|
};
|
||||||
// make a transition function that gradually accelerates. pass a=1 for smooth
|
// make a transition function that gradually accelerates. pass a=1 for smooth
|
||||||
// gravitational acceleration, higher values for an exaggerated effect
|
// gravitational acceleration, higher values for an exaggerated effect
|
||||||
Animator.makeEaseIn = function(a) {
|
Animator.makeEaseIn = function(a) {
|
||||||
return function(state) {
|
return function(state) {
|
||||||
return Math.pow(state, a*2);
|
return Math.pow(state, a*2);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// as makeEaseIn but for deceleration
|
// as makeEaseIn but for deceleration
|
||||||
Animator.makeEaseOut = function(a) {
|
Animator.makeEaseOut = function(a) {
|
||||||
return function(state) {
|
return function(state) {
|
||||||
return 1 - Math.pow(1 - state, a*2);
|
return 1 - Math.pow(1 - state, a*2);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// make a transition function that, like an object with momentum being attracted to a point,
|
// make a transition function that, like an object with momentum being attracted to a point,
|
||||||
// goes past the target then returns
|
// goes past the target then returns
|
||||||
Animator.makeElastic = function(bounces) {
|
Animator.makeElastic = function(bounces) {
|
||||||
@@ -189,7 +189,7 @@ Animator.makeElastic = function(bounces) {
|
|||||||
state = Animator.tx.easeInOut(state);
|
state = Animator.tx.easeInOut(state);
|
||||||
return ((1-Math.cos(state * Math.PI * bounces)) * (1 - state)) + state;
|
return ((1-Math.cos(state * Math.PI * bounces)) * (1 - state)) + state;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// make an Attack Decay Sustain Release envelope that starts and finishes on the same level
|
// make an Attack Decay Sustain Release envelope that starts and finishes on the same level
|
||||||
//
|
//
|
||||||
Animator.makeADSR = function(attackEnd, decayEnd, sustainEnd, sustainLevel) {
|
Animator.makeADSR = function(attackEnd, decayEnd, sustainEnd, sustainLevel) {
|
||||||
@@ -206,7 +206,7 @@ Animator.makeADSR = function(attackEnd, decayEnd, sustainEnd, sustainLevel) {
|
|||||||
}
|
}
|
||||||
return sustainLevel * (1 - ((state - sustainEnd) / (1 - sustainEnd)));
|
return sustainLevel * (1 - ((state - sustainEnd) / (1 - sustainEnd)));
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// make a transition function that, like a ball falling to floor, reaches the target and/
|
// make a transition function that, like a ball falling to floor, reaches the target and/
|
||||||
// bounces back again
|
// bounces back again
|
||||||
Animator.makeBounce = function(bounces) {
|
Animator.makeBounce = function(bounces) {
|
||||||
@@ -215,7 +215,7 @@ Animator.makeBounce = function(bounces) {
|
|||||||
state = fn(state);
|
state = fn(state);
|
||||||
return state <= 1 ? state : 2-state;
|
return state <= 1 ? state : 2-state;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// pre-made transition functions to use with the 'transition' option
|
// pre-made transition functions to use with the 'transition' option
|
||||||
Animator.tx = {
|
Animator.tx = {
|
||||||
@@ -233,7 +233,7 @@ Animator.tx = {
|
|||||||
veryElastic: Animator.makeElastic(3),
|
veryElastic: Animator.makeElastic(3),
|
||||||
bouncy: Animator.makeBounce(1),
|
bouncy: Animator.makeBounce(1),
|
||||||
veryBouncy: Animator.makeBounce(3)
|
veryBouncy: Animator.makeBounce(3)
|
||||||
}
|
};
|
||||||
|
|
||||||
// animates a pixel-based style property between two integer values
|
// animates a pixel-based style property between two integer values
|
||||||
function NumericalStyleSubject(els, property, from, to, units) {
|
function NumericalStyleSubject(els, property, from, to, units) {
|
||||||
@@ -271,7 +271,7 @@ NumericalStyleSubject.prototype = {
|
|||||||
inspect: function() {
|
inspect: function() {
|
||||||
return "\t" + this.property + "(" + this.from + this.units + " to " + this.to + this.units + ")\n";
|
return "\t" + this.property + "(" + this.from + this.units + " to " + this.to + this.units + ")\n";
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// animates a colour based style property between two hex values
|
// animates a colour based style property between two hex values
|
||||||
function ColorStyleSubject(els, property, from, to) {
|
function ColorStyleSubject(els, property, from, to) {
|
||||||
@@ -313,7 +313,7 @@ ColorStyleSubject.prototype = {
|
|||||||
inspect: function() {
|
inspect: function() {
|
||||||
return "\t" + this.property + "(" + this.origFrom + " to " + this.origTo + ")\n";
|
return "\t" + this.property + "(" + this.origFrom + " to " + this.origTo + ")\n";
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// return a properly formatted 6-digit hex colour spec, or false
|
// return a properly formatted 6-digit hex colour spec, or false
|
||||||
ColorStyleSubject.parseColor = function(string) {
|
ColorStyleSubject.parseColor = function(string) {
|
||||||
@@ -336,14 +336,14 @@ ColorStyleSubject.parseColor = function(string) {
|
|||||||
return '#' + match[1];
|
return '#' + match[1];
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
};
|
||||||
// convert a number to a 2 digit hex string
|
// convert a number to a 2 digit hex string
|
||||||
ColorStyleSubject.toColorPart = function(number) {
|
ColorStyleSubject.toColorPart = function(number) {
|
||||||
if (number > 255) number = 255;
|
if (number > 255) number = 255;
|
||||||
var digits = number.toString(16);
|
var digits = number.toString(16);
|
||||||
if (number < 16) return '0' + digits;
|
if (number < 16) return '0' + digits;
|
||||||
return digits;
|
return digits;
|
||||||
}
|
};
|
||||||
ColorStyleSubject.parseColor.rgbRe = /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i;
|
ColorStyleSubject.parseColor.rgbRe = /^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/i;
|
||||||
ColorStyleSubject.parseColor.hexRe = /^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
ColorStyleSubject.parseColor.hexRe = /^\#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/;
|
||||||
|
|
||||||
@@ -367,7 +367,7 @@ DiscreteStyleSubject.prototype = {
|
|||||||
inspect: function() {
|
inspect: function() {
|
||||||
return "\t" + this.property + "(" + this.from + " to " + this.to + " @ " + this.threshold + ")\n";
|
return "\t" + this.property + "(" + this.from + " to " + this.to + " @ " + this.threshold + ")\n";
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// animates between two styles defined using CSS.
|
// animates between two styles defined using CSS.
|
||||||
// if style1 and style2 are present, animate between them, if only style1
|
// if style1 and style2 are present, animate between them, if only style1
|
||||||
@@ -482,7 +482,7 @@ CSSStyleSubject.prototype = {
|
|||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
// get the current value of a css property,
|
// get the current value of a css property,
|
||||||
CSSStyleSubject.getStyle = function(el, property){
|
CSSStyleSubject.getStyle = function(el, property){
|
||||||
var style;
|
var style;
|
||||||
@@ -497,7 +497,7 @@ CSSStyleSubject.getStyle = function(el, property){
|
|||||||
style = el.currentStyle[property];
|
style = el.currentStyle[property];
|
||||||
}
|
}
|
||||||
return style || el.style[property]
|
return style || el.style[property]
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
CSSStyleSubject.ruleRe = /^\s*([a-zA-Z\-]+)\s*:\s*(\S(.+\S)?)\s*$/;
|
CSSStyleSubject.ruleRe = /^\s*([a-zA-Z\-]+)\s*:\s*(\S(.+\S)?)\s*$/;
|
||||||
@@ -604,7 +604,7 @@ AnimatorChain.prototype = {
|
|||||||
this.animators[this.current].seekTo(1);
|
this.animators[this.current].seekTo(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
// an Accordion is a class that creates and controls a number of Animators. An array of elements is passed in,
|
// an Accordion is a class that creates and controls a number of Animators. An array of elements is passed in,
|
||||||
// and for each element an Animator and a activator button is created. When an Animator's activator button is
|
// and for each element an Animator and a activator button is created. When an Animator's activator button is
|
||||||
@@ -667,4 +667,4 @@ Accordion.prototype = {
|
|||||||
document.location.hash = this.rememberanceTexts[section];
|
document.location.hash = this.rememberanceTexts[section];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
"http://vmap0.tiles.osgeo.org/wms/vmap0",
|
"http://vmap0.tiles.osgeo.org/wms/vmap0",
|
||||||
{layers: 'basic'}, {'buffer':4} );
|
{layers: 'basic'}, {'buffer':4} );
|
||||||
map.addLayer(layer);
|
map.addLayer(layer);
|
||||||
map.addControl(new OpenLayers.Control.LayerSwitcher())
|
map.addControl(new OpenLayers.Control.LayerSwitcher());
|
||||||
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
|
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
+1
-1
@@ -31,7 +31,7 @@ function updateOutput(event) {
|
|||||||
map.layers[1].events.on({
|
map.layers[1].events.on({
|
||||||
sketchmodified: updateOutput,
|
sketchmodified: updateOutput,
|
||||||
sketchcomplete: updateOutput
|
sketchcomplete: updateOutput
|
||||||
})
|
});
|
||||||
|
|
||||||
// add behavior to UI elements
|
// add behavior to UI elements
|
||||||
function toggleControl(element) {
|
function toggleControl(element) {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ $("insertXY").onclick = function() {
|
|||||||
if (values != null) {
|
if (values != null) {
|
||||||
draw.insertXY(values[0], values[1]);
|
draw.insertXY(values[0], values[1]);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
$("insertDeltaXY").onclick = function() {
|
$("insertDeltaXY").onclick = function() {
|
||||||
var values = parseInput(
|
var values = parseInput(
|
||||||
window.prompt(
|
window.prompt(
|
||||||
@@ -39,7 +39,7 @@ $("insertDeltaXY").onclick = function() {
|
|||||||
if (values != null) {
|
if (values != null) {
|
||||||
draw.insertDeltaXY(values[0], values[1]);
|
draw.insertDeltaXY(values[0], values[1]);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
$("insertDirectionLength").onclick = function() {
|
$("insertDirectionLength").onclick = function() {
|
||||||
var values = parseInput(
|
var values = parseInput(
|
||||||
window.prompt(
|
window.prompt(
|
||||||
@@ -49,7 +49,7 @@ $("insertDirectionLength").onclick = function() {
|
|||||||
if (values != null) {
|
if (values != null) {
|
||||||
draw.insertDirectionLength(values[0], values[1]);
|
draw.insertDirectionLength(values[0], values[1]);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
$("insertDeflectionLength").onclick = function() {
|
$("insertDeflectionLength").onclick = function() {
|
||||||
var values = parseInput(
|
var values = parseInput(
|
||||||
window.prompt(
|
window.prompt(
|
||||||
@@ -59,13 +59,13 @@ $("insertDeflectionLength").onclick = function() {
|
|||||||
if (values != null) {
|
if (values != null) {
|
||||||
draw.insertDeflectionLength(values[0], values[1]);
|
draw.insertDeflectionLength(values[0], values[1]);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
$("cancel").onclick = function() {
|
$("cancel").onclick = function() {
|
||||||
draw.cancel();
|
draw.cancel();
|
||||||
}
|
};
|
||||||
$("finishSketch").onclick = function() {
|
$("finishSketch").onclick = function() {
|
||||||
draw.finishSketch();
|
draw.finishSketch();
|
||||||
}
|
};
|
||||||
|
|
||||||
function parseInput(text) {
|
function parseInput(text) {
|
||||||
var values = text.split(",");
|
var values = text.split(",");
|
||||||
@@ -80,4 +80,4 @@ function parseInput(text) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
}
|
}
|
||||||
.ex_classes{
|
.ex_classes{
|
||||||
font-size: .7em;
|
font-size: .7em;
|
||||||
color: grey;
|
color: gray;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#toc {
|
#toc {
|
||||||
@@ -169,7 +169,7 @@
|
|||||||
var words = text.split(/\W+/);
|
var words = text.split(/\W+/);
|
||||||
var scores = {};
|
var scores = {};
|
||||||
for(var i=0; i<words.length; ++i) {
|
for(var i=0; i<words.length; ++i) {
|
||||||
var word = words[i].toLowerCase()
|
var word = words[i].toLowerCase();
|
||||||
var dict = info.index[word];
|
var dict = info.index[word];
|
||||||
var updateScores = function() {
|
var updateScores = function() {
|
||||||
for(exIndex in dict) {
|
for(exIndex in dict) {
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
scores[exIndex][word] = count;
|
scores[exIndex][word] = count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
if(dict) {
|
if(dict) {
|
||||||
updateScores();
|
updateScores();
|
||||||
} else {
|
} else {
|
||||||
@@ -255,7 +255,7 @@
|
|||||||
template = new jugl.Template("template");
|
template = new jugl.Template("template");
|
||||||
target = document.getElementById("examples");
|
target = document.getElementById("examples");
|
||||||
listExamples(info.examples);
|
listExamples(info.examples);
|
||||||
document.getElementById("keywords").onkeyup = inputChange
|
document.getElementById("keywords").onkeyup = inputChange;
|
||||||
parseQuery();
|
parseQuery();
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ function startAnimation() {
|
|||||||
} else {
|
} else {
|
||||||
stopAnimation(true);
|
stopAnimation(true);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
animationTimer = window.setInterval(next, interval * 1000);
|
animationTimer = window.setInterval(next, interval * 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
<div id="shortdesc">Simple acceleration demo; roll a vector feature around
|
<div id="shortdesc">Simple acceleration demo; roll a vector feature around
|
||||||
on a map. (Only tested on iOS 4.)</div>
|
on a map. (Only tested on iOS 4.)</div>
|
||||||
|
|
||||||
<div id="map" width="100%" height="100%" style="background-color: grey"></div>
|
<div id="map" width="100%" height="100%" style="background-color: gray"></div>
|
||||||
<div id="docs">
|
<div id="docs">
|
||||||
<p>Demo works best when device is locked in portrait mode.</p>
|
<p>Demo works best when device is locked in portrait mode.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
},
|
},
|
||||||
queryVisible: true
|
queryVisible: true
|
||||||
})
|
})
|
||||||
}
|
};
|
||||||
|
|
||||||
map.addLayers([political, roads, cities, water, highlightLayer]);
|
map.addLayers([political, roads, cities, water, highlightLayer]);
|
||||||
for (var i in infoControls) {
|
for (var i in infoControls) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
options = {maxExtent: new OpenLayers.Bounds(-73.5295, 41.2318,
|
options = {maxExtent: new OpenLayers.Bounds(-73.5295, 41.2318,
|
||||||
-69.9097, 42.8883),
|
-69.9097, 42.8883),
|
||||||
maxResolution: 0.0003}
|
maxResolution: 0.0003};
|
||||||
map = new OpenLayers.Map('map', options);
|
map = new OpenLayers.Map('map', options);
|
||||||
var roads15 = new OpenLayers.Layer.WMS( "Roads (15px gutter)",
|
var roads15 = new OpenLayers.Layer.WMS( "Roads (15px gutter)",
|
||||||
"http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/boston/map/gmaps.map&",
|
"http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/boston/map/gmaps.map&",
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
layer.logEvent = function(event) {
|
layer.logEvent = function(event) {
|
||||||
eventsLog.innerHTML += "<br>(" + getTimeStamp() + ") " +
|
eventsLog.innerHTML += "<br>(" + getTimeStamp() + ") " +
|
||||||
this.name + ": " + event;
|
this.name + ": " + event;
|
||||||
}
|
};
|
||||||
|
|
||||||
layer.events.register("loadstart", layer, function() {
|
layer.events.register("loadstart", layer, function() {
|
||||||
this.logEvent("Load Start");
|
this.logEvent("Load Start");
|
||||||
|
|||||||
@@ -54,10 +54,10 @@
|
|||||||
var params = {
|
var params = {
|
||||||
mapdefinition: 'Library://Samples/Sheboygan/MapsTiled/Sheboygan.MapDefinition',
|
mapdefinition: 'Library://Samples/Sheboygan/MapsTiled/Sheboygan.MapDefinition',
|
||||||
basemaplayergroupname: "Base Layer Group"
|
basemaplayergroupname: "Base Layer Group"
|
||||||
}
|
};
|
||||||
var options = {
|
var options = {
|
||||||
singleTile: false
|
singleTile: false
|
||||||
}
|
};
|
||||||
var layer = new OpenLayers.Layer.MapGuide( "MapGuide OS tiled layer", url, params, options );
|
var layer = new OpenLayers.Layer.MapGuide( "MapGuide OS tiled layer", url, params, options );
|
||||||
map.addLayer(layer);
|
map.addLayer(layer);
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ $(document).ready(function() {
|
|||||||
content.height(contentHeight);
|
content.height(contentHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.map) {
|
if (window.map && window.map instanceof OpenLayers.Map) {
|
||||||
map.updateSize();
|
map.updateSize();
|
||||||
} else {
|
} else {
|
||||||
// initialize map
|
// initialize map
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ function init() {
|
|||||||
"http://vmap0.tiles.osgeo.org/wms/vmap0",
|
"http://vmap0.tiles.osgeo.org/wms/vmap0",
|
||||||
{layers: 'basic'},
|
{layers: 'basic'},
|
||||||
{isBaseLayer: true, transitionEffect: 'resize'}
|
{isBaseLayer: true, transitionEffect: 'resize'}
|
||||||
)
|
);
|
||||||
|
|
||||||
var kml = new OpenLayers.Layer.Vector("KML", {
|
var kml = new OpenLayers.Layer.Vector("KML", {
|
||||||
projection: map.displayProjection,
|
projection: map.displayProjection,
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ function runMVS() {
|
|||||||
|
|
||||||
// ----
|
// ----
|
||||||
// TODO: Handle all this parsing better.
|
// TODO: Handle all this parsing better.
|
||||||
var safeArgs = {}
|
var safeArgs = {};
|
||||||
|
|
||||||
var DEFAULT_LAT = 0;
|
var DEFAULT_LAT = 0;
|
||||||
var DEFAULT_LON = 0;
|
var DEFAULT_LON = 0;
|
||||||
|
|||||||
@@ -100,7 +100,7 @@
|
|||||||
graphicZIndex: useFirst ? FIRST_RED_Z_INDEX : SECOND_RED_Z_INDEX,
|
graphicZIndex: useFirst ? FIRST_RED_Z_INDEX : SECOND_RED_Z_INDEX,
|
||||||
externalGraphic: "../img/marker.png",
|
externalGraphic: "../img/marker.png",
|
||||||
pointRadius: 10
|
pointRadius: 10
|
||||||
}
|
};
|
||||||
|
|
||||||
indexFeatures.push(
|
indexFeatures.push(
|
||||||
point
|
point
|
||||||
|
|||||||
@@ -95,9 +95,9 @@
|
|||||||
} else {
|
} else {
|
||||||
gml = new OpenLayers.Layer.GML("OSM", "xml/cambridgeport.osm", {format: OpenLayers.Format.OSM});
|
gml = new OpenLayers.Layer.GML("OSM", "xml/cambridgeport.osm", {format: OpenLayers.Format.OSM});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gml.events.register("loadstart", null, function() { $("status").innerHTML = "Loading..."; })
|
gml.events.register("loadstart", null, function() { $("status").innerHTML = "Loading..."; });
|
||||||
gml.events.register("loadend", null, function() { $("status").innerHTML = ""; })
|
gml.events.register("loadend", null, function() { $("status").innerHTML = ""; });
|
||||||
map.addLayer(gml);
|
map.addLayer(gml);
|
||||||
gml.preFeatureInsert = style_osm_feature;
|
gml.preFeatureInsert = style_osm_feature;
|
||||||
var sf = new OpenLayers.Control.SelectFeature(gml, {'onSelect': on_feature_hover});
|
var sf = new OpenLayers.Control.SelectFeature(gml, {'onSelect': on_feature_hover});
|
||||||
|
|||||||
@@ -108,7 +108,7 @@
|
|||||||
20037508.34, 20037508.34)
|
20037508.34, 20037508.34)
|
||||||
}),
|
}),
|
||||||
layers: [jplOverview]
|
layers: [jplOverview]
|
||||||
}
|
};
|
||||||
var overview2 = new OpenLayers.Control.OverviewMap(controlOptions);
|
var overview2 = new OpenLayers.Control.OverviewMap(controlOptions);
|
||||||
map2.addControl(overview2);
|
map2.addControl(overview2);
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ var rotation = document.getElementById("rotation");
|
|||||||
rotation.value = String(points.rotation);
|
rotation.value = String(points.rotation);
|
||||||
rotation.onchange = function() {
|
rotation.onchange = function() {
|
||||||
points.setRotation(Number(rotation.value));
|
points.setRotation(Number(rotation.value));
|
||||||
}
|
};
|
||||||
|
|
||||||
var dx = document.getElementById("dx");
|
var dx = document.getElementById("dx");
|
||||||
var dy = document.getElementById("dy");
|
var dy = document.getElementById("dy");
|
||||||
@@ -21,13 +21,13 @@ dx.value = String(points.dx);
|
|||||||
dy.value = String(points.dy);
|
dy.value = String(points.dy);
|
||||||
dx.onchange = function() {
|
dx.onchange = function() {
|
||||||
points.setSpacing(Number(dx.value), Number(dy.value));
|
points.setSpacing(Number(dx.value), Number(dy.value));
|
||||||
}
|
};
|
||||||
dy.onchange = function() {
|
dy.onchange = function() {
|
||||||
points.setSpacing(Number(dx.value), Number(dy.value));
|
points.setSpacing(Number(dx.value), Number(dy.value));
|
||||||
}
|
};
|
||||||
|
|
||||||
var max = document.getElementById("max");
|
var max = document.getElementById("max");
|
||||||
max.value = String(points.maxFeatures);
|
max.value = String(points.maxFeatures);
|
||||||
max.onchange = function() {
|
max.onchange = function() {
|
||||||
points.setMaxFeatures(Number(max.value));
|
points.setMaxFeatures(Number(max.value));
|
||||||
}
|
};
|
||||||
|
|||||||
+56
-56
@@ -163,25 +163,25 @@
|
|||||||
//anchored popup bigger contents autosize
|
//anchored popup bigger contents autosize
|
||||||
ll = new OpenLayers.LonLat(5,20);
|
ll = new OpenLayers.LonLat(5,20);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored popup bigger contents autosize closebox
|
//anchored popup bigger contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(10,20);
|
ll = new OpenLayers.LonLat(10,20);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
//anchored popup wide short text contents autosize
|
//anchored popup wide short text contents autosize
|
||||||
ll = new OpenLayers.LonLat(20,20);
|
ll = new OpenLayers.LonLat(20,20);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored popup wide short text contents autosize closebox
|
//anchored popup wide short text contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(25,20);
|
ll = new OpenLayers.LonLat(25,20);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
|
|
||||||
@@ -214,13 +214,13 @@
|
|||||||
//anchored popup wide long fixed contents autosize
|
//anchored popup wide long fixed contents autosize
|
||||||
ll = new OpenLayers.LonLat(65,20);
|
ll = new OpenLayers.LonLat(65,20);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored popup wide long fixed contents autosize closebox
|
//anchored popup wide long fixed contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(70,20);
|
ll = new OpenLayers.LonLat(70,20);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -282,64 +282,64 @@
|
|||||||
//anchored popup bigger contents autosize overflow
|
//anchored popup bigger contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(5,15);
|
ll = new OpenLayers.LonLat(5,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored popup bigger contents autosize closebox overflow
|
//anchored popup bigger contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(10,15);
|
ll = new OpenLayers.LonLat(10,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored popup wide short text contents autosize overflow
|
//anchored popup wide short text contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(20,15);
|
ll = new OpenLayers.LonLat(20,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored popup wide short text contents autosize closebox overflow
|
//anchored popup wide short text contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(25,15);
|
ll = new OpenLayers.LonLat(25,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.Anchored<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
//anchored popup wide short fixed contents autosize overflow
|
//anchored popup wide short fixed contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(35,15);
|
ll = new OpenLayers.LonLat(35,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored popup wide short fixed contents autosize closebox overflow
|
//anchored popup wide short fixed contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(40,15);
|
ll = new OpenLayers.LonLat(40,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored popup thin long fixed contents autosize overflow
|
//anchored popup thin long fixed contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(50,15);
|
ll = new OpenLayers.LonLat(50,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored popup thin long fixed contents autosize closebox overflow
|
//anchored popup thin long fixed contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(55,15);
|
ll = new OpenLayers.LonLat(55,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored popup wide long fixed contents autosize overflow
|
//anchored popup wide long fixed contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(65,15);
|
ll = new OpenLayers.LonLat(65,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored popup wide long fixed contents autosize closebox overflow
|
//anchored popup wide long fixed contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(70,15);
|
ll = new OpenLayers.LonLat(70,15);
|
||||||
popupClass = AutoSizeAnchored;
|
popupClass = AutoSizeAnchored;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
@@ -402,65 +402,65 @@
|
|||||||
//anchored bubble popup bigger contents autosize closebox
|
//anchored bubble popup bigger contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(5,5);
|
ll = new OpenLayers.LonLat(5,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false);
|
addMarker(ll, popupClass, popupContentHTML, false);
|
||||||
|
|
||||||
//anchored bubble popup bigger contents autosize closebox
|
//anchored bubble popup bigger contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(10,5);
|
ll = new OpenLayers.LonLat(10,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide short text contents autosize
|
//anchored bubble popup wide short text contents autosize
|
||||||
ll = new OpenLayers.LonLat(20,5);
|
ll = new OpenLayers.LonLat(20,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored bubble popup wide short text contents autosize closebox
|
//anchored bubble popup wide short text contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(25,5);
|
ll = new OpenLayers.LonLat(25,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide short fixed contents autosize
|
//anchored bubble popup wide short fixed contents autosize
|
||||||
ll = new OpenLayers.LonLat(35,5);
|
ll = new OpenLayers.LonLat(35,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored bubble popup wide short fixed contents autosize closebox
|
//anchored bubble popup wide short fixed contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(40,5);
|
ll = new OpenLayers.LonLat(40,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup thin long fixed contents autosize
|
//anchored bubble popup thin long fixed contents autosize
|
||||||
ll = new OpenLayers.LonLat(50,5);
|
ll = new OpenLayers.LonLat(50,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored bubble popup thin long fixed contents autosize closebox
|
//anchored bubble popup thin long fixed contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(55,5);
|
ll = new OpenLayers.LonLat(55,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide long fixed contents autosize
|
//anchored bubble popup wide long fixed contents autosize
|
||||||
ll = new OpenLayers.LonLat(65,5);
|
ll = new OpenLayers.LonLat(65,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored bubble popup wide long fixed contents autosize closebox
|
//anchored bubble popup wide long fixed contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(70,5);
|
ll = new OpenLayers.LonLat(70,5);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -522,65 +522,65 @@
|
|||||||
//anchored bubble popup bigger contents autosize closebox
|
//anchored bubble popup bigger contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(5,0);
|
ll = new OpenLayers.LonLat(5,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup bigger contents autosize closebox
|
//anchored bubble popup bigger contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(10,0);
|
ll = new OpenLayers.LonLat(10,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide short contents autosize overflow
|
//anchored bubble popup wide short contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(20,0);
|
ll = new OpenLayers.LonLat(20,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup wide short contents autosize closebox overflow
|
//anchored bubble popup wide short contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(25,0);
|
ll = new OpenLayers.LonLat(25,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.AnchoredBubble<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide short fixed contents autosize overflow
|
//anchored bubble popup wide short fixed contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(35,0);
|
ll = new OpenLayers.LonLat(35,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup wide short fixed contents autosize closebox overflow
|
//anchored bubble popup wide short fixed contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(40,0);
|
ll = new OpenLayers.LonLat(40,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup thin long fixed contents autosize overflow
|
//anchored bubble popup thin long fixed contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(50,0);
|
ll = new OpenLayers.LonLat(50,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup thin long fixed contents autosize closebox overflow
|
//anchored bubble popup thin long fixed contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(55,0);
|
ll = new OpenLayers.LonLat(55,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide long fixed contents autosize overflow
|
//anchored bubble popup wide long fixed contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(65,0);
|
ll = new OpenLayers.LonLat(65,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup wide long fixed contents autosize closebox overflow
|
//anchored bubble popup wide long fixed contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(70,0);
|
ll = new OpenLayers.LonLat(70,0);
|
||||||
popupClass = AutoSizeAnchoredBubble;
|
popupClass = AutoSizeAnchoredBubble;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
//FRAMED
|
//FRAMED
|
||||||
@@ -644,65 +644,65 @@
|
|||||||
//anchored bubble popup bigger contents autosize closebox
|
//anchored bubble popup bigger contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(5,-15);
|
ll = new OpenLayers.LonLat(5,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false);
|
addMarker(ll, popupClass, popupContentHTML, false);
|
||||||
|
|
||||||
//anchored bubble popup bigger contents autosize closebox
|
//anchored bubble popup bigger contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(10,-15);
|
ll = new OpenLayers.LonLat(10,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide short text contents autosize
|
//anchored bubble popup wide short text contents autosize
|
||||||
ll = new OpenLayers.LonLat(20,-15);
|
ll = new OpenLayers.LonLat(20,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored bubble popup wide short text contents autosize closebox
|
//anchored bubble popup wide short text contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(25,-15);
|
ll = new OpenLayers.LonLat(25,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize - wide short text<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide short fixed contents autosize
|
//anchored bubble popup wide short fixed contents autosize
|
||||||
ll = new OpenLayers.LonLat(35,-15);
|
ll = new OpenLayers.LonLat(35,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored bubble popup wide short fixed contents autosize closebox
|
//anchored bubble popup wide short fixed contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(40,-15);
|
ll = new OpenLayers.LonLat(40,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup thin long fixed contents autosize
|
//anchored bubble popup thin long fixed contents autosize
|
||||||
ll = new OpenLayers.LonLat(50,-15);
|
ll = new OpenLayers.LonLat(50,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored bubble popup thin long fixed contents autosize closebox
|
//anchored bubble popup thin long fixed contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(55,-15);
|
ll = new OpenLayers.LonLat(55,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide long fixed contents autosize
|
//anchored bubble popup wide long fixed contents autosize
|
||||||
ll = new OpenLayers.LonLat(65,-15);
|
ll = new OpenLayers.LonLat(65,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML);
|
addMarker(ll, popupClass, popupContentHTML);
|
||||||
|
|
||||||
//anchored bubble popup wide long fixed contents autosize closebox
|
//anchored bubble popup wide long fixed contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(70,-15);
|
ll = new OpenLayers.LonLat(70,-15);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true);
|
addMarker(ll, popupClass, popupContentHTML, true);
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -764,65 +764,65 @@
|
|||||||
//anchored bubble popup bigger contents autosize closebox
|
//anchored bubble popup bigger contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(5,-20);
|
ll = new OpenLayers.LonLat(5,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup bigger contents autosize closebox
|
//anchored bubble popup bigger contents autosize closebox
|
||||||
ll = new OpenLayers.LonLat(10,-20);
|
ll = new OpenLayers.LonLat(10,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>closebox<br>overflow<br>' + samplePopupContentsHTML + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide short contents autosize overflow
|
//anchored bubble popup wide short contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(20,-20);
|
ll = new OpenLayers.LonLat(20,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup wide short contents autosize closebox overflow
|
//anchored bubble popup wide short contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(25,-20);
|
ll = new OpenLayers.LonLat(25,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>'
|
popupContentHTML = '<div style="background-color:red;">Popup.FramedCloud<br>autosize<br>overflow<br>closebox<br>' + samplePopupContentsHTML_WideShort + '</div>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide short fixed contents autosize overflow
|
//anchored bubble popup wide short fixed contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(35,-20);
|
ll = new OpenLayers.LonLat(35,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup wide short fixed contents autosize closebox overflow
|
//anchored bubble popup wide short fixed contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(40,-20);
|
ll = new OpenLayers.LonLat(40,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/wideshort.jpg"></img>'
|
popupContentHTML = '<img src="img/wideshort.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup thin long fixed contents autosize overflow
|
//anchored bubble popup thin long fixed contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(50,-20);
|
ll = new OpenLayers.LonLat(50,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup thin long fixed contents autosize closebox overflow
|
//anchored bubble popup thin long fixed contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(55,-20);
|
ll = new OpenLayers.LonLat(55,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/thinlong.jpg"></img>'
|
popupContentHTML = '<img src="img/thinlong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
//anchored bubble popup wide long fixed contents autosize overflow
|
//anchored bubble popup wide long fixed contents autosize overflow
|
||||||
ll = new OpenLayers.LonLat(65,-20);
|
ll = new OpenLayers.LonLat(65,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, false, true);
|
addMarker(ll, popupClass, popupContentHTML, false, true);
|
||||||
|
|
||||||
//anchored bubble popup wide long fixed contents autosize closebox overflow
|
//anchored bubble popup wide long fixed contents autosize closebox overflow
|
||||||
ll = new OpenLayers.LonLat(70,-20);
|
ll = new OpenLayers.LonLat(70,-20);
|
||||||
popupClass = AutoSizeFramedCloud;
|
popupClass = AutoSizeFramedCloud;
|
||||||
popupContentHTML = '<img src="img/widelong.jpg"></img>'
|
popupContentHTML = '<img src="img/widelong.jpg"></img>';
|
||||||
addMarker(ll, popupClass, popupContentHTML, true, true);
|
addMarker(ll, popupClass, popupContentHTML, true, true);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
<div style="background-color:green" onclick="addMarker()"> click to add a Marker with an AnchoredBubble popup</div>
|
<div style="background-color:green" onclick="addMarker()"> click to add a Marker with an AnchoredBubble popup</div>
|
||||||
<div style="background-color:blue" onclick="changer()"> click to modify popup's attributes</div>
|
<div style="background-color:blue" onclick="changer()"> click to modify popup's attributes</div>
|
||||||
<div style="background-color:red" onclick="remove()"> click to remove the popup from map</div>
|
<div style="background-color:red" onclick="remove()"> click to remove the popup from map</div>
|
||||||
<div style="background-color:grey" onclick="removelayer()"> click to remove the markers layer</div>
|
<div style="background-color:gray" onclick="removelayer()"> click to remove the markers layer</div>
|
||||||
<div style="background-color:orange" onclick="alert(marker.onScreen())"> marker.onscreen()?</div>
|
<div style="background-color:orange" onclick="alert(marker.onScreen())"> marker.onscreen()?</div>
|
||||||
<div style="background-color:yellow" onclick="destroy()"> click to destroy the popup from map</div>
|
<div style="background-color:yellow" onclick="destroy()"> click to destroy the popup from map</div>
|
||||||
<div id="docs">
|
<div id="docs">
|
||||||
|
|||||||
@@ -179,7 +179,7 @@
|
|||||||
error = true;
|
error = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
modify.selectControl.unselectAll()
|
modify.selectControl.unselectAll();
|
||||||
|
|
||||||
if (resp.reqFeatures) {
|
if (resp.reqFeatures) {
|
||||||
vector.destroyFeatures(resp.reqFeatures);
|
vector.destroyFeatures(resp.reqFeatures);
|
||||||
@@ -214,7 +214,7 @@
|
|||||||
}
|
}
|
||||||
var feature = vector.selectedFeatures[0];
|
var feature = vector.selectedFeatures[0];
|
||||||
if (feature) {
|
if (feature) {
|
||||||
modify.selectControl.unselectAll()
|
modify.selectControl.unselectAll();
|
||||||
feature.state = OpenLayers.State.DELETE;
|
feature.state = OpenLayers.State.DELETE;
|
||||||
displayStatus();
|
displayStatus();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
function init() {
|
function init() {
|
||||||
var options = {
|
var options = {
|
||||||
restrictedExtent: extent
|
restrictedExtent: extent
|
||||||
}
|
};
|
||||||
map = new OpenLayers.Map('map', options);
|
map = new OpenLayers.Map('map', options);
|
||||||
|
|
||||||
var wms = new OpenLayers.Layer.WMS(
|
var wms = new OpenLayers.Layer.WMS(
|
||||||
@@ -74,4 +74,4 @@
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -66,16 +66,16 @@ var rotation = document.getElementById("rotation");
|
|||||||
rotation.value = String(points.rotation);
|
rotation.value = String(points.rotation);
|
||||||
rotation.onchange = function() {
|
rotation.onchange = function() {
|
||||||
points.setRotation(Number(rotation.value));
|
points.setRotation(Number(rotation.value));
|
||||||
}
|
};
|
||||||
|
|
||||||
var spacing = document.getElementById("spacing");
|
var spacing = document.getElementById("spacing");
|
||||||
spacing.value = String(points.dx);
|
spacing.value = String(points.dx);
|
||||||
spacing.onchange = function() {
|
spacing.onchange = function() {
|
||||||
points.setSpacing(Number(spacing.value));
|
points.setSpacing(Number(spacing.value));
|
||||||
}
|
};
|
||||||
|
|
||||||
var max = document.getElementById("max");
|
var max = document.getElementById("max");
|
||||||
max.value = String(points.maxFeatures);
|
max.value = String(points.maxFeatures);
|
||||||
max.onchange = function() {
|
max.onchange = function() {
|
||||||
points.setMaxFeatures(Number(max.value));
|
points.setMaxFeatures(Number(max.value));
|
||||||
}
|
};
|
||||||
|
|||||||
@@ -208,7 +208,7 @@
|
|||||||
sel.value = "poly";
|
sel.value = "poly";
|
||||||
sel.onchange = function() {
|
sel.onchange = function() {
|
||||||
updateEditable(sel.value);
|
updateEditable(sel.value);
|
||||||
}
|
};
|
||||||
|
|
||||||
var target, type, tog, tol;
|
var target, type, tog, tol;
|
||||||
var types = ["node", "vertex", "edge"];
|
var types = ["node", "vertex", "edge"];
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
right: 80px;
|
right: 80px;
|
||||||
}
|
}
|
||||||
#photos ul li {
|
#photos ul li {
|
||||||
padding 10px;
|
padding: 10px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
display: inline;
|
display: inline;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
div.olControlZoomPanel {
|
div.olControlZoomPanel {
|
||||||
height: 108px
|
height: 108px;
|
||||||
width: 36px;
|
width: 36px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
0: {externalGraphic: "../img/marker-blue.png"},
|
0: {externalGraphic: "../img/marker-blue.png"},
|
||||||
1: {externalGraphic: "../img/marker-green.png"},
|
1: {externalGraphic: "../img/marker-green.png"},
|
||||||
2: {externalGraphic: "../img/marker-gold.png"}
|
2: {externalGraphic: "../img/marker-gold.png"}
|
||||||
}
|
};
|
||||||
|
|
||||||
// add rules from the above lookup table, with the keyes mapped to
|
// add rules from the above lookup table, with the keyes mapped to
|
||||||
// the "type" property of the features, for the "default" intent
|
// the "type" property of the features, for the "default" intent
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
var context = function(feature) {
|
var context = function(feature) {
|
||||||
return feature;
|
return feature;
|
||||||
}
|
};
|
||||||
var styleMap = new OpenLayers.StyleMap();
|
var styleMap = new OpenLayers.StyleMap();
|
||||||
|
|
||||||
// create a lookup table with different symbolizers for the different
|
// create a lookup table with different symbolizers for the different
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ function init() {
|
|||||||
alert("Trouble getting capabilities doc");
|
alert("Trouble getting capabilities doc");
|
||||||
OpenLayers.Console.error.apply(OpenLayers.Console, arguments);
|
OpenLayers.Console.error.apply(OpenLayers.Console, arguments);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
map = new OpenLayers.Map({
|
map = new OpenLayers.Map({
|
||||||
div: "map",
|
div: "map",
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var map, layer;
|
var map, layer;
|
||||||
function init(){
|
function init(){
|
||||||
var layerExtent = new OpenLayers.Bounds( -13758743.4295939, 5591455.28887228, -13531302.3472101 , 5757360.4178881)
|
var layerExtent = new OpenLayers.Bounds( -13758743.4295939, 5591455.28887228, -13531302.3472101 , 5757360.4178881);
|
||||||
map = new OpenLayers.Map( 'map', {'restrictedExtent': layerExtent} );
|
map = new OpenLayers.Map( 'map', {'restrictedExtent': layerExtent} );
|
||||||
layer = new OpenLayers.Layer.XYZ( "ESRI",
|
layer = new OpenLayers.Layer.XYZ( "ESRI",
|
||||||
"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/ESRI_LandBase_WebMercator/MapServer/tile/${z}/${y}/${x}",
|
"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/ESRI_LandBase_WebMercator/MapServer/tile/${z}/${y}/${x}",
|
||||||
|
|||||||
@@ -1,38 +0,0 @@
|
|||||||
<!DOCTYPE HTML>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
||||||
<title>OpenLayers XYZ with Offset</title>
|
|
||||||
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
|
|
||||||
<link rel="stylesheet" href="style.css" type="text/css">
|
|
||||||
<script src="../lib/OpenLayers.js"></script>
|
|
||||||
<script src="xyz-offset.js"></script>
|
|
||||||
</head>
|
|
||||||
<body onload="init()">
|
|
||||||
<h1 id="title">XYZ Layer with Offset</h1>
|
|
||||||
<div id="tags">
|
|
||||||
XYZ, layer, tile
|
|
||||||
</div>
|
|
||||||
<div id="shortdesc">Using a limited set of levels from an XYZ layer with zoomOffset.</div>
|
|
||||||
|
|
||||||
<div id="map" class="smallmap"></div>
|
|
||||||
|
|
||||||
<div id="docs">
|
|
||||||
<p>
|
|
||||||
The XYZ layer allows a zoomOffset to be set if you want to have
|
|
||||||
a maximum resolution for the map that differs from the maxiumum
|
|
||||||
resolution of the cached tiles. This example uses only 6 of the
|
|
||||||
levels in the cache, starting with the ninth level (index of 8)
|
|
||||||
in the cache. To do this, the layer is constructed with a
|
|
||||||
zoomOffset of 8. When the map zoom level is zero, the level
|
|
||||||
with index 8 will be requested from the cache.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
See the <a href="xyz-offset.js" target="_blank">
|
|
||||||
xyz-offset.js source</a> to see how this is done.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
var map, layer;
|
|
||||||
|
|
||||||
// called on body load
|
|
||||||
function init() {
|
|
||||||
|
|
||||||
var extent = new OpenLayers.Bounds(
|
|
||||||
-13758743.4295939, 5591455.28887228, -13531302.3472101 , 5757360.4178881
|
|
||||||
);
|
|
||||||
|
|
||||||
map = new OpenLayers.Map({
|
|
||||||
div: "map",
|
|
||||||
maxExtent: new OpenLayers.Bounds(
|
|
||||||
-128 * 156543.0339, -128 * 156543.0339,
|
|
||||||
128 * 156543.0339, 128 * 156543.0339
|
|
||||||
),
|
|
||||||
restrictedExtent: extent,
|
|
||||||
maxResolution: 611.496226171875, // corresponds to level 8 in the cache
|
|
||||||
numZoomLevels: 6,
|
|
||||||
projection: new OpenLayers.Projection("EPSG:900913"),
|
|
||||||
units: "m",
|
|
||||||
layers: [
|
|
||||||
new OpenLayers.Layer.XYZ(
|
|
||||||
"ESRI",
|
|
||||||
"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/ESRI_LandBase_WebMercator/MapServer/tile/${z}/${y}/${x}",
|
|
||||||
{zoomOffset: 8} // since our map maxResolution differs from cache max resolution
|
|
||||||
)
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
map.zoomToExtent(extent);
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -208,7 +208,7 @@ if (!window.console || !console.firebug) { (function()
|
|||||||
consoleBody = doc.getElementById("log");
|
consoleBody = doc.getElementById("log");
|
||||||
layout();
|
layout();
|
||||||
flush();
|
flush();
|
||||||
}
|
};
|
||||||
|
|
||||||
var baseURL = getFirebugURL();
|
var baseURL = getFirebugURL();
|
||||||
|
|
||||||
|
|||||||
@@ -210,35 +210,6 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: activate
|
|
||||||
* Activates the control.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {Boolean} The control was effectively activated.
|
|
||||||
*/
|
|
||||||
activate: function () {
|
|
||||||
if (!this.active) {
|
|
||||||
this.handler.activate();
|
|
||||||
}
|
|
||||||
return OpenLayers.Control.prototype.activate.apply(
|
|
||||||
this, arguments
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Method: deactivate
|
|
||||||
* Deactivates the control.
|
|
||||||
*
|
|
||||||
* Returns:
|
|
||||||
* {Boolean} The control was effectively deactivated.
|
|
||||||
*/
|
|
||||||
deactivate: function () {
|
|
||||||
return OpenLayers.Control.prototype.deactivate.apply(
|
|
||||||
this, arguments
|
|
||||||
);
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: getInfoForClick
|
* Method: getInfoForClick
|
||||||
* Called on click
|
* Called on click
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ OpenLayers.Format.Context = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC,
|
|||||||
keywords: context.keywords,
|
keywords: context.keywords,
|
||||||
logo: context.logo,
|
logo: context.logo,
|
||||||
descriptionURL: context.descriptionURL
|
descriptionURL: context.descriptionURL
|
||||||
}
|
};
|
||||||
|
|
||||||
options.metadata = metadata;
|
options.metadata = metadata;
|
||||||
|
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
"Filter": function(filter) {
|
"Filter": function(filter) {
|
||||||
var node = this.createElementNSPlus("ogc:Filter");
|
var node = this.createElementNSPlus("ogc:Filter");
|
||||||
if (filter.type === "FID") {
|
if (filter.type === "FID") {
|
||||||
this.writeFeatureIdNodes(filter, node);
|
OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, filter, node);
|
||||||
} else {
|
} else {
|
||||||
this.writeNode(this.getFilterType(filter), filter, node);
|
this.writeNode(this.getFilterType(filter), filter, node);
|
||||||
}
|
}
|
||||||
@@ -314,7 +314,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
for (var i=0, ii=filter.filters.length; i<ii; ++i) {
|
for (var i=0, ii=filter.filters.length; i<ii; ++i) {
|
||||||
childFilter = filter.filters[i];
|
childFilter = filter.filters[i];
|
||||||
if (childFilter.type === "FID") {
|
if (childFilter.type === "FID") {
|
||||||
this.writeFeatureIdNodes(childFilter, node);
|
OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, childFilter, node);
|
||||||
} else {
|
} else {
|
||||||
this.writeNode(
|
this.writeNode(
|
||||||
this.getFilterType(childFilter), childFilter, node
|
this.getFilterType(childFilter), childFilter, node
|
||||||
@@ -329,7 +329,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
for (var i=0, ii=filter.filters.length; i<ii; ++i) {
|
for (var i=0, ii=filter.filters.length; i<ii; ++i) {
|
||||||
childFilter = filter.filters[i];
|
childFilter = filter.filters[i];
|
||||||
if (childFilter.type === "FID") {
|
if (childFilter.type === "FID") {
|
||||||
this.writeFeatureIdNodes(childFilter, node);
|
OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, childFilter, node);
|
||||||
} else {
|
} else {
|
||||||
this.writeNode(
|
this.writeNode(
|
||||||
this.getFilterType(childFilter), childFilter, node
|
this.getFilterType(childFilter), childFilter, node
|
||||||
@@ -342,7 +342,7 @@ OpenLayers.Format.Filter.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
var node = this.createElementNSPlus("ogc:Not");
|
var node = this.createElementNSPlus("ogc:Not");
|
||||||
var childFilter = filter.filters[0];
|
var childFilter = filter.filters[0];
|
||||||
if (childFilter.type === "FID") {
|
if (childFilter.type === "FID") {
|
||||||
this.writeFeatureIdNodes(childFilter, node);
|
OpenLayers.Format.Filter.v1.prototype.writeFeatureIdNodes.call(this, childFilter, node);
|
||||||
} else {
|
} else {
|
||||||
this.writeNode(
|
this.writeNode(
|
||||||
this.getFilterType(childFilter), childFilter, node
|
this.getFilterType(childFilter), childFilter, node
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ OpenLayers.Format.WFST.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
setFilterProperty: function(filter) {
|
setFilterProperty: function(filter) {
|
||||||
if(filter.filters) {
|
if(filter.filters) {
|
||||||
for(var i=0, len=filter.filters.length; i<len; ++i) {
|
for(var i=0, len=filter.filters.length; i<len; ++i) {
|
||||||
this.setFilterProperty(filter.filters[i]);
|
OpenLayers.Format.WFST.v1.prototype.setFilterProperty.call(this, filter.filters[i]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(filter instanceof OpenLayers.Filter.Spatial && !filter.property) {
|
if(filter instanceof OpenLayers.Filter.Spatial && !filter.property) {
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(options.filter) {
|
if(options.filter) {
|
||||||
this.setFilterProperty(options.filter);
|
OpenLayers.Format.WFST.v1_1_0.prototype.setFilterProperty.call(this, options.filter);
|
||||||
this.writeNode("ogc:Filter", options.filter, node);
|
this.writeNode("ogc:Filter", options.filter, node);
|
||||||
}
|
}
|
||||||
return node;
|
return node;
|
||||||
|
|||||||
@@ -112,6 +112,7 @@ OpenLayers.Format.WMTSCapabilities.v1_0_0 = OpenLayers.Class(
|
|||||||
var layer = {
|
var layer = {
|
||||||
styles: [],
|
styles: [],
|
||||||
formats: [],
|
formats: [],
|
||||||
|
dimensions: [],
|
||||||
tileMatrixSetLinks: []
|
tileMatrixSetLinks: []
|
||||||
};
|
};
|
||||||
layer.layers = [];
|
layer.layers = [];
|
||||||
@@ -218,7 +219,23 @@ OpenLayers.Format.WMTSCapabilities.v1_0_0 = OpenLayers.Class(
|
|||||||
obj.serviceMetadataUrl = {};
|
obj.serviceMetadataUrl = {};
|
||||||
obj.serviceMetadataUrl.href = node.getAttribute("xlink:href");
|
obj.serviceMetadataUrl.href = node.getAttribute("xlink:href");
|
||||||
// TODO: other attributes of <ServiceMetadataURL> element
|
// TODO: other attributes of <ServiceMetadataURL> element
|
||||||
}
|
},
|
||||||
|
"LegendURL": function(node, obj) {
|
||||||
|
obj.legend = {};
|
||||||
|
obj.legend.href = node.getAttribute("xlink:href");
|
||||||
|
obj.legend.format = node.getAttribute("format");
|
||||||
|
},
|
||||||
|
"Dimension": function(node, obj) {
|
||||||
|
var dimension = {values: []};
|
||||||
|
this.readChildNodes(node, dimension);
|
||||||
|
obj.dimensions.push(dimension);
|
||||||
|
},
|
||||||
|
"Default": function(node, obj) {
|
||||||
|
obj["default"] = this.getChildValue(node);
|
||||||
|
},
|
||||||
|
"Value": function(node, obj) {
|
||||||
|
obj.values.push(this.getChildValue(node));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
|
"ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.readers["ows"]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -242,6 +242,7 @@ OpenLayers.Format.WPSExecute = OpenLayers.Class(OpenLayers.Format.XML, {
|
|||||||
},
|
},
|
||||||
"wcs": OpenLayers.Format.WCSGetCoverage.prototype.writers.wcs,
|
"wcs": OpenLayers.Format.WCSGetCoverage.prototype.writers.wcs,
|
||||||
"wfs": OpenLayers.Format.WFST.v1_1_0.prototype.writers.wfs,
|
"wfs": OpenLayers.Format.WFST.v1_1_0.prototype.writers.wfs,
|
||||||
|
"ogc": OpenLayers.Format.Filter.v1_1_0.prototype.writers.ogc,
|
||||||
"ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.writers.ows
|
"ows": OpenLayers.Format.OWSCommon.v1_1_0.prototype.writers.ows
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -325,15 +325,15 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: getServerResolution
|
* Method: getServerResolution
|
||||||
* Return the server-supported resolution that is the closest to
|
* Return the closest highest server-supported resolution. Throw an
|
||||||
* the resolution passed as a parameter. If no resolution is
|
* exception if none is found in the serverResolutions array.
|
||||||
* passed the map resolution is used.
|
|
||||||
*
|
*
|
||||||
* Parameters:
|
* Parameters:
|
||||||
* resolution - {Number} The base resolution.
|
* resolution - {Number} The base resolution. If undefined the
|
||||||
|
* map resolution is used.
|
||||||
*
|
*
|
||||||
* Returns:
|
* Returns:
|
||||||
* {Number} The closest server supported resolution.
|
* {Number} The closest highest server resolution value.
|
||||||
*/
|
*/
|
||||||
getServerResolution: function(resolution) {
|
getServerResolution: function(resolution) {
|
||||||
resolution = resolution || this.map.getResolution();
|
resolution = resolution || this.map.getResolution();
|
||||||
|
|||||||
@@ -299,11 +299,11 @@ OpenLayers.Map = OpenLayers.Class({
|
|||||||
/**
|
/**
|
||||||
* APIProperty: maxExtent
|
* APIProperty: maxExtent
|
||||||
* {<OpenLayers.Bounds>} The maximum extent for the map. Defaults to the
|
* {<OpenLayers.Bounds>} The maximum extent for the map. Defaults to the
|
||||||
* whole world in decimal degrees
|
* whole world in decimal degrees (-180, -90, 180, 90). Specify a
|
||||||
* (-180, -90, 180, 90). Specify a different
|
* different extent in the map options if you are not using a geographic
|
||||||
* extent in the map options if you are not using a
|
* projection and displaying the whole world. To restrict user panning
|
||||||
* geographic projection and displaying the whole
|
* and zooming of the map, use <restrictedExtent> instead. The value
|
||||||
* world.
|
* for <maxExtent> will change calculations for tile URLs.
|
||||||
*/
|
*/
|
||||||
maxExtent: null,
|
maxExtent: null,
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
|
|||||||
this.translate(this.xOffset, 0);
|
this.translate(this.xOffset, 0);
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
inRange = this.translate(left - this.left + this.xOffset, top - this.top);
|
var inRange = this.translate(left - this.left + this.xOffset, top - this.top);
|
||||||
if (!inRange) {
|
if (!inRange) {
|
||||||
// recenter the coordinate system
|
// recenter the coordinate system
|
||||||
this.setExtent(extent, true);
|
this.setExtent(extent, true);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function test_layers(t) {
|
function test_layers(t) {
|
||||||
t.plan(25);
|
t.plan(37);
|
||||||
var xml = document.getElementById("ogcsample").firstChild.nodeValue;
|
var xml = document.getElementById("ogcsample").firstChild.nodeValue;
|
||||||
var doc = new OpenLayers.Format.XML().read(xml);
|
var doc = new OpenLayers.Format.XML().read(xml);
|
||||||
|
|
||||||
@@ -61,9 +61,12 @@
|
|||||||
t.eq(layer.styles[0].identifier, "DarkBlue", "style 0 identifier is correct");
|
t.eq(layer.styles[0].identifier, "DarkBlue", "style 0 identifier is correct");
|
||||||
t.eq(layer.styles[0].isDefault, true, "style 0 isDefault is correct");
|
t.eq(layer.styles[0].isDefault, true, "style 0 isDefault is correct");
|
||||||
t.eq(layer.styles[0].title, "Dark Blue", "style 0 title is correct");
|
t.eq(layer.styles[0].title, "Dark Blue", "style 0 title is correct");
|
||||||
|
t.eq(layer.styles[0].legend.href, "http://www.miramon.uab.es/wmts/Coastlines/coastlines_darkBlue.png", "style 0 legend href is correct");
|
||||||
|
t.eq(layer.styles[0].legend.format, "image/png", "style 0 legend format is correct");
|
||||||
t.eq(layer.styles[1].identifier, "thickAndRed", "style 1 identifier is correct");
|
t.eq(layer.styles[1].identifier, "thickAndRed", "style 1 identifier is correct");
|
||||||
t.ok(!layer.styles[1].isDefault, "style 1 isDefault is correct");
|
t.ok(!layer.styles[1].isDefault, "style 1 isDefault is correct");
|
||||||
t.eq(layer.styles[1].title, "Thick And Red", "style 1 title is correct");
|
t.eq(layer.styles[1].title, "Thick And Red", "style 1 title is correct");
|
||||||
|
t.eq(layer.styles[1].legend, undefined, "style 1 legend is not set");
|
||||||
//t.eq(layer.styles[1].abstract, "Specify this style if you want your maps to have thick red coastlines. ", "style 1 abstract is correct");
|
//t.eq(layer.styles[1].abstract, "Specify this style if you want your maps to have thick red coastlines. ", "style 1 abstract is correct");
|
||||||
|
|
||||||
t.eq(layer.tileMatrixSetLinks.length, 1, "correct count of tileMatrixSetLinks");
|
t.eq(layer.tileMatrixSetLinks.length, 1, "correct count of tileMatrixSetLinks");
|
||||||
@@ -83,6 +86,17 @@
|
|||||||
t.eq(layer.resourceUrl.FeatureInfo.format, "application/gml+xml; version=3.1", "resourceUrl.FeatureInfo.format is correct");
|
t.eq(layer.resourceUrl.FeatureInfo.format, "application/gml+xml; version=3.1", "resourceUrl.FeatureInfo.format is correct");
|
||||||
t.eq(layer.resourceUrl.FeatureInfo.template, "http://www.example.com/wmts/coastlines/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml",
|
t.eq(layer.resourceUrl.FeatureInfo.template, "http://www.example.com/wmts/coastlines/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml",
|
||||||
"resourceUrl.FeatureInfo.template is correct");
|
"resourceUrl.FeatureInfo.template is correct");
|
||||||
|
|
||||||
|
var dimensions = layer.dimensions;
|
||||||
|
t.eq(dimensions.length, 1, "correct count of dimensions");
|
||||||
|
t.eq(dimensions[0].title, "Time", "first dimension title is correct");
|
||||||
|
t.eq(dimensions[0].abstract, "Monthly datasets", "first dimension abstract is correct");
|
||||||
|
t.eq(dimensions[0].identifier, "TIME", "first dimension identifier is correct");
|
||||||
|
t.eq(dimensions[0]['default'], "default", "first dimension default is correct");
|
||||||
|
t.eq(dimensions[0].values.length, 3, "first dimension has correct count of values");
|
||||||
|
t.eq(dimensions[0].values[0], "2007-05", "first value is correct");
|
||||||
|
t.eq(dimensions[0].values[1], "2007-06", "second value is correct");
|
||||||
|
t.eq(dimensions[0].values[2], "2007-07", "third value is correct");
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_tileMatrixSets(t) {
|
function test_tileMatrixSets(t) {
|
||||||
@@ -271,6 +285,7 @@ http://schemas.opengis.net/wmts/1.0/examples/wmtsGetCapabilities_response.xml
|
|||||||
<Value>2007-05</Value>
|
<Value>2007-05</Value>
|
||||||
<Value>2007-06</Value>
|
<Value>2007-06</Value>
|
||||||
<Value>2007-07</Value>
|
<Value>2007-07</Value>
|
||||||
|
<Default>default</Default>
|
||||||
</Dimension>
|
</Dimension>
|
||||||
<TileMatrixSetLink>
|
<TileMatrixSetLink>
|
||||||
<TileMatrixSet>BigWorld</TileMatrixSet>
|
<TileMatrixSet>BigWorld</TileMatrixSet>
|
||||||
|
|||||||
@@ -458,6 +458,65 @@
|
|||||||
t.xml_eq(result, expected, "WPS Execute written out correctly");
|
t.xml_eq(result, expected, "WPS Execute written out correctly");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function test_write_WPSExecuteFID(t) {
|
||||||
|
t.plan(1);
|
||||||
|
|
||||||
|
var result,
|
||||||
|
expected,
|
||||||
|
format = ({geometryName: 'the_geom'});
|
||||||
|
|
||||||
|
expected = '<?xml version="1.0" encoding="UTF-8"?>' +
|
||||||
|
'<wps:Execute xmlns:wps="http://www.opengis.net/wps/1.0.0" version="1.0.0" service="WPS" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsAll.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' +
|
||||||
|
' <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">gs:Bounds</ows:Identifier>' +
|
||||||
|
' <wps:DataInputs>' +
|
||||||
|
' <wps:Input>' +
|
||||||
|
' <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">features</ows:Identifier>' +
|
||||||
|
' <wps:Reference mimeType="text/xml" xlink:href="http://geoserver/wfs" xmlns:xlink="http://www.w3.org/1999/xlink" method="POST">' +
|
||||||
|
' <wps:Body>' +
|
||||||
|
' <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.0.0">' +
|
||||||
|
' <wfs:Query typeName="foo:bar">' +
|
||||||
|
' <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">' +
|
||||||
|
' <ogc:FeatureId fid="123"/>' +
|
||||||
|
' </ogc:Filter>' +
|
||||||
|
' </wfs:Query>' +
|
||||||
|
' </wfs:GetFeature>' +
|
||||||
|
' </wps:Body>' +
|
||||||
|
' </wps:Reference>' +
|
||||||
|
' </wps:Input>' +
|
||||||
|
' </wps:DataInputs>' +
|
||||||
|
' <wps:ResponseForm>' +
|
||||||
|
' <wps:RawDataOutput>' +
|
||||||
|
' <ows:Identifier xmlns:ows="http://www.opengis.net/ows/1.1">bounds</ows:Identifier>' +
|
||||||
|
' </wps:RawDataOutput>' +
|
||||||
|
' </wps:ResponseForm>' +
|
||||||
|
'</wps:Execute>';
|
||||||
|
|
||||||
|
result = new OpenLayers.Format.WPSExecute().write({
|
||||||
|
identifier: 'gs:Bounds',
|
||||||
|
dataInputs: [{
|
||||||
|
identifier: 'features',
|
||||||
|
reference: {
|
||||||
|
mimeType: 'text/xml',
|
||||||
|
href: 'http://geoserver/wfs',
|
||||||
|
method: 'POST',
|
||||||
|
body: {
|
||||||
|
wfs: {
|
||||||
|
featureType: 'foo:bar',
|
||||||
|
version: '1.0.0',
|
||||||
|
filter: new OpenLayers.Filter.FeatureId({fids: [123]})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
responseForm: {
|
||||||
|
rawDataOutput: {
|
||||||
|
identifier: 'bounds'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
t.xml_eq(result, expected, 'WPS Execute written out correctly with a FID filter');
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -272,7 +272,7 @@
|
|||||||
style: "blue_marble",
|
style: "blue_marble",
|
||||||
matrixSet: "arcgis_online",
|
matrixSet: "arcgis_online",
|
||||||
tileSize: new OpenLayers.Size(512, 512),
|
tileSize: new OpenLayers.Size(512, 512),
|
||||||
requestEncoding: "REST",
|
requestEncoding: "REST"
|
||||||
});
|
});
|
||||||
map.addLayer(layer);
|
map.addLayer(layer);
|
||||||
map.setCenter(new OpenLayers.LonLat(0,0), 5);
|
map.setCenter(new OpenLayers.LonLat(0,0), 5);
|
||||||
|
|||||||
Reference in New Issue
Block a user