[OpenLayers-Commits] r7345 - in sandbox/topp/almanac: build doc examples lib lib/OpenLayers lib/OpenLayers/Control lib/OpenLayers/Feature lib/OpenLayers/Format lib/OpenLayers/Format/SLD lib/OpenLayers/Lang lib/OpenLayers/Layer lib/OpenLayers/Renderer lib/OpenLayers/Tile tests tests/Control tests/Feature tests/Format/SLD tests/Layer tests/Renderer tests/Request tests/Tile tests/manual theme/default theme/default/img tools
commits at openlayers.org
commits at openlayers.org
Tue Jun 10 18:00:41 EDT 2008
Author: tschaub
Date: 2008-06-10 18:00:41 -0400 (Tue, 10 Jun 2008)
New Revision: 7345
Added:
sandbox/topp/almanac/examples/Jugl.js
sandbox/topp/almanac/examples/browser-name.html
sandbox/topp/almanac/examples/example-list.html
sandbox/topp/almanac/examples/style.css
sandbox/topp/almanac/examples/styles-rotation.html
sandbox/topp/almanac/lib/OpenLayers/Lang/it.js
sandbox/topp/almanac/lib/OpenLayers/Lang/pt-BR.js
sandbox/topp/almanac/lib/OpenLayers/Lang/sv-SE.js
sandbox/topp/almanac/tests/Request.html
sandbox/topp/almanac/tests/Request/
sandbox/topp/almanac/tests/Request/XMLHttpRequest.html
sandbox/topp/almanac/theme/default/img/save_features_off.png
sandbox/topp/almanac/theme/default/img/save_features_on.png
sandbox/topp/almanac/tools/update_dev_dir.sh
Removed:
sandbox/topp/almanac/doc/Jugl.js
sandbox/topp/almanac/doc/examples.html
sandbox/topp/almanac/examples/fullScreen2.html
sandbox/topp/almanac/examples/fullscreen.jpg
sandbox/topp/almanac/examples/georss-serialize.html
sandbox/topp/almanac/examples/gml-serialize.html
sandbox/topp/almanac/examples/wfs-scribble.html
sandbox/topp/almanac/examples/wkt.html
sandbox/topp/almanac/tests/Request/XMLHttpRequest.html
Modified:
sandbox/topp/almanac/build/README.txt
sandbox/topp/almanac/build/full.cfg
sandbox/topp/almanac/build/library.cfg
sandbox/topp/almanac/build/license.txt
sandbox/topp/almanac/build/lite.cfg
sandbox/topp/almanac/examples/GMLParser.html
sandbox/topp/almanac/examples/KMLParser.html
sandbox/topp/almanac/examples/accessible.html
sandbox/topp/almanac/examples/animated_panning.html
sandbox/topp/almanac/examples/attribution.html
sandbox/topp/almanac/examples/baseLayers.html
sandbox/topp/almanac/examples/boxes-vector.html
sandbox/topp/almanac/examples/boxes.html
sandbox/topp/almanac/examples/buffer.html
sandbox/topp/almanac/examples/click-handler.html
sandbox/topp/almanac/examples/click.html
sandbox/topp/almanac/examples/controls.html
sandbox/topp/almanac/examples/custom-control-point.html
sandbox/topp/almanac/examples/custom-control.html
sandbox/topp/almanac/examples/custom-style.html
sandbox/topp/almanac/examples/debug.html
sandbox/topp/almanac/examples/doubleSetCenter.html
sandbox/topp/almanac/examples/drag-feature.html
sandbox/topp/almanac/examples/draw-feature.html
sandbox/topp/almanac/examples/editingtoolbar-outside.html
sandbox/topp/almanac/examples/editingtoolbar.html
sandbox/topp/almanac/examples/events.html
sandbox/topp/almanac/examples/example.html
sandbox/topp/almanac/examples/fractional-zoom.html
sandbox/topp/almanac/examples/fullScreen.html
sandbox/topp/almanac/examples/geojson.html
sandbox/topp/almanac/examples/georss-flickr.html
sandbox/topp/almanac/examples/georss-markers.html
sandbox/topp/almanac/examples/georss.html
sandbox/topp/almanac/examples/getfeatureinfo.html
sandbox/topp/almanac/examples/gml-layer.html
sandbox/topp/almanac/examples/google-reproject.html
sandbox/topp/almanac/examples/google.html
sandbox/topp/almanac/examples/gutter.html
sandbox/topp/almanac/examples/hover-handler.html
sandbox/topp/almanac/examples/image-layer.html
sandbox/topp/almanac/examples/intersects.html
sandbox/topp/almanac/examples/kamap.html
sandbox/topp/almanac/examples/kml-layer.html
sandbox/topp/almanac/examples/layer-opacity.html
sandbox/topp/almanac/examples/layerLoadMonitoring.html
sandbox/topp/almanac/examples/layerswitcher.html
sandbox/topp/almanac/examples/lite.html
sandbox/topp/almanac/examples/mapguide.html
sandbox/topp/almanac/examples/mapserver.html
sandbox/topp/almanac/examples/mapserver_untiled.html
sandbox/topp/almanac/examples/markerResize.html
sandbox/topp/almanac/examples/markers.html
sandbox/topp/almanac/examples/markersTextLayer.html
sandbox/topp/almanac/examples/mm.html
sandbox/topp/almanac/examples/modify-feature.html
sandbox/topp/almanac/examples/mouse-position.html
sandbox/topp/almanac/examples/multimap-mercator.html
sandbox/topp/almanac/examples/multiserver.html
sandbox/topp/almanac/examples/navigation-control.html
sandbox/topp/almanac/examples/navigation-history.html
sandbox/topp/almanac/examples/navtoolbar-outsidemap.html
sandbox/topp/almanac/examples/navtoolbar.html
sandbox/topp/almanac/examples/notile.html
sandbox/topp/almanac/examples/openmnnd.html
sandbox/topp/almanac/examples/osm-layer.html
sandbox/topp/almanac/examples/outOfRangeMarkers.html
sandbox/topp/almanac/examples/overviewmap.html
sandbox/topp/almanac/examples/panel.html
sandbox/topp/almanac/examples/point-track-markers.html
sandbox/topp/almanac/examples/popupMatrix.html
sandbox/topp/almanac/examples/popups.html
sandbox/topp/almanac/examples/projected-map.html
sandbox/topp/almanac/examples/proxy.cgi
sandbox/topp/almanac/examples/regular-polygons.html
sandbox/topp/almanac/examples/resize-features.html
sandbox/topp/almanac/examples/restricted-extent.html
sandbox/topp/almanac/examples/rotate-features.html
sandbox/topp/almanac/examples/select-feature-openpopup.html
sandbox/topp/almanac/examples/select-feature.html
sandbox/topp/almanac/examples/setextent.html
sandbox/topp/almanac/examples/sld.html
sandbox/topp/almanac/examples/smoothDragging.html
sandbox/topp/almanac/examples/spherical-mercator.html
sandbox/topp/almanac/examples/styles-context.html
sandbox/topp/almanac/examples/styles-unique.html
sandbox/topp/almanac/examples/sundials.html
sandbox/topp/almanac/examples/tilecache.html
sandbox/topp/almanac/examples/tms.html
sandbox/topp/almanac/examples/transition.html
sandbox/topp/almanac/examples/urban.html
sandbox/topp/almanac/examples/ve.html
sandbox/topp/almanac/examples/vector-features.html
sandbox/topp/almanac/examples/vector-formats.html
sandbox/topp/almanac/examples/wfs-reprojection.html
sandbox/topp/almanac/examples/wfs-states.html
sandbox/topp/almanac/examples/wfs-t.html
sandbox/topp/almanac/examples/wfs.html
sandbox/topp/almanac/examples/wmc.html
sandbox/topp/almanac/examples/wms-untiled.html
sandbox/topp/almanac/examples/wms.html
sandbox/topp/almanac/examples/wmst.html
sandbox/topp/almanac/examples/worldwind.html
sandbox/topp/almanac/examples/wrapDateLine.html
sandbox/topp/almanac/examples/xhtml.html
sandbox/topp/almanac/examples/xml.html
sandbox/topp/almanac/examples/yahoo.html
sandbox/topp/almanac/examples/zoomLevels.html
sandbox/topp/almanac/lib/OpenLayers.js
sandbox/topp/almanac/lib/OpenLayers/Ajax.js
sandbox/topp/almanac/lib/OpenLayers/Control/ModifyFeature.js
sandbox/topp/almanac/lib/OpenLayers/Control/MousePosition.js
sandbox/topp/almanac/lib/OpenLayers/Control/PanZoomBar.js
sandbox/topp/almanac/lib/OpenLayers/Control/Permalink.js
sandbox/topp/almanac/lib/OpenLayers/Feature/Vector.js
sandbox/topp/almanac/lib/OpenLayers/Format/KML.js
sandbox/topp/almanac/lib/OpenLayers/Format/SLD/v1.js
sandbox/topp/almanac/lib/OpenLayers/Layer/GML.js
sandbox/topp/almanac/lib/OpenLayers/Layer/GeoRSS.js
sandbox/topp/almanac/lib/OpenLayers/Layer/Google.js
sandbox/topp/almanac/lib/OpenLayers/Layer/Grid.js
sandbox/topp/almanac/lib/OpenLayers/Layer/KaMap.js
sandbox/topp/almanac/lib/OpenLayers/Layer/MapGuide.js
sandbox/topp/almanac/lib/OpenLayers/Layer/MapServer.js
sandbox/topp/almanac/lib/OpenLayers/Layer/Text.js
sandbox/topp/almanac/lib/OpenLayers/Layer/Vector.js
sandbox/topp/almanac/lib/OpenLayers/Layer/VirtualEarth.js
sandbox/topp/almanac/lib/OpenLayers/Layer/WFS.js
sandbox/topp/almanac/lib/OpenLayers/Layer/WorldWind.js
sandbox/topp/almanac/lib/OpenLayers/Map.js
sandbox/topp/almanac/lib/OpenLayers/Marker.js
sandbox/topp/almanac/lib/OpenLayers/Renderer/SVG.js
sandbox/topp/almanac/lib/OpenLayers/Renderer/VML.js
sandbox/topp/almanac/lib/OpenLayers/Request.js
sandbox/topp/almanac/lib/OpenLayers/Rule.js
sandbox/topp/almanac/lib/OpenLayers/Style.js
sandbox/topp/almanac/lib/OpenLayers/StyleMap.js
sandbox/topp/almanac/lib/OpenLayers/Tile/WFS.js
sandbox/topp/almanac/lib/OpenLayers/Util.js
sandbox/topp/almanac/tests/Ajax.html
sandbox/topp/almanac/tests/Control/ModifyFeature.html
sandbox/topp/almanac/tests/Control/MousePosition.html
sandbox/topp/almanac/tests/Feature/Vector.html
sandbox/topp/almanac/tests/Format/SLD/v1_0_0.html
sandbox/topp/almanac/tests/Layer/Vector.html
sandbox/topp/almanac/tests/Renderer/VML.html
sandbox/topp/almanac/tests/Rule.html
sandbox/topp/almanac/tests/Style.html
sandbox/topp/almanac/tests/Tile/WFS.html
sandbox/topp/almanac/tests/Util.html
sandbox/topp/almanac/tests/list-tests.html
sandbox/topp/almanac/tests/manual/ajax.html
sandbox/topp/almanac/tests/manual/select-feature.html
sandbox/topp/almanac/tests/xml_eq.js
sandbox/topp/almanac/theme/default/style.css
sandbox/topp/almanac/tools/exampleparser.py
Log:
merge r7017:HEAD from trunk
Modified: sandbox/topp/almanac/build/README.txt
===================================================================
--- sandbox/topp/almanac/build/README.txt 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/build/README.txt 2008-06-10 22:00:41 UTC (rev 7345)
@@ -4,7 +4,7 @@
* Build:
cd build
- ./build.sh
+ ./build.py
cd ..
* Upload the result to the server: e.g.
Modified: sandbox/topp/almanac/build/full.cfg
===================================================================
--- sandbox/topp/almanac/build/full.cfg 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/build/full.cfg 2008-06-10 22:00:41 UTC (rev 7345)
@@ -13,7 +13,10 @@
[exclude]
Firebug/firebug.js
Firebug/firebugx.js
+OpenLayers/Lang/cs-CZ.js
OpenLayers/Lang/de.js
OpenLayers/Lang/en-CA.js
OpenLayers/Lang/fr.js
-OpenLayers/Lang/cs-CZ.js
+OpenLayers/Lang/it.js
+OpenLayers/Lang/pt-BR.js
+OpenLayers/Lang/sv-SE.js
\ No newline at end of file
Modified: sandbox/topp/almanac/build/library.cfg
===================================================================
--- sandbox/topp/almanac/build/library.cfg 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/build/library.cfg 2008-06-10 22:00:41 UTC (rev 7345)
@@ -46,9 +46,11 @@
OpenLayers/Renderer/SVG.js
OpenLayers/Renderer/VML.js
OpenLayers/Renderer.js
+OpenLayers/Lang/cs-CZ.js
OpenLayers/Lang/de.js
OpenLayers/Lang/en-CA.js
OpenLayers/Lang/fr.js
-OpenLayers/Lang/cs-CZ.js
+OpenLayers/Lang/it.js
+OpenLayers/Lang/pt-BR.js
+OpenLayers/Lang/sv-SE.js
-
Modified: sandbox/topp/almanac/build/license.txt
===================================================================
--- sandbox/topp/almanac/build/license.txt 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/build/license.txt 2008-06-10 22:00:41 UTC (rev 7345)
@@ -43,3 +43,12 @@
*
**/
+/**
+ * Contains XMLHttpRequest.js <http://code.google.com/p/xmlhttprequest/>
+ * Copyright 2007 Sergey Ilinsky (http://www.ilinsky.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ */
Modified: sandbox/topp/almanac/build/lite.cfg
===================================================================
--- sandbox/topp/almanac/build/lite.cfg 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/build/lite.cfg 2008-06-10 22:00:41 UTC (rev 7345)
@@ -21,8 +21,11 @@
[exclude]
Firebug/firebug.js
Firebug/firebugx.js
+OpenLayers/Lang/cs-CZ.js
OpenLayers/Lang/de.js
OpenLayers/Lang/en-CA.js
OpenLayers/Lang/fr.js
-OpenLayers/Lang/cs-CZ.js
+OpenLayers/Lang/it.js
+OpenLayers/Lang/pt-BR.js
+OpenLayers/Lang/sv-SE.js
Deleted: sandbox/topp/almanac/doc/Jugl.js
===================================================================
--- sandbox/topp/almanac/doc/Jugl.js 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/doc/Jugl.js 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,74 +0,0 @@
-/**
- * Jugl.js -- JavaScript Template Attribute Language
- * This code is not yet licensed for release or distribution.
- *
- * Copyright 2007 Tim Schaub
- */
-
-/**
- * Contains portions of OpenLayers.js -- OpenLayers Map Viewer Library
- *
- * Copyright 2005-2006 MetaCarta, Inc., released under a modified BSD license.
- * Please see http://svn.openlayers.org/trunk/openlayers/repository-license.txt
- * for the full text of the license.
- */
-
-/**
- * Contains portions of Prototype.js:
- *
- * Prototype JavaScript framework, version 1.4.0
- * (c) 2005 Sam Stephenson <sam at conio.net>
- *
- * Prototype is freely distributable under the terms of an MIT-style license.
- * For details, see the Prototype web site: http://prototype.conio.net/
- */
-
-(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl={singleFile:true};window[uri]=Jugl;})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var singleFile=(typeof window[uri]=="object"&&window[uri].singleFile);var Jugl={prefix:"jugl",namespaceURI:"http://namespace.jugl.org/",scriptName:(!singleFile)?"lib/Jugl.js":"Jugl.js",getScriptLocation:function(){var scriptLocation="";var scriptName=Jugl.scriptName;var scripts=document.getElementsByTagName('script');for(var i=0;i<scripts.length;i++){var src=scripts[i].getAttribute('src');if(src){var index=src.lastIndexOf(scriptName);if((index>-1)&&(index+scriptName.length==src.length)){scriptLocation=src.slice(0,-scriptName.length);break;}}}
-return scriptLocation;}};if(!singleFile){var jsfiles=new Array("Jugl/Util.js","Jugl/Class.js","Jugl/Async.js","Jugl/Node.js","Jugl/Attribute.js","Jugl/Console.js","Jugl/Template.js");var allScriptTags="";var host=Jugl.getScriptLocation()+"lib/";for(var i=0;i<jsfiles.length;i++){if(/MSIE/.test(navigator.userAgent)||/Safari/.test(navigator.userAgent)){var currentScriptTag="<script src='"+host+jsfiles[i]+"'></script>";allScriptTags+=currentScriptTag;}else{var s=document.createElement("script");s.src=host+jsfiles[i];var h=document.getElementsByTagName("head").length?document.getElementsByTagName("head")[0]:document.body;h.appendChild(s);}}
-if(allScriptTags){document.write(allScriptTags);}}
-window[uri]=Jugl;})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Class=function(){var Class=function(){this.initialize.apply(this,arguments);}
-var extended={};var parent;for(var i=0;i<arguments.length;++i){if(typeof arguments[i]=="function"){parent=arguments[i].prototype;}else{parent=arguments[i];}
-Jugl.Util.extend(extended,parent);}
-Class.prototype=extended;return Class;};})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Util=new Object();Jugl.Util.extend=function(destination,source){for(property in source){destination[property]=source[property];}
-return destination;};Jugl.Util.indexOf=function(array,obj){for(var i=0;i<array.length;i++){if(array[i]==obj)return i;}
-return-1;};Jugl.Util.bind=function(method,object){var args=[];for(var i=2;i<arguments.length;++i){args.push(arguments[i]);}
-return function(){for(var i=0;i<arguments.length;++i){args.push(arguments[i]);}
-return method.apply(object,args);}};})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){}};(function(){if(window.console){var scripts=document.getElementsByTagName("script");for(var i=0;i<scripts.length;++i){if(scripts[i].src.indexOf("firebug.js")!=-1){Jugl.Util.extend(Jugl.Console,console);break;}}}})();})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Attribute=Jugl.Class({node:null,element:null,type:null,nodeValue:null,template:null,initialize:function(node,element,type){this.node=node;this.element=element;this.type=type;this.nodeValue=element.nodeValue;this.nodeName=element.nodeName;this.template=node.template;},splitAttributeValue:function(value){value=(value!=null)?value:this.nodeValue;var matches=this.template.regExes.trimSpace.exec(value);var items;if(matches.length==3){items=[matches[1],matches[2]];}
-return items;},getAttributeValues:function(){var trimmed=this.nodeValue.replace(/[\t\n]/g,"").replace(/;\s*$/,"");var tabbed=trimmed.replace(/;;/g,"\t");var newlined=tabbed.split(";").join("\n");return newlined.replace(/\t/g,";").split(/\n/g);},removeSelf:function(){this.node.removeAttributeNode(this);},process:function(){return this.processAttribute[this.type].apply(this,[]);},evalInScope:function(str){var expression="with(this.node.scope){"+str+"}";return eval(expression);},processAttribute:{"define":function(){var values=this.getAttributeValues();var pair;for(var i=0;i<values.length;++i){pair=this.splitAttributeValue(values[i]);this.node.scope[pair[0]]=this.evalInScope(pair[1]);}
-this.removeSelf();return true;},"condition":function(){var proceed;try{proceed=!!(this.evalInScope(this.nodeValue));}catch(err){var message=err.name+": "+err.message+"\n";message+="attribute: "+this.nodeName;Jugl.Console.error(message);Jugl.Console.dirxml(this.node.element);Jugl.Console.log(this.node.scope);}
-this.removeSelf();if(!proceed){this.node.removeSelf();}
-return proceed;},"repeat":function(){var pair=this.splitAttributeValue();var key=pair[0];var list=this.evalInScope(pair[1]);this.removeSelf();if(!(list instanceof Array)){var items=new Array();for(var p in list){items.push(p);}
-list=items;}
-var node;var previousSibling=this.node;var length=list.length;for(var i=0;i<length;++i){node=this.node.clone();node.scope[key]=list[i];node.scope.repeat[key]={index:i,number:i+1,even:!(i%2),odd:!!(i%2),start:(i==0),end:(i==length-1),length:length};previousSibling.insertAfter(node);node.process();previousSibling=node;}
-this.node.removeSelf();return false;},"content":function(){var str;try{str=this.evalInScope(this.nodeValue);}catch(err){Jugl.Console.error("Failed to eval in node scope: "+
-this.nodeValue);throw err;}
-this.removeSelf();var child=new Jugl.Node(this.template,document.createTextNode(str));this.node.removeChildNodes();this.node.appendChild(child);return true;},"replace":function(){var str;try{str=this.evalInScope(this.nodeValue);}catch(err){Jugl.Console.error("Failed to eval in node scope: "+
-this.nodeValue);throw err;}
-this.removeSelf();var replacement=new Jugl.Node(this.template,document.createTextNode(str));this.node.insertBefore(replacement);this.node.removeSelf();return true;},"attributes":function(){var values=this.getAttributeValues();var pair,name,value;for(var i=0;i<values.length;++i){pair=this.splitAttributeValue(values[i]);name=pair[0];value=this.evalInScope(pair[1]);if(value!==false){this.node.setAttribute(name,value);}}
-this.removeSelf();return true;},"omit-tag":function(){var omit;try{omit=((this.nodeValue=="")||!!(this.evalInScope(this.nodeValue)));}catch(err){Jugl.Console.error("Failed to eval in node scope: "+
-this.nodeValue);throw err;}
-this.removeSelf();if(omit){var children=this.node.getChildNodes();var child;for(var i=0;i<children.length;++i){this.node.insertBefore(children[i]);}
-this.node.removeSelf();}}},CLASS_NAME:"Jugl.Attribute"});})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Template=Jugl.Class({element:null,usingNS:false,xhtmlns:"http://www.w3.org/1999/xhtml",xmldom:null,regExes:null,loaded:false,loading:false,initialize:function(element,options){if(typeof(element)=="string"){element=document.getElementById(element);}
-if(element){this.element=element;this.loaded=true;}
-this.regExes={trimSpace:(/^\s*(\w+)\s+(.*?)\s*$/)};if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM");}},process:function(context,clone,toString){if(this.element.getAttributeNodeNS){if(this.element.getAttributeNodeNS(Jugl.xhtmlns,Jugl.prefix)){this.usingNS=true;}}
-var node=new Jugl.Node(this,this.element);if(clone){node=node.clone();}
-if(context){node.scope=context;}
-try{node.process();}catch(err){Jugl.Console.error("Failed to process "+
-this.element+" node");}
-var data;if(toString){if(node.element.innerHTML){data=node.element.innerHTML;}else{if(this.xmldom){data=node.element.xml;}else{var serializer=new XMLSerializer();data=serializer.serializeToString(node.element);}}}else{data=node.element;}
-return data;},load:function(url){this.loading=true;var setElement=function(request){var doc=request.responseXML;this.element=doc.documentElement;this.loading=false;this.loaded=true;this.onLoad();}
-Jugl.Async.loadUrl(url,setElement,this);},onLoad:function(){},CLASS_NAME:"Jugl.Template"});})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Node=Jugl.Class({template:null,element:null,scope:null,initialize:function(template,element){this.template=template;this.element=element;this.scope=new Object();this.scope.repeat=new Object();},clone:function(){var element=this.element.cloneNode(true);var node=new Jugl.Node(this.template,element);Jugl.Util.extend(node.scope,this.scope);return node;},getAttribute:function(localName){var element;if(this.element.nodeType==1){if(this.template.usingNS){element=this.element.getAttributeNodeNS(Jugl.namespaceURI,localName);}else{element=this.element.getAttributeNode(Jugl.prefix+":"+
-localName);}
-if(element&&!element.specified){element=false;}}
-var attribute;if(element){attribute=new Jugl.Attribute(this,element,localName);}else{attribute=element;}
-return attribute;},setAttribute:function(name,value){this.element.setAttribute(name,value);},removeAttributeNode:function(attribute){this.element.removeAttributeNode(attribute.element);},getChildNodes:function(){var children=[];var node,scope;for(var i=0;i<this.element.childNodes.length;++i){node=new Jugl.Node(this.template,this.element.childNodes[i]);node.scope=Jugl.Util.extend({},this.scope);children.push(node);}
-return children;},removeChildNodes:function(){while(this.element.hasChildNodes()){this.element.removeChild(this.element.firstChild);}},removeChild:function(node){this.element.removeChild(node.element);return node;},removeSelf:function(){this.element.parentNode.removeChild(this.element);},appendChild:function(node){this.element.appendChild(node.element);},insertAfter:function(node){var parent=this.element.parentNode;var sibling=this.element.nextSibling;if(sibling){parent.insertBefore(node.element,sibling);}else{parent.appendChild(node.element);}},insertBefore:function(node){var parent=this.element.parentNode;parent.insertBefore(node.element,this.element);},process:function(){var attribute;var keepProcessing=true;var series=["define","condition","repeat"];for(var i=0;i<series.length;++i){attribute=this.getAttribute(series[i]);if(attribute){try{keepProcessing=attribute.process();}catch(err){Jugl.Console.error("Failed to process "+
-series[i]+" attribute");throw err;}
-if(!keepProcessing){return;}}}
-var content=this.getAttribute("content");if(content){try{content.process();}catch(err){Jugl.Console.error("Failed to process content attribute");throw err;}}else{var replace=this.getAttribute("replace");if(replace){try{replace.process();}catch(err){Jugl.Console.error("Failed to process replace attribute");throw err;}}}
-var attributes=this.getAttribute("attributes");if(attributes){try{attributes.process();}catch(err){Jugl.Console.error("Failed to process attributes attribute");throw err;}}
-if(!content&&!replace){this.processChildNodes();}
-var omit=this.getAttribute("omit-tag");if(omit){try{omit.process();}catch(err){Jugl.Console.error("Failed to process omit-tag attribute");throw err;}}},processChildNodes:function(){var element,child;var children=this.getChildNodes();for(var i=0;i<children.length;++i){try{children[i].process();}catch(err){Jugl.Console.error("Failed to process "+
-children[i]+" node");throw err;}}},CLASS_NAME:"Jugl.Node"});})();(function(){var uri="http://jugl.tschaub.net/trunk/lib/Jugl.js";var Jugl=window[uri];Jugl.Async={loadTemplate:function(url,onComplete,caller){var createTemplate=function(request){var doc=request.responseXML;var template=new Jugl.Template(doc.documentElement);var complete=Jugl.Util.bind(onComplete,caller);complete(template);}
-Jugl.Async.loadUrl(url,createTemplate);},loadUrl:function(url,onComplete,caller){var complete=(caller)?Jugl.Util.bind(onComplete,caller):onComplete;var request=Jugl.Async.createXMLHttpRequest();request.open("GET",url);request.onreadystatechange=function(){if(request.readyState==4){complete(request);}}
-request.send(null);},createXMLHttpRequest:function(){if(typeof XMLHttpRequest!="undefined"){return new XMLHttpRequest();}else if(typeof ActiveXObject!="undefined"){return new ActiveXObject("Microsoft.XMLHTTP");}else{throw new Error("XMLHttpRequest not supported");}}};})();
\ No newline at end of file
Deleted: sandbox/topp/almanac/doc/examples.html
===================================================================
--- sandbox/topp/almanac/doc/examples.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/doc/examples.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,55 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
-<html>
- <head>
- <title>OL Docs</title>
- <style type="text/css">
- html, body {margin: 0;padding: 0.5em 1em;font: 0.9em Verdana, Arial, sans serif;}
- .exampleContainer{width:90%; padding:5px; border-bottom:1px solid grey; }
- .exampleNumber{display:inline; font-weight:bold; color:#333; }
- .exampleTitle{display:inline; font-weight:bold; color:#333; }
- .exampleName{display:inline; color:#333; }
- .exampleDescription{color:#222; padding:3px; font-size:1.2em; }
- .exampleClasses{font-size:.7em; color:grey;display:none;}
- </style>
- <script type="text/javascript" src="./Jugl.js"></script>
- <script type="text/javascript" src="examples.js"></script>
- <script type="text/javascript">
- // import
- var uri = "http://jugl.tschaub.net/trunk/lib/Jugl.js";
- var Jugl = window[uri];
- // this part does the actual template processing
- window.onload = function() {
- var template = new Jugl.Template("basic");
- template.process();
- }
- </script>
- </head>
- <body>
- <div id="basic" style="margin: 0 auto;">
- <div class="exampleContainer" jugl:repeat="example examples">
- <div class="exampleNumber" jugl:content="repeat.example.number">
- Example # goes here
- </div>
- <div class="exampleTitle" jugl:content="example.title">
- Title goes here
- </div>
- <div class="exampleName">
- <a jugl:content="example.example"
- jugl:attributes="href example.link">
- Example Filename and Link
- </a>
- </div>
- <div class="exampleDescription">
- <span jugl:content="example.shortdesc">
- Short Description goes here
- </span>
- </div>
- <div class="exampleClasses" >
- <span jugl:content="example.classes">
- Related Classes go here
- </span>
- </div>
- </div>
- </div>
- </body>
-</html>
\ No newline at end of file
Modified: sandbox/topp/almanac/examples/GMLParser.html
===================================================================
--- sandbox/topp/almanac/examples/GMLParser.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/GMLParser.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,14 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>OpenLayers GML Parser</title>
+ <title>OpenLayers GML Parser</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 800px;
- height: 475px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function parseData(req) {
Copied: sandbox/topp/almanac/examples/Jugl.js (from rev 7342, trunk/openlayers/examples/Jugl.js)
===================================================================
--- sandbox/topp/almanac/examples/Jugl.js (rev 0)
+++ sandbox/topp/almanac/examples/Jugl.js 2008-06-10 22:00:41 UTC (rev 7345)
@@ -0,0 +1,84 @@
+/**
+ * Jugl.js -- JavaScript Template Library
+ *
+ * Copyright 2007 Tim Schaub
+ * Released under the MIT license. Please see
+ * http://svn.tschaub.net/jugl/trunk/license.txt for the full license.
+ */
+
+(function(){var Jugl={prefix:"jugl",namespaceURI:"http://namespace.jugl.org/"};Jugl.Array={indexOf:function(array,obj){for(var i=0;i<array.length;i++){if(array[i]==obj)return i;}
+return-1;}};Jugl.Function={bind:function(method,object){var args=[];for(var i=2;i<arguments.length;++i){args.push(arguments[i]);}
+return function(){for(var i=0;i<arguments.length;++i){args.push(arguments[i]);}
+return method.apply(object,args);}}};Jugl.Node={appendChild:function(parent,child){if(typeof(parent)=="string"){var obj=document.getElementById(parent);if(!obj){throw Error("Element id not found: "+parent);}
+parent=obj;}
+if(typeof(child)=="string"){var obj=document.getElementById(child);if(!obj){throw Error("Element id not found: "+child);}
+child=obj;}
+if(child.namespaceURI&&child.xml){var wrapper=document.createElement('div');wrapper.innerHTML=child.xml;var children=wrapper.childNodes;for(var i=0;i<children.length;++i){parent.appendChild(children[i]);}}else{if(parent.ownerDocument&&parent.ownerDocument.importNode){child=parent.ownerDocument.importNode(child,true);}
+parent.appendChild(child);}
+return child;}};Jugl.Object={extend:function(destination,source){destination=destination||{};source=source||{};for(property in source){destination[property]=source[property];}
+return destination;},applyDefaults:function(destination,source){destination=destination||{};source=source||{};for(property in source){if(destination[property]===undefined){destination[property]=source[property];}}
+return destination;}};Jugl.Request={loadTemplate:function(url,onComplete,caller){var createTemplate=function(request){var doc,template;try{doc=request.responseXML;template=new Jugl.Template(doc.documentElement);}catch(invalidXML){try{doc=document.createElement("div");doc.innerHTML=request.responseText;template=new Jugl.Template(doc.firstChild);}catch(invalidHTML){var msg="Can't make HTML out of response: "+
+request.responseText;Jugl.Console.error(msg);throw invalidHTML;}}
+var complete=Jugl.Function.bind(onComplete,caller);complete(template);}
+Jugl.Request.loadUrl(url,createTemplate);},loadUrl:function(url,onComplete,caller){var complete=(caller)?Jugl.Function.bind(onComplete,caller):onComplete;var request=Jugl.Request.createXMLHttpRequest();request.open("GET",url);request.onreadystatechange=function(){if(request.readyState==4){complete(request);}}
+request.send(null);},createXMLHttpRequest:function(){if(typeof XMLHttpRequest!="undefined"){return new XMLHttpRequest();}else if(typeof ActiveXObject!="undefined"){return new ActiveXObject("Microsoft.XMLHTTP");}else{throw new Error("XMLHttpRequest not supported");}}};Jugl.Class=function(){var Class=function(){if(this===Jugl){var msg="Create an instance of a Jugl "+"class with the new keyword";throw Error(msg);}
+this.initialize.apply(this,arguments);}
+var extended={toString:function(){return"["+this.CLASS_NAME+"]";}};var parent;for(var i=0;i<arguments.length;++i){if(typeof arguments[i]=="function"){parent=arguments[i].prototype;}else{parent=arguments[i];}
+Jugl.Object.extend(extended,parent);}
+Class.prototype=extended;return Class;};Jugl.Console={log:function(){},debug:function(){},info:function(){},warn:function(){},error:function(){},assert:function(){},dir:function(){},dirxml:function(){},trace:function(){},group:function(){},groupEnd:function(){},time:function(){},timeEnd:function(){},profile:function(){},profileEnd:function(){},count:function(){}};(function(){if(window.console){var scripts=document.getElementsByTagName("script");for(var i=0;i<scripts.length;++i){if(scripts[i].src.indexOf("firebug.js")!=-1){Jugl.Object.extend(Jugl.Console,console);break;}}}})();Jugl.Attribute=Jugl.Class({element:null,node:null,type:null,nodeValue:null,template:null,initialize:function(element,node,type){this.element=element;this.node=node;this.type=type;this.nodeValue=node.nodeValue;this.nodeName=node.nodeName;this.template=element.template;},splitAttributeValue:function(value){value=(value!=null)?value:this.nodeValue;var matches=this.template.regExes.trimSpace.exec(value);var items;if(matches&&matches.length==3){items=[matches[1],matches[2]];}
+return items;},splitExpressionPrefix:function(){var items=this.splitAttributeValue();if(!items||(items[0]!='structure'&&items[0]!='text')){items=[null,this.nodeValue];}
+return items;},getAttributeValues:function(){var trimmed=this.nodeValue.replace(/[\t\n]/g,"").replace(/;\s*$/,"");var tabbed=trimmed.replace(/;;/g,"\t");var newlined=tabbed.split(";").join("\n");return newlined.replace(/\t/g,";").split(/\n/g);},removeSelf:function(){this.element.removeAttributeNode(this);},process:function(){return this.processAttribute[this.type].apply(this,[]);},evalInScope:function(str){var expression="with(this.element.scope){"+str+"}";return eval(expression);},processAttribute:{"define":function(){var values=this.getAttributeValues();var pair;for(var i=0;i<values.length;++i){pair=this.splitAttributeValue(values[i]);this.element.scope[pair[0]]=this.evalInScope(pair[1]);}
+this.removeSelf();return true;},"condition":function(){var proceed;try{proceed=!!(this.evalInScope(this.nodeValue));}catch(err){var message=err.name+": "+err.message+"\n"+"attribute: "+this.nodeName;Jugl.Console.error(message);throw err;}
+this.removeSelf();if(!proceed){this.element.removeSelf();}
+return proceed;},"repeat":function(){var pair=this.splitAttributeValue();var key=pair[0];var list=this.evalInScope(pair[1]);this.removeSelf();if(!(list instanceof Array)){var items=new Array();for(var p in list){items.push(p);}
+list=items;}
+var element;var previousSibling=this.element;var length=list.length;for(var i=0;i<length;++i){element=this.element.clone();element.scope[key]=list[i];element.scope.repeat[key]={index:i,number:i+1,even:!(i%2),odd:!!(i%2),start:(i==0),end:(i==length-1),length:length};previousSibling.insertAfter(element);element.process();previousSibling=element;}
+this.element.removeSelf();return false;},"content":function(){var pair=this.splitExpressionPrefix();var str;try{str=this.evalInScope(pair[1]);}catch(err){Jugl.Console.error("Failed to eval in element scope: "+
+pair[1]);throw err;}
+this.removeSelf();if(pair[0]=='structure'){try{this.element.node.innerHTML=str;}catch(err){var wrapper=document.createElement('div');var msg;try{wrapper.innerHTML=str;}catch(invalidHTML){msg="Can't transform string into valid HTML : "+
+str;Jugl.Console.error(msg);throw invalidHTML;}
+if(this.element.node.xml&&this.template.xmldom){while(this.element.node.firstChild){this.element.node.removeChild(this.element.node.firstChild);}
+this.template.xmldom.loadXML(wrapper.outerHTML);var children=this.template.xmldom.firstChild.childNodes;try{for(var i=0;i<children.length;++i){this.element.node.appendChild(children[i]);}}catch(invalidXML){msg="Can't transform string into valid XHTML : "+
+str;Jugl.Console.error(msg);throw invalidXML;}}else{try{this.element.node.innerHTML=wrapper.innerHTML;}catch(invalidXML){msg="Can't transform string into valid XHTML : "+
+str;Jugl.Console.error(msg);throw invalidXML;}}}}else{var text;if(this.element.node.xml&&this.template.xmldom){text=this.template.xmldom.createTextNode(str);}else{text=document.createTextNode(str);}
+var child=new Jugl.Element(this.template,text);this.element.removeChildNodes();this.element.appendChild(child);}
+return true;},"replace":function(){var pair=this.splitExpressionPrefix();var str;try{str=this.evalInScope(pair[1]);}catch(err){Jugl.Console.error("Failed to eval in element scope: "+
+pair[1]);throw err;}
+this.removeSelf();if(pair[0]=='structure'){var wrapper=document.createElement('div');try{wrapper.innerHTML=str;}catch(err){msg="Can't transform string into valid HTML : "+
+str;Jugl.Console.error(msg);throw err;}
+if(this.element.node.xml&&this.template.xmldom){try{this.template.xmldom.loadXML(wrapper.outerHTML);}catch(err){msg="Can't transform string into valid XML : "+
+str;Jugl.Console.error(msg);throw err;}
+wrapper=this.template.xmldom.firstChild;}
+while(wrapper.firstChild){var child=wrapper.removeChild(wrapper.firstChild);if(this.element.node.ownerDocument&&this.element.node.ownerDocument.importNode){if(child.ownerDocument!=this.element.node.ownerDocument){child=this.element.node.ownerDocument.importNode(child,true);}}
+this.element.node.parentNode.insertBefore(child,this.element.node);}}else{var text;if(this.element.node.xml&&this.template.xmldom){text=this.template.xmldom.createTextNode(str);}else{text=document.createTextNode(str);}
+var replacement=new Jugl.Element(this.template,text);this.element.insertBefore(replacement);}
+this.element.removeSelf();return true;},"attributes":function(){var values=this.getAttributeValues();var pair,name,value;for(var i=0;i<values.length;++i){pair=this.splitAttributeValue(values[i]);name=pair[0];value=this.evalInScope(pair[1]);if(value!==false){this.element.setAttribute(name,value);}}
+this.removeSelf();return true;},"omit-tag":function(){var omit;try{omit=((this.nodeValue=="")||!!(this.evalInScope(this.nodeValue)));}catch(err){Jugl.Console.error("Failed to eval in element scope: "+
+this.nodeValue);throw err;}
+this.removeSelf();if(omit){var children=this.element.getChildNodes();var child;for(var i=0;i<children.length;++i){this.element.insertBefore(children[i]);}
+this.element.removeSelf();}},"reflow":function(){var reflow;try{reflow=((this.nodeValue=="")||!!(this.evalInScope(this.nodeValue)));}catch(err){Jugl.Console.error("Failed to eval in element scope: "+
+this.nodeValue);throw err;}
+this.removeSelf();if(reflow){if(this.element.node.outerHTML){this.element.node.outerHTML=this.element.node.outerHTML;}else{this.element.node.innerHTML=this.element.node.innerHTML;}}}},CLASS_NAME:"Jugl.Attribute"});Jugl.Element=Jugl.Class({template:null,node:null,scope:null,initialize:function(template,node){this.template=template;this.node=node;this.scope=new Object();this.scope.repeat=new Object();},clone:function(){var node=this.node.cloneNode(true);node.removeAttribute("id");var element=new Jugl.Element(this.template,node);Jugl.Object.extend(element.scope,this.scope);return element;},getAttribute:function(localName){var node;if(this.node.nodeType==1){if(this.template.usingNS){node=this.node.getAttributeNodeNS(Jugl.namespaceURI,localName);}else{node=this.node.getAttributeNode(Jugl.prefix+":"+
+localName);}
+if(node&&!node.specified){node=false;}}
+var attribute;if(node){attribute=new Jugl.Attribute(this,node,localName);}else{attribute=node;}
+return attribute;},setAttribute:function(name,value){this.node.setAttribute(name,value);},removeAttributeNode:function(attribute){this.node.removeAttributeNode(attribute.node);},getChildNodes:function(){var numNodes=this.node.childNodes.length;var children=new Array(numNodes);var node,scope;for(var i=0;i<numNodes;++i){node=new Jugl.Element(this.template,this.node.childNodes[i]);node.scope=Jugl.Object.extend({},this.scope);children[i]=node;}
+return children;},removeChildNodes:function(){while(this.node.hasChildNodes()){this.node.removeChild(this.node.firstChild);}},removeChild:function(element){this.node.removeChild(element.node);return node;},removeSelf:function(){this.node.parentNode.removeChild(this.node);},importNode:function(element){if(this.node.ownerDocument&&this.node.ownerDocument.importNode){if(element.node.ownerDocument!=this.node.ownerDocument){element.node=this.node.ownerDocument.importNode(element.node,true);}}},appendChild:function(element){this.importNode(element);this.node.appendChild(element.node);},insertAfter:function(element){this.importNode(element);var parent=this.node.parentNode;var sibling=this.node.nextSibling;if(sibling){parent.insertBefore(element.node,sibling);}else{parent.appendChild(element.node);}},insertBefore:function(element){this.importNode(element);var parent=this.node.parentNode;parent.insertBefore(element.node,this.node);},process:function(){var attribute;var keepProcessing=true;var series=["define","condition","repeat"];for(var i=0;i<series.length;++i){attribute=this.getAttribute(series[i]);if(attribute){try{keepProcessing=attribute.process();}catch(err){Jugl.Console.error("Failed to process "+
+series[i]+" attribute");throw err;}
+if(!keepProcessing){return;}}}
+var content=this.getAttribute("content");if(content){try{content.process();}catch(err){Jugl.Console.error("Failed to process content attribute");throw err;}}else{var replace=this.getAttribute("replace");if(replace){try{replace.process();}catch(err){Jugl.Console.error("Failed to process replace attribute");throw err;}}}
+var attributes=this.getAttribute("attributes");if(attributes){try{attributes.process();}catch(err){Jugl.Console.error("Failed to process attributes attribute");throw err;}}
+if(!content&&!replace){this.processChildNodes();}
+var omit=this.getAttribute("omit-tag");if(omit){try{omit.process();}catch(err){Jugl.Console.error("Failed to process omit-tag attribute");throw err;}}
+var reflow=this.getAttribute("reflow");if(reflow){try{reflow.process();}catch(err){Jugl.Console.error("Failed to process reflow attribute");throw err;}}},processChildNodes:function(){var children=this.getChildNodes();for(var i=0;i<children.length;++i){try{children[i].process();}catch(err){Jugl.Console.error("Failed to process child node: "+i);throw err;}}},CLASS_NAME:"Jugl.Element"});Jugl.Template=Jugl.Class({node:null,usingNS:false,xhtmlns:"http://www.w3.org/1999/xhtml",xmldom:window.ActiveXObject?new ActiveXObject("Microsoft.XMLDOM"):null,regExes:{trimSpace:(/^\s*(\w+)\s+(.*?)\s*$/)},loaded:false,loading:false,initialize:function(config){if(typeof config=="string"||(config&&config.nodeType==1)){config={node:config};}
+config=config||{};if(typeof(config.node)=="string"){config.node=document.getElementById(config.node);if(!config.node){throw Error("Element id not found: "+config.node);}}
+if(config.node){this.node=config.node;this.loaded=true;}else if(config.url){this.load({url:config.url,callback:config.callback,scope:config.scope});}},process:function(config){if(config&&!config.context&&!config.clone&&!config.string&&!config.parent){config={context:config}}
+config=Jugl.Object.applyDefaults(config,{context:null,clone:false,string:false});if(this.node.getAttributeNodeNS){if(this.node.getAttributeNodeNS(Jugl.xhtmlns,Jugl.prefix)){this.usingNS=true;}}
+var element=new Jugl.Element(this,this.node);if(config.clone){element=element.clone();}
+if(config.context){element.scope=config.context;}
+try{element.process();}catch(err){Jugl.Console.error("Failed to process "+
+this.node.nodeName+" node");throw err;}
+var data;if(config.string){if(element.node.innerHTML){data=element.node.innerHTML;}else{if(this.xmldom){data=element.node.xml;}else{var serializer=new XMLSerializer();data=serializer.serializeToString(element.node);}}}else{data=element.node;if(config.parent){if(config.clone){data=Jugl.Node.appendChild(config.parent,element.node);}else{this.appendTo(config.parent);}}}
+return data;},load:function(config){if(typeof config=="string"){config={url:config};}
+config=config||{};this.loading=true;var setNode=function(template){this.node=template.node;this.loading=false;this.loaded=true;if(config.callback){config.callback.apply(config.scope,[template]);}}
+Jugl.Request.loadTemplate(config.url,setNode,this);},appendTo:function(parent){this.node=Jugl.Node.appendChild(parent,this.node);return this;},CLASS_NAME:"Jugl.Template"});window["http://jugl.tschaub.net/trunk/lib/Jugl.js"]=Jugl;})();
\ No newline at end of file
Modified: sandbox/topp/almanac/examples/KMLParser.html
===================================================================
--- sandbox/topp/almanac/examples/KMLParser.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/KMLParser.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,6 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers KML Parser Example</title>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function parseData(req) {
Modified: sandbox/topp/almanac/examples/accessible.html
===================================================================
--- sandbox/topp/almanac/examples/accessible.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/accessible.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,13 +2,8 @@
<head>
<title>OpenLayers Accessible Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
-
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid #eee;
- }
table {
border: 1 px solid white;
padding: 0;
@@ -90,7 +85,7 @@
pan <em>w</em>est
</a>
</td>
- <td id="map"></td>
+ <td id="map" class="smallmap"></td>
<td>
<a href="javascript: void map.pan(map.getSize().w / 4, 0);"
accesskey="e">
Modified: sandbox/topp/almanac/examples/animated_panning.html
===================================================================
--- sandbox/topp/almanac/examples/animated_panning.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/animated_panning.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,18 +2,7 @@
<head>
<title>Animated Panning of the Map via map.panTo</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 256px;
- border: 1px solid black;
- }
- #map2 {
- width: 512px;
- height: 256px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer, running = false;
@@ -86,7 +75,7 @@
<h1 id="title">map.panTo Example</h1>
<div id="tags">map.panTo</div>
<div id="shortdesc">Show animated panning effects in the map</div>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs">
<p>This is an example of transition effects. If the new random center is in the current extent, the map will pan smoothly. <br />
The random selection will continue until you press it again. Additionally, you can single click in the map to pan smoothly
@@ -94,7 +83,7 @@
</p>
</div>
<button onclick="setCenterInterval()">Start/stop random recenter</button>
- <div id="map2"></div>
+ <div id="map2" class="smallmap"></div>
<div>
<p>To turn off Animated Panning, create a map with an panMethod set to
null. </p>
Modified: sandbox/topp/almanac/examples/attribution.html
===================================================================
--- sandbox/topp/almanac/examples/attribution.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/attribution.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,14 +2,7 @@
<head>
<title>OpenLayers Attribution Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
-
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
@@ -48,7 +41,7 @@
Shows the use of the attribution layer option on a number of layer types.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs">
This is an example of how to add an attribution block to the OpenLayers window. In order to use an
Modified: sandbox/topp/almanac/examples/baseLayers.html
===================================================================
--- sandbox/topp/almanac/examples/baseLayers.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/baseLayers.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -3,13 +3,8 @@
<title>OpenLayers Base Layers Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
- #map {
- width: 512;
- height: 512px;
- border: 1px solid black;
- background-color: blue;
- }
#controls
{
width: 512px;
@@ -89,7 +84,7 @@
</p>
<div id="controls">
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div style="background-color:green" onclick="add()"> click to add a marker to the map</div>
<div style="background-color:red" onclick="remove()"> click to remove the marker from the map</div>
Modified: sandbox/topp/almanac/examples/boxes-vector.html
===================================================================
--- sandbox/topp/almanac/examples/boxes-vector.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/boxes-vector.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,13 +2,7 @@
<head>
<title>OpenLayers Boxes Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var box_extents = [
@@ -53,7 +47,7 @@
Demonstrate marker and box type annotations on a map.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs"></div>
</body>
Modified: sandbox/topp/almanac/examples/boxes.html
===================================================================
--- sandbox/topp/almanac/examples/boxes.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/boxes.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,13 +2,7 @@
<head>
<title>OpenLayers Boxes Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var box_extents = [
@@ -52,7 +46,7 @@
Demonstrate marker and box type annotations on a map.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs"></div>
</body>
Copied: sandbox/topp/almanac/examples/browser-name.html (from rev 7342, trunk/openlayers/examples/browser-name.html)
===================================================================
--- sandbox/topp/almanac/examples/browser-name.html (rev 0)
+++ sandbox/topp/almanac/examples/browser-name.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -0,0 +1,89 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>OpenLayers Example</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 type="text/javascript">
+ // making this a global variable so that it is accessible for
+ // debugging/inspecting in Firebug
+ var map = null;
+
+ function init(){
+
+ //set title name to include Browser Detection
+ // this is the only way to test the functionality
+ // of the getBrowserName() function
+ //
+ var header = OpenLayers.Util.getElement("browserHeader");
+ header.innerHTML = "(browser: ";
+ var browserCode = OpenLayers.Util.getBrowserName();
+ switch (browserCode) {
+ case "opera":
+ browserName = "Opera";
+ break;
+ case "msie":
+ browserName = "Internet Explorer";
+ break;
+ case "safari":
+ browserName = "Safari";
+ break;
+ case "firefox":
+ browserName = "FireFox";
+ break;
+ case "mozilla":
+ browserName = "Mozilla";
+ break;
+ default:
+ browserName = "detection error"
+ break;
+ }
+ header.innerHTML += browserName + ")";
+
+ map = new OpenLayers.Map('map');
+
+ var options = {
+ resolutions: [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101]
+ };
+
+ var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+ "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},
+ options);
+
+ var options2 = {
+ resolutions: [0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101]
+ };
+ var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
+ "http://t1.hypercube.telascience.org/cgi-bin/landsat7",
+ {layers: "landsat7"}, options2);
+
+ var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
+ "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
+ {layers: "bathymetry,land_fn,park,drain_fn,drainage," +
+ "prov_bound,fedlimit,rail,road,popplace",
+ transparent: "true", format: "image/png"},
+ {minResolution: 0.17578125,
+ maxResolution: 0.703125});
+
+ map.addLayers([ol_wms, jpl_wms, dm_wms]);
+ map.addControl(new OpenLayers.Control.LayerSwitcher());
+ // map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+ map.zoomToMaxExtent();
+ }
+ </script>
+ </head>
+ <body onload="init()">
+ <h1 id="title" style="display:inline;">Example Showing Browser Name</h1>
+ <h3 id="browserHeader" style="display:inline;"></h3>
+
+ <div id="tags"></div>
+
+ <p id="shortdesc">
+ Demonstrate a simple map that shows the browser name.
+ </p>
+
+ <div id="map" class="smallmap"></div>
+
+ <div id="docs"></div>
+ </body>
+</html>
Modified: sandbox/topp/almanac/examples/buffer.html
===================================================================
--- sandbox/topp/almanac/examples/buffer.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/buffer.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,13 +2,7 @@
<head>
<title>OpenLayers Buffer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 0;
@@ -45,7 +39,7 @@
This example shows the use of the buffer layer option for any layer that inherits from OpenLayers.Layer.Grid.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs">
Use the buffer property to control how many tiles are included
Modified: sandbox/topp/almanac/examples/click-handler.html
===================================================================
--- sandbox/topp/almanac/examples/click-handler.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/click-handler.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -3,6 +3,7 @@
<title>OpenLayers Click Handler Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
#map {
width: 340px;
@@ -161,7 +162,7 @@
This example shows the use of the click handler.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<p>
The click handler can be used to gain more flexibility over handling
click events. The handler can be constructed with options to handle
Modified: sandbox/topp/almanac/examples/click.html
===================================================================
--- sandbox/topp/almanac/examples/click.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/click.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -3,16 +3,10 @@
<title>OpenLayers Click Event Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
-OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
+ OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control, {
defaultHandlerOptions: {
'single': true,
'double': false,
@@ -78,7 +72,7 @@
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs">
Using the Click handler allows you to (for example) catch clicks without catching double clicks, something that standard browser events don't do for you. (Try double clicking: you'll zoom in, whereas using the browser click event, you would just get two alerts.) This example click control shows you how to use it.
Modified: sandbox/topp/almanac/examples/controls.html
===================================================================
--- sandbox/topp/almanac/examples/controls.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/controls.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -3,28 +3,27 @@
<title>OpenLayers Map Controls Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
function init(){
- map = new OpenLayers.Map('map', { controls: [] });
+ map = new OpenLayers.Map('map', {
+ controls: [
+ new OpenLayers.Control.PanZoomBar(),
+ new OpenLayers.Control.MouseToolbar(),
+ new OpenLayers.Control.LayerSwitcher({'ascending':false}),
+ new OpenLayers.Control.Permalink(),
+ new OpenLayers.Control.ScaleLine(),
+ new OpenLayers.Control.Permalink('permalink'),
+ new OpenLayers.Control.MousePosition(),
+ new OpenLayers.Control.OverviewMap(),
+ new OpenLayers.Control.KeyboardDefaults()
+ ],
+ numZoomLevels: 6
+
+ });
- map.addControl(new OpenLayers.Control.PanZoomBar());
- map.addControl(new OpenLayers.Control.MouseToolbar());
- map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
- map.addControl(new OpenLayers.Control.Permalink());
- map.addControl(new OpenLayers.Control.ScaleLine());
- map.addControl(new OpenLayers.Control.Permalink('permalink'));
- map.addControl(new OpenLayers.Control.MousePosition());
- map.addControl(new OpenLayers.Control.OverviewMap());
- map.addControl(new OpenLayers.Control.KeyboardDefaults());
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
@@ -57,7 +56,7 @@
</p>
<a style="float:right" href="" id="permalink">Permalink</a>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs"></div>
</body>
Modified: sandbox/topp/almanac/examples/custom-control-point.html
===================================================================
--- sandbox/topp/almanac/examples/custom-control-point.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/custom-control-point.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,14 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>OpenLayers Custom Control Point Examle</title>
+ <title>OpenLayers Custom Control Point Examle</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
@@ -54,7 +48,7 @@
Demonstrate the addition of a point reporting control to the OpenLayers window.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="bounds"></div>
<div id="docs"></div>
Modified: sandbox/topp/almanac/examples/custom-control.html
===================================================================
--- sandbox/topp/almanac/examples/custom-control.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/custom-control.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,13 +2,7 @@
<head>
<title>Custom Control Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
@@ -58,7 +52,7 @@
Demonstrate the addition of a draggable rectangle to the OpenLayers window.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs"></div>
</body>
Modified: sandbox/topp/almanac/examples/custom-style.html
===================================================================
--- sandbox/topp/almanac/examples/custom-style.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/custom-style.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -3,12 +3,8 @@
<title>Custom Style Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid gray;
- }
p {
width: 500px;
}
@@ -47,7 +43,7 @@
Demonstrate changing CSS styles on controls in the OpenLayers window.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs">
<p>If you care to modify the style of any OpenLayers element, include
Modified: sandbox/topp/almanac/examples/debug.html
===================================================================
--- sandbox/topp/almanac/examples/debug.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/debug.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Debug Example</title>
-
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
Modified: sandbox/topp/almanac/examples/doubleSetCenter.html
===================================================================
--- sandbox/topp/almanac/examples/doubleSetCenter.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/doubleSetCenter.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -4,12 +4,7 @@
<script src="../lib/OpenLayers.js"></script>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width:512px;
- height:521px;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<h1 id="title">Double Set Center Example</h1>
@@ -20,7 +15,7 @@
Demonstrate the behavior of two calls to set the center after instatiating the layer object.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');
Modified: sandbox/topp/almanac/examples/drag-feature.html
===================================================================
--- sandbox/topp/almanac/examples/drag-feature.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/drag-feature.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -3,12 +3,8 @@
<title>Drag Feature Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid gray;
- }
#controls {
width: 512px;
}
@@ -72,7 +68,7 @@
Demonstrates point, line and polygon creation and editing.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="controls">
<ul id="controlToggle">
Modified: sandbox/topp/almanac/examples/draw-feature.html
===================================================================
--- sandbox/topp/almanac/examples/draw-feature.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/draw-feature.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -3,12 +3,8 @@
<title>Draw Feature Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid gray;
- }
#controlToggle li {
list-style: none;
}
@@ -74,7 +70,7 @@
Demonstrate on-screen digitizing tools for point, line, and polygon creation.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<ul id="controlToggle">
<li>
Modified: sandbox/topp/almanac/examples/editingtoolbar-outside.html
===================================================================
--- sandbox/topp/almanac/examples/editingtoolbar-outside.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/editingtoolbar-outside.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,6 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
.olControlEditingToolbar {
float:left;
@@ -9,11 +10,6 @@
height: 30px;
width: 150px;
}
- #map {
- width: 512px;
- height: 256px;
- border: 1px solid gray;
- }
</style>
<script src="../lib/Firebug/firebug.js"></script>
<script src="../lib/OpenLayers.js"></script>
@@ -45,8 +41,8 @@
</script>
</head>
<body onload="init()">
- <h3>OpenLayers EditingToolbar Outside Viewport</h3>
- <div id="map"></div>
+ <h1 id="title">OpenLayers EditingToolbar Outside Viewport</h1>
+ <div id="map" class="smallmap"></div>
<div id="panel" class="olControlEditingToolbar"></div>
</body>
</html>
Modified: sandbox/topp/almanac/examples/editingtoolbar.html
===================================================================
--- sandbox/topp/almanac/examples/editingtoolbar.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/editingtoolbar.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -4,13 +4,7 @@
<title>OpenLayers Editing Toolbar Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script src="../lib/Firebug/debug.js"></script>
<script type="text/javascript">
@@ -20,15 +14,17 @@
var map, layer;
function init(){
- map = new OpenLayers.Map( 'map', { controls: [] } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
- map.addLayer(layer);
vlayer = new OpenLayers.Layer.Vector( "Editable" );
- map.addLayer(vlayer);
- map.addControl(new OpenLayers.Control.PanZoomBar());
- map.addControl(new OpenLayers.Control.EditingToolbar(vlayer));
+ map = new OpenLayers.Map( 'map', {
+ controls: [
+ new OpenLayers.Control.PanZoom(),
+ new OpenLayers.Control.EditingToolbar(vlayer)
+ ]
+ });
+ map.addLayers([layer, vlayer]);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
@@ -44,7 +40,7 @@
</p>
<div id="panel"></div>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs"></div>
</body>
Modified: sandbox/topp/almanac/examples/events.html
===================================================================
--- sandbox/topp/almanac/examples/events.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/events.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,12 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Event Handling</title>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
- #map {
- width: 512px;
- height: 256px;
- border: 1px solid gray;
- }
#panel {
margin: 5px;
height: 30px;
@@ -146,7 +142,7 @@
Demonstrating various styles of event handling in OpenLayers.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="panel"></div>
<textarea id="output"></textarea>
<div id="docs"></div>
Copied: sandbox/topp/almanac/examples/example-list.html (from rev 7342, trunk/openlayers/examples/example-list.html)
===================================================================
--- sandbox/topp/almanac/examples/example-list.html (rev 0)
+++ sandbox/topp/almanac/examples/example-list.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -0,0 +1,239 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
+<html>
+ <head>
+ <!-- This is the example list source: if you are trying to look at the
+ source of an example, YOU ARE IN THE WRONG PLACE. If you want to view
+ the source of just one example, you can typically choose
+ "This Frame -> View source" when right clicking on the exmaple. If not,
+ choose to open the example in a new window (via the context menu
+ click on the link), and view source from there. -->
+ <title>OpenLayers Examples</title>
+ <link rel="alternate" href="example-list.xml" type="application/atom+xml" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
+ <style type="text/css">
+ html, body {
+ height: 100%;
+ overflow: hidden;
+ margin: 0;
+ padding: 0;
+ line-height: 1.25em;
+ }
+ .ex_container{
+ border-bottom: 1px solid #cccccc;
+ }
+ .ex_container a {
+ text-decoration: none;
+ padding: 5px 1em;
+ display: block;
+ }
+ .ex_container a:hover {
+ background-color: #eeeeee;
+ }
+ .ex_title{
+ display: inline;
+ font-weight: bold;
+ color: #333;
+ }
+ .ex_filename {
+ font-weight: normal;
+ font-size: 0.8em;
+ color: #ccc
+ }
+ .ex_description{
+ color: #222;
+ padding: 3px;
+ }
+ .ex_classes{
+ font-size: .7em;
+ color: grey;
+ display: none;
+ }
+ #toc {
+ width: 30%;
+ height: 100%;
+ }
+ #filter {
+ top: 0px;
+ height: 50px;
+ padding: 10px 1em 10px 1em;
+ }
+ #examples {
+ border-top: 1px solid #cccccc;
+ position: absolute;
+ width: 30%;
+ top: 70px;
+ bottom: 0px;
+ overflow: auto;
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+ #examples ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ }
+ #examples ul li {
+ display: block;
+ margin: 0;
+ padding: 0;
+ }
+ #exwin {
+ position: absolute;
+ top: 0;
+ left: 30%;
+ width: 70%;
+ height: 100%;
+ border: none;
+ border-left: 1px solid #cccccc;
+ margin: 0;
+ }
+ </style>
+ <script type="text/javascript" src="Jugl.js"></script>
+ <script type="text/javascript" src="example-list.js"></script>
+ <script type="text/javascript">
+ // import
+ var Jugl = window["http://jugl.tschaub.net/trunk/lib/Jugl.js"];
+ var template, target;
+
+ function listExamples(examples) {
+ target.innerHTML = "";
+ var node = template.process({
+ context: {examples: examples},
+ clone: true,
+ parent: target
+ });
+ document.getElementById("count").innerHTML = "(" + examples.length + ")";
+ }
+
+ var timerId;
+ function inputChange() {
+ if(timerId) {
+ window.clearTimeout(timerId);
+ }
+ var text = this.value;
+ timerId = window.setTimeout(function() {
+ filterList(text);
+ }, 500);
+ }
+
+ function filterList(text) {
+ var examples;
+ if(text.length < 2) {
+ examples = info.examples;
+ } else {
+ var words = text.split(/\W+/);
+ var scores = {};
+ for(var i=0; i<words.length; ++i) {
+ var word = words[i].toLowerCase()
+ var dict = info.index[word];
+ if(dict) {
+ for(exIndex in dict) {
+ var count = dict[exIndex];
+ if(scores[exIndex]) {
+ if(scores[exIndex][word]) {
+ scores[exIndex][word] += count;
+ } else {
+ scores[exIndex][word] = count;
+ }
+ } else {
+ scores[exIndex] = {};
+ scores[exIndex][word] = count;
+ }
+ }
+ }
+ }
+ examples = [];
+ for(var j in scores) {
+ var ex = info.examples[j];
+ ex.score = scores[j];
+ examples.push(ex);
+ }
+ // sort examples by first by number of words matched, then
+ // by word frequency
+ examples.sort(function(a, b) {
+ var cmp;
+ var aWords = 0, bWords = 0;
+ var aScore = 0, bScore = 0;
+ for(var i in a.score) {
+ aScore += a.score[i];
+ aWords += 1;
+ }
+ for(var j in b.score) {
+ bScore += b.score[j];
+ bWords += 1;
+ }
+ if(aWords == bWords) {
+ cmp = bScore - aScore;
+ } else {
+ cmp = bWords - aWords;
+ }
+ return cmp;
+ });
+ }
+ listExamples(examples);
+ }
+
+ function showAll() {
+ document.getElementById("keywords").value = "";
+ listExamples(info.examples);
+ }
+
+ function parseQuery() {
+ var params = {};
+ var list = window.location.search.substring(1).split("&");
+ for(var i=0; i<list.length; ++i) {
+ var pair = list[i].split("=");
+ if(pair.length == 2) {
+ params[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);
+ }
+ }
+ if(params["q"]) {
+ var input = document.getElementById("keywords");
+ input.value = params["q"];
+ inputChange.call(input);
+ }
+ }
+ window.onload = function() {
+ template = new Jugl.Template("template");
+ target = document.getElementById("examples");
+ listExamples(info.examples);
+ document.getElementById("exwin").src = "../examples/example.html";
+ document.getElementById("keywords").onkeyup = inputChange
+ parseQuery();
+ };
+ </script>
+ </head>
+ <body>
+ <div id="toc">
+ <div id="filter">
+ <p>
+ <label for="keywords">Filter by keywords</label><br />
+ <input type="text" id="keywords" />
+ <span id="count"></span><br />
+ <a href="javascript:void showAll();">show all</a>
+ </p>
+ </div>
+ <div id="examples"></div>
+ </div>
+ <iframe id="exwin" name="exwin" frameborder="0"></iframe>
+ <div style="display: none;">
+ <ul id="template">
+ <li class="ex_container" jugl:repeat="example examples">
+ <a jugl:attributes="href example.link" target="exwin">
+ <h5 class="ex_title">
+ <span jugl:replace="example.title">title</span><br />
+ <span class="ex_filename" jugl:content="'(' + example.example + ')'">filename</span>
+ </h5>
+ <div class="ex_description" jugl:content="example.shortdesc">
+ Short Description goes here
+ </div>
+ <p class="ex_classes" jugl:content="example.classes">
+ Related Classes go here
+ </p>
+ </a>
+ </li>
+ </ul>
+ </div>
+ </body>
+</html>
Modified: sandbox/topp/almanac/examples/example.html
===================================================================
--- sandbox/topp/almanac/examples/example.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/example.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,13 +2,7 @@
<head>
<title>OpenLayers Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
// making this a global variable so that it is accessible for
@@ -17,79 +11,46 @@
function init(){
- //set title name to include Browser Detection
- // this is the only way to test the functionality
- // of the getBrowserName() function
- //
- var header = OpenLayers.Util.getElement("browserHeader");
- header.innerHTML = "(browser: ";
- var browserCode = OpenLayers.Util.getBrowserName();
- switch (browserCode) {
- case "opera":
- browserName = "Opera";
- break;
- case "msie":
- browserName = "Internet Explorer";
- break;
- case "safari":
- browserName = "Safari";
- break;
- case "firefox":
- browserName = "FireFox";
- break;
- case "mozilla":
- browserName = "Mozilla";
- break;
- default:
- browserName = "detection error"
- break;
- }
- header.innerHTML += browserName + ")";
-
map = new OpenLayers.Map('map');
- var options = {
- resolutions: [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101]
- };
+ var ol_wms = new OpenLayers.Layer.WMS(
+ "OpenLayers WMS",
+ "http://labs.metacarta.com/wms/vmap0",
+ {layers: 'basic'}
+ );
- var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
- "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'},
- options);
-
- var options2 = {
- resolutions: [0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.00137329101]
- };
- var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
+ var jpl_wms = new OpenLayers.Layer.WMS(
+ "NASA Global Mosaic",
"http://t1.hypercube.telascience.org/cgi-bin/landsat7",
- {layers: "landsat7"}, options2);
+ {layers: "landsat7"}
+ );
- var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
+ var dm_wms = new OpenLayers.Layer.WMS(
+ "DM Solutions Demo",
"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
- {layers: "bathymetry,land_fn,park,drain_fn,drainage," +
- "prov_bound,fedlimit,rail,road,popplace",
- transparent: "true", format: "image/png"},
- {minResolution: 0.17578125,
- maxResolution: 0.703125});
+ {
+ layers: "bathymetry,land_fn,park,drain_fn,drainage," +
+ "prov_bound,fedlimit,rail,road,popplace",
+ transparent: "true", format: "image/png"},
+ {
+ minResolution: 0.17578125,
+ maxResolution: 0.703125
+ }
+ );
map.addLayers([ol_wms, jpl_wms, dm_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
- // map.setCenter(new OpenLayers.LonLat(0, 0), 0);
map.zoomToMaxExtent();
}
</script>
</head>
<body onload="init()">
- <h1 id="title" style="display:inline;">OpenLayers Example</h1>
- <h3 id="browserHeader" style="display:inline;"></h3>
-
+ <h1 id="title">OpenLayers Example</h1>
<div id="tags"></div>
-
<p id="shortdesc">
Demonstrate a simple map with an overlay that includes layer switching controls.
</p>
-
- <div id="map"></div>
-
+ <div id="map" class="smallmap"></div>
<div id="docs"></div>
</body>
</html>
Modified: sandbox/topp/almanac/examples/fractional-zoom.html
===================================================================
--- sandbox/topp/almanac/examples/fractional-zoom.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/fractional-zoom.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,13 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 256px;
- border: 1px solid gray;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map;
@@ -51,7 +45,7 @@
Shows the use of a map with fractional (or non-discrete) zoom levels.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<input type="checkbox" name="fractional"
id="fractional" checked="checked" onclick="update(this)" />
<label for="fractional">Fractional Zoom</label>
Modified: sandbox/topp/almanac/examples/fullScreen.html
===================================================================
--- sandbox/topp/almanac/examples/fullScreen.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/fullScreen.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,19 +1,21 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>Full Screen Example</title>
-
+ <title>Full Screen Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
+ body {
+ margin: 0;
+ }
#map {
width: 100%;
height: 100%;
- border: 1px solid black;
}
#text {
position: absolute;
- bottom: 0px;
- left:0px;
+ bottom: 1em;
+ left: 1em;
width: 512px;
}
</style>
Deleted: sandbox/topp/almanac/examples/fullScreen2.html
===================================================================
--- sandbox/topp/almanac/examples/fullScreen2.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/fullScreen2.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,52 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Full Screen Example 2</title>
-
- <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 100%;
- height: 100%;
- border: 1px solid black;
- }
- </style>
- <script src="../lib/OpenLayers.js"></script>
- <script type="text/javascript">
- var map;
- function init(){
- map = new OpenLayers.Map('map');
-
- var options = {numZoomLevels: 3};
-
- var docImage = new OpenLayers.Layer.Image(
- 'Full Screen',
- 'fullscreen.jpg',
- new OpenLayers.Bounds(-156, -90, 156, 90),
- new OpenLayers.Size(1121, 650),
- options);
-
- map.addLayers([docImage]);
- // map.setCenter(new OpenLayers.LonLat(0, 0), 0);
- map.zoomToMaxExtent();
- }
- </script>
- </head>
- <body onload="init()">
- <div id="map"></div>
-
- <div id="text">
- <h1 id="title">Full Screen Example</h1>
-
- <div id="tags"></div>
-
- <p id="shortdesc">
- Demonstrate a map that fill the entire browser window.
- </p>
-
- <div id="docs">
- This example uses CSS to define the dimensions of the map element in order to fill the screen.
- When the user resizes the window, the map size changes correspondingly. No scroll bars!
- </div>
- </div>
- </body>
-</html>
Deleted: sandbox/topp/almanac/examples/fullscreen.jpg
===================================================================
(Binary files differ)
Modified: sandbox/topp/almanac/examples/geojson.html
===================================================================
--- sandbox/topp/almanac/examples/geojson.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/geojson.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,13 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 800px;
- height: 475px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
@@ -62,6 +56,7 @@
</script>
</head>
<body onload="init()">
- <div id="map"></div>
+ <h1 id="title">GeoJSON Example</h1>
+ <div id="map" class="smallmap"></div>
</body>
</html>
Modified: sandbox/topp/almanac/examples/georss-flickr.html
===================================================================
--- sandbox/topp/almanac/examples/georss-flickr.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/georss-flickr.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,13 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
- #map {
- width: 800px;
- height: 400px;
- border: 1px solid black;
- }
-
.olPopupContent {
font-size: smaller;
}
@@ -32,7 +27,7 @@
style = new OpenLayers.Style({externalGraphic: "${thumbnail}"});
// create a rule with a point symbolizer that will make the thumbnail
- // larger if the title of the rss item conatins "powder"
+ // larger if the title of the rss item contains "powder"
var rule = new OpenLayers.Rule({
symbolizer: {pointRadius: 30},
filter: new OpenLayers.Filter.Comparison({
@@ -108,8 +103,8 @@
</script>
</head>
<body onload="init()">
- <h1>GeoRSS from Flickr in OpenLayers</h1>
+ <h1 id="title">GeoRSS from Flickr in OpenLayers</h1>
<p>The displayed GeoRSS feed has a <tt><media:thumbnail/></tt> property for each item. An extended <tt>createFeatureFromItem()</tt> function is used to add this attribute to the attributes hash of each feature read in by <tt>OpenLayers.Format.GeoRSS</tt>. The example is configured with a style to render each item with its thumbnail image. Also, to show how rules work, we defined a rule that if the title of an rss item contains "powder", it will be rendered larger than the others.</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
</body>
</html>
Modified: sandbox/topp/almanac/examples/georss-markers.html
===================================================================
--- sandbox/topp/almanac/examples/georss-markers.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/georss-markers.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,14 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>OpenLayers GeoRSS Marker Example</title>
+ <title>OpenLayers GeoRSS Marker Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
@@ -38,7 +32,7 @@
Demonstrate loading a GeoRSS feed using the GeoRSS parser.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs"></div>
</body>
Deleted: sandbox/topp/almanac/examples/georss-serialize.html
===================================================================
--- sandbox/topp/almanac/examples/georss-serialize.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/georss-serialize.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,58 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>OpenLayers GeoRSS Serialize Example</title>
- <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid gray;
- }
- </style>
- <script src="../lib/OpenLayers.js"></script>
- <script type="text/javascript">
- var map, drawControl, g;
- function serialize(feature) {
- feature.attributes = {};
- var name = prompt("Title for feature?");
- feature.attributes['title'] = name;
- var data = g.write(feature.layer.features);
- OpenLayers.Util.getElement("gml").value = data;
- }
- function init(){
- g = new OpenLayers.Format.GeoRSS();
- map = new OpenLayers.Map('map');
-
- var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
- "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
-
- var pointLayer = new OpenLayers.Layer.Vector("Point Layer");
- pointLayer.onFeatureInsert = serialize;
-
- map.addLayers([wmsLayer, pointLayer]);
- map.addControl(new OpenLayers.Control.EditingToolbar(pointLayer));
- map.addControl(new OpenLayers.Control.MousePosition());
-
-
- map.setCenter(new OpenLayers.LonLat(0, 0), 3);
- }
- </script>
- </head>
- <body onload="init()">
- <h1 id="title">Draw Point Example</h1>
-
- <div id="tags"></div>
-
- <p id="shortdesc">
- Demonstrate serialization of features in a Vector layer to GeoRSS.
- </p>
-
- <div style="float:right;width:50%">
- <textarea id="gml" style="width:100%" rows="30"></textarea>
- </div>
-
- <div id="map"></div>
-
- <div id="docs"></div>
- </body>
-</html>
Modified: sandbox/topp/almanac/examples/georss.html
===================================================================
--- sandbox/topp/almanac/examples/georss.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/georss.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,14 +1,8 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
- <title>OpenLayers GeoRSS Example</title>
+ <title>OpenLayers GeoRSS Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
@@ -41,7 +35,7 @@
Display a couple of locally cached georss feeds on an a basemap.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs">
<p>This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are
Modified: sandbox/topp/almanac/examples/getfeatureinfo.html
===================================================================
--- sandbox/topp/almanac/examples/getfeatureinfo.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/getfeatureinfo.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -3,6 +3,7 @@
<title>OpenLayers Feature Info Example</title>
<script src="../lib/OpenLayers.js"></script>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
ul, li { padding-left: 0px; margin-left: 0px; }
</style>
@@ -24,7 +25,7 @@
<div id="nodeList">
</div>
</div>
- <div id="map" style="width:512px; height:512px"></div>
+ <div id="map" class="smallmap"></div>
<script defer="defer" type="text/javascript">
OpenLayers.ProxyHost = "/dev/examples/proxy.cgi?url=";
Modified: sandbox/topp/almanac/examples/gml-layer.html
===================================================================
--- sandbox/topp/almanac/examples/gml-layer.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/gml-layer.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,13 +2,7 @@
<head>
<title>OpenLayers GML Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
+ <link rel="stylesheet" href="style.css" type="text/css" />
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var lon = 5;
@@ -35,7 +29,7 @@
Loads locally stored GML vector data on a basemap. Includes GML example file.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs"></div>
</body>
Deleted: sandbox/topp/almanac/examples/gml-serialize.html
===================================================================
--- sandbox/topp/almanac/examples/gml-serialize.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/gml-serialize.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -1,97 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>OpenLayers GML Serialization Example</title>
- <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 350px;
- border: 1px solid gray;
- }
- </style>
- <script src="../lib/OpenLayers.js"></script>
- <script type="text/javascript">
- var map, drawControl, g;
- function serialize(feature) {
- feature.attributes = {};
- var name = prompt("Name for feature?");
- feature.attributes['name'] = name;
- var data = g.write(feature.layer.features);
- OpenLayers.Util.getElement("gml").value = data;
- }
- function init(){
- g = new OpenLayers.Format.GML();
- map = new OpenLayers.Map('map');
-
- var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
- "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
-
- var pointLayer = new OpenLayers.Layer.Vector("Point Layer");
- pointLayer.onFeatureInsert = serialize;
-
- map.addLayers([wmsLayer, pointLayer]);
- map.addControl(new OpenLayers.Control.LayerSwitcher());
- map.addControl(new OpenLayers.Control.MousePosition());
-
- drawControls = {
- point: new OpenLayers.Control.DrawFeature(pointLayer,
- OpenLayers.Handler.Point),
- line: new OpenLayers.Control.DrawFeature(pointLayer,
- OpenLayers.Handler.Path)
- };
-
- for(var key in drawControls) {
- map.addControl(drawControls[key]);
- }
-
- map.setCenter(new OpenLayers.LonLat(0, 0), 3);
- }
-
- function toggleControl(element) {
- for(key in drawControls) {
- var control = drawControls[key];
- if(element.value == key && element.checked) {
- control.activate();
- } else {
- control.deactivate();
- }
- }
- }
- </script>
- </head>
- <body onload="init()">
- <h1 id="title">GML Serialization Example</h1>
-
- <div id="tags"></div>
-
- <p id="shortdesc">
- Demonstrate the serialization of features drawn in the OpenLayers window.
- </p>
-
- <div style="float:right">
- <ul id="controlToggle">
- <li>
- <input type="radio" name="type" value="none" id="noneToggle"
- onclick="toggleControl(this);" checked="checked" />
- <label for="noneToggle">navigate</label>
- </li>
- <li>
- <input type="radio" name="type" value="point" id="pointToggle" onclick="toggleControl(this);" />
- <label for="pointToggle">draw point</label>
- </li>
- <li>
- <input type="radio" name="type" value="line" id="lineToggle" onclick="toggleControl(this);" />
- <label for="lineToggle">draw line</label>
- </li>
- </ul>
-
- <p>Check the box to draw points. Uncheck to navigate normally.</p>
-
- <textarea id="gml" cols="80" rows="30"></textarea>
- </div>
-
- <div id="map"></div>
-
- <div id="docs"></div>
- </body>
-</html>
Modified: sandbox/topp/almanac/examples/google-reproject.html
===================================================================
--- sandbox/topp/almanac/examples/google-reproject.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/google-reproject.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,14 +2,7 @@
<head>
<title>OpenLayers Google with Overlay Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
-
+ <link rel="stylesheet" href="style.css" type="text/css" />
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
<script src="../lib/OpenLayers.js"></script>
@@ -38,7 +31,6 @@
map.setCenter(new OpenLayers.LonLat(10.205188,48.857593), 5);
map.addControl( new OpenLayers.Control.LayerSwitcher() );
- map.addControl( new OpenLayers.Control.PanZoomBar() );
}
</script>
</head>
@@ -51,7 +43,7 @@
Demonstrate a Google basemap used with boundary overlay layer.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs">
An overlay in a Geographic projection can be stretched to somewhat
Modified: sandbox/topp/almanac/examples/google.html
===================================================================
--- sandbox/topp/almanac/examples/google.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/google.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,14 +2,7 @@
<head>
<title>OpenLayers Google Layer Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
- <style type="text/css">
- #map {
- width: 512px;
- height: 512px;
- border: 1px solid black;
- }
- </style>
-
+ <link rel="stylesheet" href="style.css" type="text/css" />
<!-- this gmaps key generated for http://openlayers.org/dev/ -->
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
<script src="../lib/OpenLayers.js"></script>
@@ -52,7 +45,7 @@
Demonstrate use of the various types of Google layers.
</p>
- <div id="map"></div>
+ <div id="map" class="smallmap"></div>
<div id="docs">
For best performance, you must be using a version of the Google Maps
Modified: sandbox/topp/almanac/examples/gutter.html
===================================================================
--- sandbox/topp/almanac/examples/gutter.html 2008-06-10 21:48:50 UTC (rev 7344)
+++ sandbox/topp/almanac/examples/gutter.html 2008-06-10 22:00:41 UTC (rev 7345)
@@ -2,12 +2,8 @@
<head>
<title>OpenLayers Gutter Example</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+ <link rel="stylesheet&