Unmixing line endings. No functional change.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9038 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-03-12 20:04:34 +00:00
parent 086506b926
commit 13833e0a67
15 changed files with 1033 additions and 1033 deletions

View File

@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
]>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 12.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 51448) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
<!ENTITY ns_svg "http://www.w3.org/2000/svg">
]>
<svg version="1.1" id="Layer_1" xmlns:i="&ns_ai;"
xmlns="&ns_svg;" width="20.5" height="24.5" viewBox="0 0 20.5 24.5"
overflow="visible" enable-background="new 0 0 20.5 24.5" xml:space="preserve">
<g i:extraneous="self">
<rect x="0.25" y="0.25" opacity="0" stroke="#000000" stroke-width="1" width="20" height="24"/>
<g id="XMLID_2_">
<g>
<polygon fill="#FF0000" points="10.12,0.6 19.93,7.71 10.06,24.03 0.6,7.58 "/>
</g>
<g>
<polyline fill="none" stroke="#000000" stroke-width="1" points="9.98,24.16 10.06,24.03 19.93,7.71 20.06,7.49 "/>
<polyline fill="none" stroke="#000000" stroke-width="1" points="10.13,24.16 10.06,24.03 0.6,7.58 0.5,7.41 "/>
<polyline fill="none" stroke="#000000" stroke-width="1" points="0.41,7.72 0.6,7.58 10.12,0.6 10.29,0.47 "/>
<polyline fill="none" stroke="#000000" stroke-width="1" points="9.94,0.47 10.12,0.6 19.93,7.71 20.06,7.8 "/>
</g>
</g>
<ellipse stroke="#000000" stroke-width="1" cx="10.125" cy="9.25" rx="1.5" ry="1.5"/>
</g>
</svg>
xmlns="&ns_svg;" width="20.5" height="24.5" viewBox="0 0 20.5 24.5"
overflow="visible" enable-background="new 0 0 20.5 24.5" xml:space="preserve">
<g i:extraneous="self">
<rect x="0.25" y="0.25" opacity="0" stroke="#000000" stroke-width="1" width="20" height="24"/>
<g id="XMLID_2_">
<g>
<polygon fill="#FF0000" points="10.12,0.6 19.93,7.71 10.06,24.03 0.6,7.58 "/>
</g>
<g>
<polyline fill="none" stroke="#000000" stroke-width="1" points="9.98,24.16 10.06,24.03 19.93,7.71 20.06,7.49 "/>
<polyline fill="none" stroke="#000000" stroke-width="1" points="10.13,24.16 10.06,24.03 0.6,7.58 0.5,7.41 "/>
<polyline fill="none" stroke="#000000" stroke-width="1" points="0.41,7.72 0.6,7.58 10.12,0.6 10.29,0.47 "/>
<polyline fill="none" stroke="#000000" stroke-width="1" points="9.94,0.47 10.12,0.6 19.93,7.71 20.06,7.8 "/>
</g>
</g>
<ellipse stroke="#000000" stroke-width="1" cx="10.125" cy="9.25" rx="1.5" ry="1.5"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,49 +1,49 @@
Customizing OpenLayers
======================
OpenLayers is designed to fit many needs -- fitting in alongside all kinds of
various applications which are currently in use.
Currently, OpenLayers supports a 'theme' option when creating a map. This
theme option allows you to specify the location of a CSS theme which should
be included.
A default theme is available as an example in the theme/ directory: the setup
is:
* theme/
* theme/default/
* theme/default/style.css
* theme/default/img/
Currently, the OpenLayers code does not support class names, and therefore,
it is not possible to control many aspects of OpenLayers code with CSS
classes. However, with this framework in place, we expect to invest time
to make existing features and new features use the CSS theming framework
where apropriate.
Class Naming
============
Elements should have class names which are descriptive of the Javascript
class from which they come. For example, the main layer switcher element
in the OpenLayers.Control.LayerSwitcher would be classed:
olControlLayerSwitcher
This would allow users to add to their style.css class in their theme,
changing, for example:
::
.olControlLayerSwitcher input {
width:10px;
}
Sub elements of a particular control can add to the class name:
::
.olControlLayerSwitcherBaseLabel {
color: red;
}
Customizing OpenLayers
======================
OpenLayers is designed to fit many needs -- fitting in alongside all kinds of
various applications which are currently in use.
Currently, OpenLayers supports a 'theme' option when creating a map. This
theme option allows you to specify the location of a CSS theme which should
be included.
A default theme is available as an example in the theme/ directory: the setup
is:
* theme/
* theme/default/
* theme/default/style.css
* theme/default/img/
Currently, the OpenLayers code does not support class names, and therefore,
it is not possible to control many aspects of OpenLayers code with CSS
classes. However, with this framework in place, we expect to invest time
to make existing features and new features use the CSS theming framework
where apropriate.
Class Naming
============
Elements should have class names which are descriptive of the Javascript
class from which they come. For example, the main layer switcher element
in the OpenLayers.Control.LayerSwitcher would be classed:
olControlLayerSwitcher
This would allow users to add to their style.css class in their theme,
changing, for example:
::
.olControlLayerSwitcher input {
width:10px;
}
Sub elements of a particular control can add to the class name:
::
.olControlLayerSwitcherBaseLabel {
color: red;
}

View File

@@ -1,7 +1,7 @@
Automatically generated OpenLayers API documentation is online:
http://dev.openlayers.org/apidocs
More information on documentation is available from:
http://trac.openlayers.org/wiki/Documentation
Automatically generated OpenLayers API documentation is online:
http://dev.openlayers.org/apidocs
More information on documentation is available from:
http://trac.openlayers.org/wiki/Documentation

View File

@@ -1,56 +1,56 @@
<html>
<head>
<title>Pan and Zoom Panels</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<!--
-- Special stylesheet inclusion for ie6, which doesn't handle the alpha
-- channel of images correctly. The special ie6 stylesheet will only
-- be included if the browser running is ie6. For now, the only thing it
-- does is load alternative, non-alpha pngs for the zoom/pan panels.
-->
<!--[if lte IE 6]>
<link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
<![endif]-->
<link rel="stylesheet" href="style.css" type="text/css" />
<script type="text/javascript" src="../lib/OpenLayers.js"></script>
<script>
var map;
var lon = 5;
var lat = 40;
var zoom = 5;
function init(){
map = new OpenLayers.Map("map", {
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanPanel(),
new OpenLayers.Control.ZoomPanel()
]
});
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'}
);
map.addLayers([wms]);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
</script>
</head>
<body onload='init();'>
<h1 id="title">Pan and Zoom Panels</h1>
<div id="tags"></div>
<p id="shortdesc">Customizable pan and zoom panels</p>
</p>
<div id="map" class="smallmap"></div>
<p id="docs">
The pan and zoom panels allow you to use CSS styling to change the
look and feel of the panels, including changing their position
and their icons without needing to change any code.
</p>
</body>
</html>
<html>
<head>
<title>Pan and Zoom Panels</title>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<!--
-- Special stylesheet inclusion for ie6, which doesn't handle the alpha
-- channel of images correctly. The special ie6 stylesheet will only
-- be included if the browser running is ie6. For now, the only thing it
-- does is load alternative, non-alpha pngs for the zoom/pan panels.
-->
<!--[if lte IE 6]>
<link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
<![endif]-->
<link rel="stylesheet" href="style.css" type="text/css" />
<script type="text/javascript" src="../lib/OpenLayers.js"></script>
<script>
var map;
var lon = 5;
var lat = 40;
var zoom = 5;
function init(){
map = new OpenLayers.Map("map", {
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanPanel(),
new OpenLayers.Control.ZoomPanel()
]
});
var wms = new OpenLayers.Layer.WMS(
"OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'}
);
map.addLayers([wms]);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
</script>
</head>
<body onload='init();'>
<h1 id="title">Pan and Zoom Panels</h1>
<div id="tags"></div>
<p id="shortdesc">Customizable pan and zoom panels</p>
</p>
<div id="map" class="smallmap"></div>
<p id="docs">
The pan and zoom panels allow you to use CSS styling to change the
look and feel of the panels, including changing their position
and their icons without needing to change any code.
</p>
</body>
</html>

View File

@@ -1,85 +1,85 @@
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Control.js
*/
/**
* Class: OpenLayers.Control.Pan
* The Pan control is a single button to pan the map in one direction. For
* a more complete control see <OpenLayers.Control.PanPanel>.
*
* Inherits from:
* - <OpenLayers.Control>
*/
OpenLayers.Control.Pan = OpenLayers.Class(OpenLayers.Control, {
/**
* APIProperty: slideFactor
* {Integer} Number of pixels by which we'll pan the map in any direction
* on clicking the arrow buttons.
*/
slideFactor: 50,
/**
* Property: direction
* {String} in {'North', 'South', 'East', 'West'}
*/
direction: null,
/**
* Property: type
* {String} The type of <OpenLayers.Control> -- When added to a
* <Control.Panel>, 'type' is used by the panel to determine how to
* handle our events.
*/
type: OpenLayers.Control.TYPE_BUTTON,
/**
* Constructor: OpenLayers.Control.Pan
* Control which handles the panning (in any of the cardinal directions)
* of the map by a set px distance.
*
* Parameters:
* direction - {String} The direction this button should pan.
* options - {Object} An optional object whose properties will be used
* to extend the control.
*/
initialize: function(direction, options) {
this.direction = direction;
this.CLASS_NAME += this.direction;
OpenLayers.Control.prototype.initialize.apply(this, [options]);
},
/**
* Method: trigger
*/
trigger: function(){
switch (this.direction) {
case OpenLayers.Control.Pan.NORTH:
this.map.pan(0, -this.slideFactor);
break;
case OpenLayers.Control.Pan.SOUTH:
this.map.pan(0, this.slideFactor);
break;
case OpenLayers.Control.Pan.WEST:
this.map.pan(-this.slideFactor, 0);
break;
case OpenLayers.Control.Pan.EAST:
this.map.pan(this.slideFactor, 0);
break;
}
},
CLASS_NAME: "OpenLayers.Control.Pan"
});
OpenLayers.Control.Pan.NORTH = "North";
OpenLayers.Control.Pan.SOUTH = "South";
OpenLayers.Control.Pan.EAST = "East";
OpenLayers.Control.Pan.WEST = "West";
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Control.js
*/
/**
* Class: OpenLayers.Control.Pan
* The Pan control is a single button to pan the map in one direction. For
* a more complete control see <OpenLayers.Control.PanPanel>.
*
* Inherits from:
* - <OpenLayers.Control>
*/
OpenLayers.Control.Pan = OpenLayers.Class(OpenLayers.Control, {
/**
* APIProperty: slideFactor
* {Integer} Number of pixels by which we'll pan the map in any direction
* on clicking the arrow buttons.
*/
slideFactor: 50,
/**
* Property: direction
* {String} in {'North', 'South', 'East', 'West'}
*/
direction: null,
/**
* Property: type
* {String} The type of <OpenLayers.Control> -- When added to a
* <Control.Panel>, 'type' is used by the panel to determine how to
* handle our events.
*/
type: OpenLayers.Control.TYPE_BUTTON,
/**
* Constructor: OpenLayers.Control.Pan
* Control which handles the panning (in any of the cardinal directions)
* of the map by a set px distance.
*
* Parameters:
* direction - {String} The direction this button should pan.
* options - {Object} An optional object whose properties will be used
* to extend the control.
*/
initialize: function(direction, options) {
this.direction = direction;
this.CLASS_NAME += this.direction;
OpenLayers.Control.prototype.initialize.apply(this, [options]);
},
/**
* Method: trigger
*/
trigger: function(){
switch (this.direction) {
case OpenLayers.Control.Pan.NORTH:
this.map.pan(0, -this.slideFactor);
break;
case OpenLayers.Control.Pan.SOUTH:
this.map.pan(0, this.slideFactor);
break;
case OpenLayers.Control.Pan.WEST:
this.map.pan(-this.slideFactor, 0);
break;
case OpenLayers.Control.Pan.EAST:
this.map.pan(this.slideFactor, 0);
break;
}
},
CLASS_NAME: "OpenLayers.Control.Pan"
});
OpenLayers.Control.Pan.NORTH = "North";
OpenLayers.Control.Pan.SOUTH = "South";
OpenLayers.Control.Pan.EAST = "East";
OpenLayers.Control.Pan.WEST = "West";

View File

@@ -1,44 +1,44 @@
/**
* @requires OpenLayers/Control/Panel.js
* @requires OpenLayers/Control/Pan.js
*/
/**
* Class: OpenLayers.Control.PanPanel
* The PanPanel is visible control for panning the map North, South, East or
* West in small steps. By default it is drawn in the top left corner of the
* map.
*
* Note: If you wish to use this class with the default images and you want
* it to look nice in ie6, you should add the following, conditionally
* added css stylesheet to your HTML file:
*
* <!--[if lte IE 6]>
* <link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
* <![endif]-->
*
* Inherits from:
* - <OpenLayers.Control.Panel>
*/
OpenLayers.Control.PanPanel = OpenLayers.Class(OpenLayers.Control.Panel, {
/**
* Constructor: OpenLayers.Control.PanPanel
* Add the four directional pan buttons.
*
* Parameters:
* options - {Object} An optional object whose properties will be used
* to extend the control.
*/
initialize: function(options) {
OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
this.addControls([
new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH),
new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH),
new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST),
new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST)
]);
},
CLASS_NAME: "OpenLayers.Control.PanPanel"
});
/**
* @requires OpenLayers/Control/Panel.js
* @requires OpenLayers/Control/Pan.js
*/
/**
* Class: OpenLayers.Control.PanPanel
* The PanPanel is visible control for panning the map North, South, East or
* West in small steps. By default it is drawn in the top left corner of the
* map.
*
* Note: If you wish to use this class with the default images and you want
* it to look nice in ie6, you should add the following, conditionally
* added css stylesheet to your HTML file:
*
* <!--[if lte IE 6]>
* <link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
* <![endif]-->
*
* Inherits from:
* - <OpenLayers.Control.Panel>
*/
OpenLayers.Control.PanPanel = OpenLayers.Class(OpenLayers.Control.Panel, {
/**
* Constructor: OpenLayers.Control.PanPanel
* Add the four directional pan buttons.
*
* Parameters:
* options - {Object} An optional object whose properties will be used
* to extend the control.
*/
initialize: function(options) {
OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
this.addControls([
new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH),
new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH),
new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST),
new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST)
]);
},
CLASS_NAME: "OpenLayers.Control.PanPanel"
});

View File

@@ -1,34 +1,34 @@
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Control.js
*/
/**
* Class: OpenLayers.Control.ZoomIn
* The ZoomIn control is a button to increase the zoom level of a map.
*
* Inherits from:
* - <OpenLayers.Control>
*/
OpenLayers.Control.ZoomIn = OpenLayers.Class(OpenLayers.Control, {
/**
* Property: type
* {String} The type of <OpenLayers.Control> -- When added to a
* <Control.Panel>, 'type' is used by the panel to determine how to
* handle our events.
*/
type: OpenLayers.Control.TYPE_BUTTON,
/**
* Method: trigger
*/
trigger: function(){
this.map.zoomIn();
},
CLASS_NAME: "OpenLayers.Control.ZoomIn"
});
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Control.js
*/
/**
* Class: OpenLayers.Control.ZoomIn
* The ZoomIn control is a button to increase the zoom level of a map.
*
* Inherits from:
* - <OpenLayers.Control>
*/
OpenLayers.Control.ZoomIn = OpenLayers.Class(OpenLayers.Control, {
/**
* Property: type
* {String} The type of <OpenLayers.Control> -- When added to a
* <Control.Panel>, 'type' is used by the panel to determine how to
* handle our events.
*/
type: OpenLayers.Control.TYPE_BUTTON,
/**
* Method: trigger
*/
trigger: function(){
this.map.zoomIn();
},
CLASS_NAME: "OpenLayers.Control.ZoomIn"
});

View File

@@ -1,34 +1,34 @@
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Control.js
*/
/**
* Class: OpenLayers.Control.ZoomOut
* The ZoomOut control is a button to decrease the zoom level of a map.
*
* Inherits from:
* - <OpenLayers.Control>
*/
OpenLayers.Control.ZoomOut = OpenLayers.Class(OpenLayers.Control, {
/**
* Property: type
* {String} The type of <OpenLayers.Control> -- When added to a
* <Control.Panel>, 'type' is used by the panel to determine how to
* handle our events.
*/
type: OpenLayers.Control.TYPE_BUTTON,
/**
* Method: trigger
*/
trigger: function(){
this.map.zoomOut();
},
CLASS_NAME: "OpenLayers.Control.ZoomOut"
});
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Control.js
*/
/**
* Class: OpenLayers.Control.ZoomOut
* The ZoomOut control is a button to decrease the zoom level of a map.
*
* Inherits from:
* - <OpenLayers.Control>
*/
OpenLayers.Control.ZoomOut = OpenLayers.Class(OpenLayers.Control, {
/**
* Property: type
* {String} The type of <OpenLayers.Control> -- When added to a
* <Control.Panel>, 'type' is used by the panel to determine how to
* handle our events.
*/
type: OpenLayers.Control.TYPE_BUTTON,
/**
* Method: trigger
*/
trigger: function(){
this.map.zoomOut();
},
CLASS_NAME: "OpenLayers.Control.ZoomOut"
});

View File

@@ -1,50 +1,50 @@
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Control/Panel.js
* @requires OpenLayers/Control/ZoomIn.js
* @requires OpenLayers/Control/ZoomOut.js
* @requires OpenLayers/Control/ZoomToMaxExtent.js
*/
/**
* Class: OpenLayers.Control.ZoomPanel
* The ZoomPanel control is a compact collecton of 3 zoom controls - a
* <OpenLayers.Control.ZoomIn>, a <OpenLayers.Control.ZoomToMaxExtent>, and a
* <OpenLayers.Control.ZoomOut>. By default it is drawn in the upper left
* corner of the map.
*
* Note: If you wish to use this class with the default images and you want
* it to look nice in ie6, you should add the following, conditionally
* added css stylesheet to your HTML file:
*
* <!--[if lte IE 6]>
* <link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
* <![endif]-->
*
* Inherits from:
* - <OpenLayers.Control.Panel>
*/
OpenLayers.Control.ZoomPanel = OpenLayers.Class(OpenLayers.Control.Panel, {
/**
* Constructor: OpenLayers.Control.ZoomPanel
* Add the three zooming controls.
*
* Parameters:
* options - {Object} An optional object whose properties will be used
* to extend the control.
*/
initialize: function(options) {
OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
this.addControls([
new OpenLayers.Control.ZoomIn(),
new OpenLayers.Control.ZoomToMaxExtent(),
new OpenLayers.Control.ZoomOut()
]);
},
CLASS_NAME: "OpenLayers.Control.ZoomPanel"
});
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Control/Panel.js
* @requires OpenLayers/Control/ZoomIn.js
* @requires OpenLayers/Control/ZoomOut.js
* @requires OpenLayers/Control/ZoomToMaxExtent.js
*/
/**
* Class: OpenLayers.Control.ZoomPanel
* The ZoomPanel control is a compact collecton of 3 zoom controls - a
* <OpenLayers.Control.ZoomIn>, a <OpenLayers.Control.ZoomToMaxExtent>, and a
* <OpenLayers.Control.ZoomOut>. By default it is drawn in the upper left
* corner of the map.
*
* Note: If you wish to use this class with the default images and you want
* it to look nice in ie6, you should add the following, conditionally
* added css stylesheet to your HTML file:
*
* <!--[if lte IE 6]>
* <link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
* <![endif]-->
*
* Inherits from:
* - <OpenLayers.Control.Panel>
*/
OpenLayers.Control.ZoomPanel = OpenLayers.Class(OpenLayers.Control.Panel, {
/**
* Constructor: OpenLayers.Control.ZoomPanel
* Add the three zooming controls.
*
* Parameters:
* options - {Object} An optional object whose properties will be used
* to extend the control.
*/
initialize: function(options) {
OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
this.addControls([
new OpenLayers.Control.ZoomIn(),
new OpenLayers.Control.ZoomToMaxExtent(),
new OpenLayers.Control.ZoomOut()
]);
},
CLASS_NAME: "OpenLayers.Control.ZoomPanel"
});

View File

@@ -1,121 +1,121 @@
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Lang.js
*/
/**
* Namespace: OpenLayers.Lang["nb"]
* Dictionary for norwegian bokm<6B>l (Norway). Keys for entries are used in calls to
* <OpenLayers.Lang.translate>. Entry bodies are normal strings or
* strings formatted for use with <OpenLayers.String.format> calls.
*/
OpenLayers.Lang["nb"] = {
'unhandledRequest': "Ubehandlet foresp<73>rsel returnerte ${statusText}",
'permalink': "Kobling til denne siden",
'overlays': "Kartlag",
'baseLayer': "Bakgrunnskart",
'sameProjection':
"Oversiktskartet fungerer bare n<>r det har samme projeksjon som hovedkartet",
'readNotImplemented': "Lesing er ikke implementert.",
'writeNotImplemented': "Skriving er ikke implementert.",
'noFID': "Kan ikke oppdatere feature (objekt) som ikke har FID.",
'errorLoadingGML': "Feil under lasting av GML-fil ${url}",
'browserNotSupported':
"Din nettleser st<73>tter ikke vektortegning. F<>lgende tegnemetoder st<73>ttes:\n${renderers}",
'componentShouldBe': "addFeatures : komponenten m<> v<>re en ${geomType}",
// console message
'getFeatureError':
"getFeatureFromEvent kj<6B>rt mot lag uten tegnemetode. Dette betyr som regel at du " +
"fjernet et lag uten <20> fjerne alle handlere tilknyttet laget.",
// console message
'minZoomLevelError':
"Egenskapen minZoomLevel er kun tenkt for bruk p<> lag " +
"basert p<> FixedZoomLevels. At dette wfs-laget sjekker " +
"minZoomLevel er en fortidslevning. Det kan dog ikke " +
"tas bort uten <20> risikere at OL-baserte applikasjoner " +
"slutter <20> virke, s<> det er merket som foreldet: " +
"minZoomLevel i sjekken nedenfor vil fjernes i 3.0. " +
"Vennligst bruk innstillingene for min/maks oppl<70>sning " +
"som er beskrevet her: "+
"http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS-transaksjon: SUKSESS ${response}",
'commitFailed': "WFS-transaksjon: FEILET ${response}",
'googleWarning':
"Google-laget kunne ikke lastes.<br><br>" +
"Bytt til et annet bakgrunnslag i lagvelgeren i " +
"<22>vre h<>yre hj<68>rne for <20> slippe denne meldingen.<br><br>" +
"Sannsynligvis for<6F>rsakes feilen av at Google Maps-biblioteket " +
"ikke er riktig inkludert p<> nettsiden, eller at det ikke er " +
"angitt riktig API-n<>kkel for nettstedet.<br><br>" +
"Utviklere: For hjelp til <20> f<> dette til <20> virke se "+
"<a href='http://trac.openlayers.org/wiki/Google' " +
"target='_blank'>her</a>.",
'getLayerWarning':
"${layerType}-laget kunne ikke lastes.<br><br>" +
"Bytt til et annet bakgrunnslag i lagvelgeren i " +
"<22>vre h<>yre hj<68>rne for <20> slippe denne meldingen.<br><br>" +
"Sannsynligvis for<6F>rsakes feilen av at " +
"${layerLib}-biblioteket ikke var riktig inkludert " +
"p<> nettsiden.<br><br>" +
"Utviklere: For hjelp til <20> f<> dette til <20> virke se " +
"<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
"target='_blank'>her</a>.",
'scale': "<strong>Skala</strong> 1 : ${scaleDenom}",
// console message
'layerAlreadyAdded':
"Du fors<72>kte <20> legge til laget ${layerName} p<> kartet, men det er allerede lagt til",
// console message
'reprojectDeprecated':
"Du bruker innstillingen 'reproject' p<> laget ${layerName}. " +
"Denne innstillingen er foreldet, den var ment for <20> st<73>tte " +
"visning av kartdata over kommersielle bakgrunnskart, men det " +
"b<>r n<> gj<67>res med st<73>tten for Spherical Mercator. Mer informasjon " +
"finnes p<> " +
"http://trac.openlayers.org/wiki/SphericalMercator.",
// console message
'methodDeprecated':
"Denne metoden er markert som foreldet og vil bli fjernet i 3.0. " +
"Bruk ${newMethod} i stedet.",
// console message
'boundsAddError': "Du m<> gi b<>de x- og y-verdier til funksjonen add.",
// console message
'lonlatAddError': "Du m<> gi b<>de lon- og lat-verdier til funksjonen add.",
// console message
'pixelAddError': "Du m<> gi b<>de x- og y-verdier til funksjonen add.",
// console message
'unsupportedGeometryType': "Ust<73>ttet geometritype: ${geomType}",
// console message
'pagePositionFailed':
"OpenLayers.Util.pagePosition feilet: elementet med id ${elemId} kan v<>re feilplassert.",
'end': ''
};
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Lang.js
*/
/**
* Namespace: OpenLayers.Lang["nb"]
* Dictionary for norwegian bokm<6B>l (Norway). Keys for entries are used in calls to
* <OpenLayers.Lang.translate>. Entry bodies are normal strings or
* strings formatted for use with <OpenLayers.String.format> calls.
*/
OpenLayers.Lang["nb"] = {
'unhandledRequest': "Ubehandlet foresp<73>rsel returnerte ${statusText}",
'permalink': "Kobling til denne siden",
'overlays': "Kartlag",
'baseLayer': "Bakgrunnskart",
'sameProjection':
"Oversiktskartet fungerer bare n<>r det har samme projeksjon som hovedkartet",
'readNotImplemented': "Lesing er ikke implementert.",
'writeNotImplemented': "Skriving er ikke implementert.",
'noFID': "Kan ikke oppdatere feature (objekt) som ikke har FID.",
'errorLoadingGML': "Feil under lasting av GML-fil ${url}",
'browserNotSupported':
"Din nettleser st<73>tter ikke vektortegning. F<>lgende tegnemetoder st<73>ttes:\n${renderers}",
'componentShouldBe': "addFeatures : komponenten m<> v<>re en ${geomType}",
// console message
'getFeatureError':
"getFeatureFromEvent kj<6B>rt mot lag uten tegnemetode. Dette betyr som regel at du " +
"fjernet et lag uten <20> fjerne alle handlere tilknyttet laget.",
// console message
'minZoomLevelError':
"Egenskapen minZoomLevel er kun tenkt for bruk p<> lag " +
"basert p<> FixedZoomLevels. At dette wfs-laget sjekker " +
"minZoomLevel er en fortidslevning. Det kan dog ikke " +
"tas bort uten <20> risikere at OL-baserte applikasjoner " +
"slutter <20> virke, s<> det er merket som foreldet: " +
"minZoomLevel i sjekken nedenfor vil fjernes i 3.0. " +
"Vennligst bruk innstillingene for min/maks oppl<70>sning " +
"som er beskrevet her: "+
"http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS-transaksjon: SUKSESS ${response}",
'commitFailed': "WFS-transaksjon: FEILET ${response}",
'googleWarning':
"Google-laget kunne ikke lastes.<br><br>" +
"Bytt til et annet bakgrunnslag i lagvelgeren i " +
"<22>vre h<>yre hj<68>rne for <20> slippe denne meldingen.<br><br>" +
"Sannsynligvis for<6F>rsakes feilen av at Google Maps-biblioteket " +
"ikke er riktig inkludert p<> nettsiden, eller at det ikke er " +
"angitt riktig API-n<>kkel for nettstedet.<br><br>" +
"Utviklere: For hjelp til <20> f<> dette til <20> virke se "+
"<a href='http://trac.openlayers.org/wiki/Google' " +
"target='_blank'>her</a>.",
'getLayerWarning':
"${layerType}-laget kunne ikke lastes.<br><br>" +
"Bytt til et annet bakgrunnslag i lagvelgeren i " +
"<22>vre h<>yre hj<68>rne for <20> slippe denne meldingen.<br><br>" +
"Sannsynligvis for<6F>rsakes feilen av at " +
"${layerLib}-biblioteket ikke var riktig inkludert " +
"p<> nettsiden.<br><br>" +
"Utviklere: For hjelp til <20> f<> dette til <20> virke se " +
"<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
"target='_blank'>her</a>.",
'scale': "<strong>Skala</strong> 1 : ${scaleDenom}",
// console message
'layerAlreadyAdded':
"Du fors<72>kte <20> legge til laget ${layerName} p<> kartet, men det er allerede lagt til",
// console message
'reprojectDeprecated':
"Du bruker innstillingen 'reproject' p<> laget ${layerName}. " +
"Denne innstillingen er foreldet, den var ment for <20> st<73>tte " +
"visning av kartdata over kommersielle bakgrunnskart, men det " +
"b<>r n<> gj<67>res med st<73>tten for Spherical Mercator. Mer informasjon " +
"finnes p<> " +
"http://trac.openlayers.org/wiki/SphericalMercator.",
// console message
'methodDeprecated':
"Denne metoden er markert som foreldet og vil bli fjernet i 3.0. " +
"Bruk ${newMethod} i stedet.",
// console message
'boundsAddError': "Du m<> gi b<>de x- og y-verdier til funksjonen add.",
// console message
'lonlatAddError': "Du m<> gi b<>de lon- og lat-verdier til funksjonen add.",
// console message
'pixelAddError': "Du m<> gi b<>de x- og y-verdier til funksjonen add.",
// console message
'unsupportedGeometryType': "Ust<73>ttet geometritype: ${geomType}",
// console message
'pagePositionFailed':
"OpenLayers.Util.pagePosition feilet: elementet med id ${elemId} kan v<>re feilplassert.",
'end': ''
};

View File

@@ -1,121 +1,121 @@
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Lang.js
*/
/**
* Namespace: OpenLayers.Lang["sv-SE"]
* Dictionary for swedish (Sweden). Keys for entries are used in calls to
* <OpenLayers.Lang.translate>. Entry bodies are normal strings or
* strings formatted for use with <OpenLayers.String.format> calls.
*/
OpenLayers.Lang["sv-SE"] = {
'unhandledRequest': "Ej hanterad fr<66>ga retur ${statusText}",
'permalink': "Permal<61>nk",
'overlays': "Kartlager",
'baseLayer': "Bakgrundskarta",
'sameProjection':
"<22>versiktskartan fungerar endast n<>r den har samma projektion som huvudkartan",
'readNotImplemented': "L<>sning ej implementerad.",
'writeNotImplemented': "Skrivning ej implementerad.",
'noFID': "Kan ej uppdatera feature (objekt) f<>r vilket FID saknas.",
'errorLoadingGML': "Fel i laddning av GML-fil ${url}",
'browserNotSupported':
"Din webbl<62>sare st<73>der inte vektorvisning. F<>r n<>rvarande st<73>ds f<>ljande visning:\n${renderers}",
'componentShouldBe': "addFeatures : komponenten skall vara en ${geomType}",
// console message
'getFeatureError':
"getFeatureFromEvent anropad f<>r lager utan utritning. Detta betyder oftast att man " +
"raderat ett lager, men inte en hanterare som <20>r knuten till lagret.",
// console message
'minZoomLevelError':
"Egenskapen minZoomLevel <20>r endast avsedd att anv<6E>ndas " +
"med lager med FixedZoomLevels. Att detta WFS-lager " +
"kontrollerar minZoomLevel <20>r en relik fr<66>n <20>ldre versioner. " +
"Vi kan dock inte ta bort det utan att riskera att " +
"OL-baserade till<6C>mpningar som anv<6E>nder detta slutar " +
"fungera. D<>rf<72>r <20>r det satt som deprecated, minZoomLevel " +
"kommer att tas bort i version 3.0. Anv<6E>nd i st<73>llet " +
"inst<73>llning av min/max resolution som beskrivs h<>r: " +
"http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS-transaktion: LYCKADES ${response}",
'commitFailed': "WFS-transaktion: MISSLYCKADES ${response}",
'googleWarning':
"Google-lagret kunde inte laddas korrekt.<br><br>" +
"F<>r att slippa detta meddelande, v<>lj en annan bakgrundskarta " +
"i lagerv<72>ljaren i <20>vre h<>gra h<>rnet.<br><br>" +
"Sannolikt beror felet p<> att Google Maps-biblioteket " +
"inte <20>r inkluderat p<> webbsidan eller p<> att sidan " +
"inte anger korrekt API-nyckel f<>r webbplatsen.<br><br>" +
"Utvecklare: hj<68>lp f<>r att <20>tg<74>rda detta, " +
"<a href='http://trac.openlayers.org/wiki/Google' " +
"target='_blank'>klicka h<>r</a>.",
'getLayerWarning':
"${layerType}-lagret kunde inte laddas korrekt.<br><br>" +
"F<>r att slippa detta meddelande, v<>lj en annan bakgrundskarta " +
"i lagerv<72>ljaren i <20>vre h<>gra h<>rnet.<br><br>" +
"Sannolikt beror felet p<> att ${layerLib}-biblioteket " +
"inte <20>r inkluderat p<> webbsidan.<br><br>" +
"Utvecklare: hj<68>lp f<>r att <20>tg<74>rda detta, " +
"<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
"target='_blank'>klicka h<>r</a>.",
'scale': "<strong>Skala</strong> 1 : ${scaleDenom}",
// console message
'layerAlreadyAdded':
"Du f<>rs<72>kte l<>gga till lagret: ${layerName} p<> kartan, men det har lagts till tidigare",
// console message
'reprojectDeprecated':
"Du anv<6E>nder inst<73>llningen 'reproject' p<> lagret ${layerName}. " +
"Denna inst<73>llning markerad som deprecated: den var avsedd " +
"att anv<6E>ndas f<>r att st<73>dja visning av kartdata p<> kommersiella " +
"bakgrundskartor, men nu b<>r man i st<73>llet " +
"anv<6E>nda Spherical Mercator-st<73>d f<>r den funktionaliteten. " +
"Mer information finns " +
"p<> http://trac.openlayers.org/wiki/SphericalMercator.",
// console message
'methodDeprecated':
"Denna metod <20>r markerad som deprecated och kommer att tas bort i 3.0. " +
"Anv<6E>nd ${newMethod} i st<73>llet.",
// console message
'boundsAddError': "Du m<>ste skicka b<>de x- och y-v<>rde till funktionen add.",
// console message
'lonlatAddError': "Du m<>ste skicka b<>de lon- och lat-v<>rde till funktionen add.",
// console message
'pixelAddError': "Du m<>ste skicka b<>de x- och y-v<>rde till funktionen add.",
// console message
'unsupportedGeometryType': "St<53>d saknas f<>r geometritypen: ${geomType}",
// console message
'pagePositionFailed':
"OpenLayers.Util.pagePosition misslyckades: elementet med id ${elemId} kan placeras fel.",
'end': ''
};
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Lang.js
*/
/**
* Namespace: OpenLayers.Lang["sv-SE"]
* Dictionary for swedish (Sweden). Keys for entries are used in calls to
* <OpenLayers.Lang.translate>. Entry bodies are normal strings or
* strings formatted for use with <OpenLayers.String.format> calls.
*/
OpenLayers.Lang["sv-SE"] = {
'unhandledRequest': "Ej hanterad fr<66>ga retur ${statusText}",
'permalink': "Permal<61>nk",
'overlays': "Kartlager",
'baseLayer': "Bakgrundskarta",
'sameProjection':
"<22>versiktskartan fungerar endast n<>r den har samma projektion som huvudkartan",
'readNotImplemented': "L<>sning ej implementerad.",
'writeNotImplemented': "Skrivning ej implementerad.",
'noFID': "Kan ej uppdatera feature (objekt) f<>r vilket FID saknas.",
'errorLoadingGML': "Fel i laddning av GML-fil ${url}",
'browserNotSupported':
"Din webbl<62>sare st<73>der inte vektorvisning. F<>r n<>rvarande st<73>ds f<>ljande visning:\n${renderers}",
'componentShouldBe': "addFeatures : komponenten skall vara en ${geomType}",
// console message
'getFeatureError':
"getFeatureFromEvent anropad f<>r lager utan utritning. Detta betyder oftast att man " +
"raderat ett lager, men inte en hanterare som <20>r knuten till lagret.",
// console message
'minZoomLevelError':
"Egenskapen minZoomLevel <20>r endast avsedd att anv<6E>ndas " +
"med lager med FixedZoomLevels. Att detta WFS-lager " +
"kontrollerar minZoomLevel <20>r en relik fr<66>n <20>ldre versioner. " +
"Vi kan dock inte ta bort det utan att riskera att " +
"OL-baserade till<6C>mpningar som anv<6E>nder detta slutar " +
"fungera. D<>rf<72>r <20>r det satt som deprecated, minZoomLevel " +
"kommer att tas bort i version 3.0. Anv<6E>nd i st<73>llet " +
"inst<73>llning av min/max resolution som beskrivs h<>r: " +
"http://trac.openlayers.org/wiki/SettingZoomLevels",
'commitSuccess': "WFS-transaktion: LYCKADES ${response}",
'commitFailed': "WFS-transaktion: MISSLYCKADES ${response}",
'googleWarning':
"Google-lagret kunde inte laddas korrekt.<br><br>" +
"F<>r att slippa detta meddelande, v<>lj en annan bakgrundskarta " +
"i lagerv<72>ljaren i <20>vre h<>gra h<>rnet.<br><br>" +
"Sannolikt beror felet p<> att Google Maps-biblioteket " +
"inte <20>r inkluderat p<> webbsidan eller p<> att sidan " +
"inte anger korrekt API-nyckel f<>r webbplatsen.<br><br>" +
"Utvecklare: hj<68>lp f<>r att <20>tg<74>rda detta, " +
"<a href='http://trac.openlayers.org/wiki/Google' " +
"target='_blank'>klicka h<>r</a>.",
'getLayerWarning':
"${layerType}-lagret kunde inte laddas korrekt.<br><br>" +
"F<>r att slippa detta meddelande, v<>lj en annan bakgrundskarta " +
"i lagerv<72>ljaren i <20>vre h<>gra h<>rnet.<br><br>" +
"Sannolikt beror felet p<> att ${layerLib}-biblioteket " +
"inte <20>r inkluderat p<> webbsidan.<br><br>" +
"Utvecklare: hj<68>lp f<>r att <20>tg<74>rda detta, " +
"<a href='http://trac.openlayers.org/wiki/${layerLib}' " +
"target='_blank'>klicka h<>r</a>.",
'scale': "<strong>Skala</strong> 1 : ${scaleDenom}",
// console message
'layerAlreadyAdded':
"Du f<>rs<72>kte l<>gga till lagret: ${layerName} p<> kartan, men det har lagts till tidigare",
// console message
'reprojectDeprecated':
"Du anv<6E>nder inst<73>llningen 'reproject' p<> lagret ${layerName}. " +
"Denna inst<73>llning markerad som deprecated: den var avsedd " +
"att anv<6E>ndas f<>r att st<73>dja visning av kartdata p<> kommersiella " +
"bakgrundskartor, men nu b<>r man i st<73>llet " +
"anv<6E>nda Spherical Mercator-st<73>d f<>r den funktionaliteten. " +
"Mer information finns " +
"p<> http://trac.openlayers.org/wiki/SphericalMercator.",
// console message
'methodDeprecated':
"Denna metod <20>r markerad som deprecated och kommer att tas bort i 3.0. " +
"Anv<6E>nd ${newMethod} i st<73>llet.",
// console message
'boundsAddError': "Du m<>ste skicka b<>de x- och y-v<>rde till funktionen add.",
// console message
'lonlatAddError': "Du m<>ste skicka b<>de lon- och lat-v<>rde till funktionen add.",
// console message
'pixelAddError': "Du m<>ste skicka b<>de x- och y-v<>rde till funktionen add.",
// console message
'unsupportedGeometryType': "St<53>d saknas f<>r geometritypen: ${geomType}",
// console message
'pagePositionFailed':
"OpenLayers.Util.pagePosition misslyckades: elementet med id ${elemId} kan placeras fel.",
'end': ''
};

View File

@@ -1,147 +1,147 @@
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Layer/Grid.js
* @requires OpenLayers/Layer/KaMap.js
*/
/**
* Class: OpenLayers.Layer.KaMapCache
*
* This class is designed to talk directly to a web-accessible ka-Map
* cache generated by the precache2.php script.
*
* To create a a new KaMapCache layer, you must indicate also the "i" parameter
* (that will be used to calculate the file extension), and another special
* parameter, object names "metaTileSize", with "h" (height) and "w" (width)
* properties.
*
* // Create a new kaMapCache layer.
* var kamap_base = new OpenLayers.Layer.KaMapCache(
* "Satellite",
* "http://www.example.org/web/acessible/cache",
* {g: "satellite", map: "world", i: 'png24', metaTileSize: {w: 5, h: 5} }
* );
*
* // Create an kaMapCache overlay layer (using "isBaseLayer: false").
* // Forces the output to be a "gif", using the "i" parameter.
* var kamap_overlay = new OpenLayers.Layer.KaMapCache(
* "Streets",
* "http://www.example.org/web/acessible/cache",
* {g: "streets", map: "world", i: "gif", metaTileSize: {w: 5, h: 5} },
* {isBaseLayer: false}
* );
*
* The cache URLs must look like:
* var/cache/World/50000/Group_Name/def/t-440320/l20480
*
* This means that the cache generated via tile.php will *not* work with
* this class, and should instead use the KaMap layer.
*
* More information is available in Ticket #1518.
*
* Inherits from:
* - <OpenLayers.Layer.KaMap>
* - <OpenLayers.Layer.Grid>
*/
OpenLayers.Layer.KaMapCache = OpenLayers.Class(OpenLayers.Layer.KaMap, {
/**
* Constant: IMAGE_EXTENSIONS
* {Object} Simple hash map to convert format to extension.
*/
IMAGE_EXTENSIONS: {
'jpeg': 'jpg',
'gif' : 'gif',
'png' : 'png',
'png8' : 'png',
'png24' : 'png',
'dithered' : 'png'
},
/**
* Constant: DEFAULT_FORMAT
* {Object} Simple hash map to convert format to extension.
*/
DEFAULT_FORMAT: 'jpeg',
/**
* Constructor: OpenLayers.Layer.KaMapCache
*
* Parameters:
* name - {String}
* url - {String}
* params - {Object} Parameters to be sent to the HTTP server in the
* query string for the tile. The format can be set via the 'i'
* parameter (defaults to jpg) , and the map should be set via
* the 'map' parameter. It has been reported that ka-Map may behave
* inconsistently if your format parameter does not match the format
* parameter configured in your config.php. (See ticket #327 for more
* information.)
* options - {Object} Additional options for the layer. Any of the
* APIProperties listed on this layer, and any layer types it
* extends, can be overridden through the options parameter.
*/
initialize: function(name, url, params, options) {
OpenLayers.Layer.KaMap.prototype.initialize.apply(this, arguments);
this.extension = this.IMAGE_EXTENSIONS[this.params.i.toLowerCase() || DEFAULT_FORMAT];
},
/**
* Method: getURL
*
* Parameters:
* bounds - {<OpenLayers.Bounds>}
*
* Returns:
* {String} A string with the layer's url and parameters and also the
* passed-in bounds and appropriate tile size specified as
* parameters
*/
getURL: function (bounds) {
bounds = this.adjustBounds(bounds);
var mapRes = this.map.getResolution();
var scale = Math.round((this.map.getScale() * 10000)) / 10000;
var pX = Math.round(bounds.left / mapRes);
var pY = -Math.round(bounds.top / mapRes);
var metaX = Math.floor(pX / this.tileSize.w / this.params.metaTileSize.w) * this.tileSize.w * this.params.metaTileSize.w;
var metaY = Math.floor(pY / this.tileSize.h / this.params.metaTileSize.h) * this.tileSize.h * this.params.metaTileSize.h;
// if url is not a string, it should be an array of strings,
// in which case we will deterministically select one of them in
// order to evenly distribute requests to different urls.
//
var url = this.url;
if (url instanceof Array) {
url = this.selectUrl(paramsString, url);
}
var components = [
url,
"/",
this.params.map,
"/",
scale,
"/",
this.params.g.replace(/\s/g, '_'),
"/def/t",
metaY,
"/l",
metaX,
"/t",
pY,
"l",
pX,
".",
this.extension
];
return components.join("");
},
CLASS_NAME: "OpenLayers.Layer.KaMapCache"
});
/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
* license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
* full text of the license. */
/**
* @requires OpenLayers/Layer/Grid.js
* @requires OpenLayers/Layer/KaMap.js
*/
/**
* Class: OpenLayers.Layer.KaMapCache
*
* This class is designed to talk directly to a web-accessible ka-Map
* cache generated by the precache2.php script.
*
* To create a a new KaMapCache layer, you must indicate also the "i" parameter
* (that will be used to calculate the file extension), and another special
* parameter, object names "metaTileSize", with "h" (height) and "w" (width)
* properties.
*
* // Create a new kaMapCache layer.
* var kamap_base = new OpenLayers.Layer.KaMapCache(
* "Satellite",
* "http://www.example.org/web/acessible/cache",
* {g: "satellite", map: "world", i: 'png24', metaTileSize: {w: 5, h: 5} }
* );
*
* // Create an kaMapCache overlay layer (using "isBaseLayer: false").
* // Forces the output to be a "gif", using the "i" parameter.
* var kamap_overlay = new OpenLayers.Layer.KaMapCache(
* "Streets",
* "http://www.example.org/web/acessible/cache",
* {g: "streets", map: "world", i: "gif", metaTileSize: {w: 5, h: 5} },
* {isBaseLayer: false}
* );
*
* The cache URLs must look like:
* var/cache/World/50000/Group_Name/def/t-440320/l20480
*
* This means that the cache generated via tile.php will *not* work with
* this class, and should instead use the KaMap layer.
*
* More information is available in Ticket #1518.
*
* Inherits from:
* - <OpenLayers.Layer.KaMap>
* - <OpenLayers.Layer.Grid>
*/
OpenLayers.Layer.KaMapCache = OpenLayers.Class(OpenLayers.Layer.KaMap, {
/**
* Constant: IMAGE_EXTENSIONS
* {Object} Simple hash map to convert format to extension.
*/
IMAGE_EXTENSIONS: {
'jpeg': 'jpg',
'gif' : 'gif',
'png' : 'png',
'png8' : 'png',
'png24' : 'png',
'dithered' : 'png'
},
/**
* Constant: DEFAULT_FORMAT
* {Object} Simple hash map to convert format to extension.
*/
DEFAULT_FORMAT: 'jpeg',
/**
* Constructor: OpenLayers.Layer.KaMapCache
*
* Parameters:
* name - {String}
* url - {String}
* params - {Object} Parameters to be sent to the HTTP server in the
* query string for the tile. The format can be set via the 'i'
* parameter (defaults to jpg) , and the map should be set via
* the 'map' parameter. It has been reported that ka-Map may behave
* inconsistently if your format parameter does not match the format
* parameter configured in your config.php. (See ticket #327 for more
* information.)
* options - {Object} Additional options for the layer. Any of the
* APIProperties listed on this layer, and any layer types it
* extends, can be overridden through the options parameter.
*/
initialize: function(name, url, params, options) {
OpenLayers.Layer.KaMap.prototype.initialize.apply(this, arguments);
this.extension = this.IMAGE_EXTENSIONS[this.params.i.toLowerCase() || DEFAULT_FORMAT];
},
/**
* Method: getURL
*
* Parameters:
* bounds - {<OpenLayers.Bounds>}
*
* Returns:
* {String} A string with the layer's url and parameters and also the
* passed-in bounds and appropriate tile size specified as
* parameters
*/
getURL: function (bounds) {
bounds = this.adjustBounds(bounds);
var mapRes = this.map.getResolution();
var scale = Math.round((this.map.getScale() * 10000)) / 10000;
var pX = Math.round(bounds.left / mapRes);
var pY = -Math.round(bounds.top / mapRes);
var metaX = Math.floor(pX / this.tileSize.w / this.params.metaTileSize.w) * this.tileSize.w * this.params.metaTileSize.w;
var metaY = Math.floor(pY / this.tileSize.h / this.params.metaTileSize.h) * this.tileSize.h * this.params.metaTileSize.h;
// if url is not a string, it should be an array of strings,
// in which case we will deterministically select one of them in
// order to evenly distribute requests to different urls.
//
var url = this.url;
if (url instanceof Array) {
url = this.selectUrl(paramsString, url);
}
var components = [
url,
"/",
this.params.map,
"/",
scale,
"/",
this.params.g.replace(/\s/g, '_'),
"/def/t",
metaY,
"/l",
metaX,
"/t",
pY,
"l",
pX,
".",
this.extension
];
return components.join("");
},
CLASS_NAME: "OpenLayers.Layer.KaMapCache"
});

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="/css/rss.css" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="/css/rss.css" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:georss="http://www.georss.org/georss">
<docs>This is an RSS file. Copy the URL into your aggregator of choice. If you don't know what this means and want to learn more, please see: <span>http://platial.typepad.com/news/2006/04/really_simple_t.html</span> for more info.</docs><channel rdf:about="http://platial.com">
<link>http://platial.com</link>

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="/css/rss.css" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/css" href="/css/rss.css" ?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:georss="http://www.georss.org/georss">
<docs>This is an RSS file. Copy the URL into your aggregator of choice. If you don't know what this means and want to learn more, please see: <span>http://platial.typepad.com/news/2006/04/really_simple_t.html</span> for more info.</docs><channel rdf:about="http://platial.com">
<link>http://platial.com</link>

View File

@@ -1,251 +1,251 @@
#!/usr/bin/env python
import sys
import os
import re
import urllib2
import time
from xml.dom.minidom import Document
try:
import xml.etree.ElementTree as ElementTree
except ImportError:
try:
import cElementTree as ElementTree
except ImportError:
try:
import elementtree.ElementTree as ElementTree
except ImportError:
import lxml.etree as ElementTree
missing_deps = False
try:
import simplejson
from BeautifulSoup import BeautifulSoup
except ImportError, E:
missing_deps = E
feedName = "example-list.xml"
feedPath = "http://openlayers.org/dev/examples/"
def getListOfOnlineExamples(baseUrl):
"""
useful if you want to get a list of examples a url. not used by default.
"""
html = urllib2.urlopen(baseUrl)
soup = BeautifulSoup(html)
examples = soup.findAll('li')
examples = [example.find('a').get('href') for example in examples]
examples = [example for example in examples if example.endswith('.html')]
examples = [example for example in examples]
return examples
def getListOfExamples(relPath):
"""
returns list of .html filenames within a given path - excludes example-list.html
"""
examples = os.listdir(relPath)
examples = [example for example in examples if example.endswith('.html') and example != "example-list.html"]
return examples
def getExampleHtml(location):
"""
returns html of a specific example that is available online or locally
"""
print '.',
if location.startswith('http'):
return urllib2.urlopen(location).read()
else:
f = open(location)
html = f.read()
f.close()
return html
def extractById(soup, tagId, value=None):
"""
returns full contents of a particular tag id
"""
beautifulTag = soup.find(id=tagId)
if beautifulTag:
if beautifulTag.contents:
value = str(beautifulTag.renderContents()).strip()
value = value.replace('\t','')
value = value.replace('\n','')
return value
def getRelatedClasses(html):
"""
parses the html, and returns a list of all OpenLayers Classes
used within (ie what parts of OL the javascript uses).
"""
rawstr = r'''(?P<class>OpenLayers\..*?)\('''
return re.findall(rawstr, html)
def parseHtml(html,ids):
"""
returns dictionary of items of interest
"""
soup = BeautifulSoup(html)
d = {}
for tagId in ids:
d[tagId] = extractById(soup,tagId)
#classes should eventually be parsed from docs - not automatically created.
classes = getRelatedClasses(html)
d['classes'] = classes
return d
def getSvnInfo(path):
h = os.popen("svn info %s --xml" % path)
tree = ElementTree.fromstring(h.read())
h.close()
d = {
'url': tree.findtext('entry/url'),
'author': tree.findtext('entry/commit/author'),
'date': tree.findtext('entry/commit/date')
}
return d
def createFeed(examples):
doc = Document()
atomuri = "http://www.w3.org/2005/Atom"
feed = doc.createElementNS(atomuri, "feed")
feed.setAttribute("xmlns", atomuri)
title = doc.createElementNS(atomuri, "title")
title.appendChild(doc.createTextNode("OpenLayers Examples"))
feed.appendChild(title)
link = doc.createElementNS(atomuri, "link")
link.setAttribute("rel", "self")
link.setAttribute("href", feedPath + feedName)
modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
id = doc.createElementNS(atomuri, "id")
id.appendChild(doc.createTextNode("%s%s#%s" % (feedPath, feedName, modtime)))
feed.appendChild(id)
updated = doc.createElementNS(atomuri, "updated")
updated.appendChild(doc.createTextNode(modtime))
feed.appendChild(updated)
examples.sort(key=lambda x:x["modified"])
for example in sorted(examples, key=lambda x:x["modified"], reverse=True):
entry = doc.createElementNS(atomuri, "entry")
title = doc.createElementNS(atomuri, "title")
title.appendChild(doc.createTextNode(example["title"] or example["example"]))
entry.appendChild(title)
link = doc.createElementNS(atomuri, "link")
link.setAttribute("href", "%s%s" % (feedPath, example["example"]))
entry.appendChild(link)
summary = doc.createElementNS(atomuri, "summary")
summary.appendChild(doc.createTextNode(example["shortdesc"] or example["example"]))
entry.appendChild(summary)
updated = doc.createElementNS(atomuri, "updated")
updated.appendChild(doc.createTextNode(example["modified"]))
entry.appendChild(updated)
author = doc.createElementNS(atomuri, "author")
name = doc.createElementNS(atomuri, "name")
name.appendChild(doc.createTextNode(example["author"]))
author.appendChild(name)
entry.appendChild(author)
id = doc.createElementNS(atomuri, "id")
id.appendChild(doc.createTextNode("%s%s#%s" % (feedPath, example["example"], example["modified"])))
entry.appendChild(id)
feed.appendChild(entry)
doc.appendChild(feed)
return doc
def wordIndex(examples):
"""
Create an inverted index based on words in title and shortdesc. Keys are
lower cased words. Values are dictionaries with example index keys and
count values.
"""
index = {}
unword = re.compile("\\W+")
keys = ["shortdesc", "title"]
for i in range(len(examples)):
for key in keys:
text = examples[i][key]
if text:
words = unword.split(text)
for word in words:
if word:
word = word.lower()
if index.has_key(word):
if index[word].has_key(i):
index[word][i] += 1
else:
index[word][i] = 1
else:
index[word] = {i: 1}
return index
if __name__ == "__main__":
if missing_deps:
print "This script requires simplejson and BeautifulSoup. You don't have them. \n(%s)" % E
sys.exit()
if len(sys.argv) > 1:
outFile = open(sys.argv[1],'w')
else:
outFile = open('../examples/example-list.js','w')
examplesLocation = '../examples'
print 'Reading examples from %s and writing out to %s' % (examplesLocation, outFile.name)
exampleList = []
docIds = ['title','shortdesc']
#comment out option to create docs from online resource
#examplesLocation = 'http://svn.openlayers.org/sandbox/docs/examples/'
#examples = getListOfOnlineExamples(examplesLocation)
examples = getListOfExamples(examplesLocation)
modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
for example in examples:
url = os.path.join(examplesLocation,example)
html = getExampleHtml(url)
tagvalues = parseHtml(html,docIds)
tagvalues['example'] = example
# add in svn info
d = getSvnInfo(url)
tagvalues["modified"] = d["date"] or modtime
tagvalues["author"] = d["author"] or "anonymous"
tagvalues['link'] = example
exampleList.append(tagvalues)
print
exampleList.sort(key=lambda x:x['example'].lower())
index = wordIndex(exampleList)
json = simplejson.dumps({"examples": exampleList, "index": index})
#give the json a global variable we can use in our js. This should be replaced or made optional.
json = 'var info=' + json
outFile.write(json)
outFile.close()
print "writing feed to ../examples/%s " % feedName
atom = open('../examples/%s' % feedName, 'w')
doc = createFeed(exampleList)
atom.write(doc.toxml())
atom.close()
print 'complete'
#!/usr/bin/env python
import sys
import os
import re
import urllib2
import time
from xml.dom.minidom import Document
try:
import xml.etree.ElementTree as ElementTree
except ImportError:
try:
import cElementTree as ElementTree
except ImportError:
try:
import elementtree.ElementTree as ElementTree
except ImportError:
import lxml.etree as ElementTree
missing_deps = False
try:
import simplejson
from BeautifulSoup import BeautifulSoup
except ImportError, E:
missing_deps = E
feedName = "example-list.xml"
feedPath = "http://openlayers.org/dev/examples/"
def getListOfOnlineExamples(baseUrl):
"""
useful if you want to get a list of examples a url. not used by default.
"""
html = urllib2.urlopen(baseUrl)
soup = BeautifulSoup(html)
examples = soup.findAll('li')
examples = [example.find('a').get('href') for example in examples]
examples = [example for example in examples if example.endswith('.html')]
examples = [example for example in examples]
return examples
def getListOfExamples(relPath):
"""
returns list of .html filenames within a given path - excludes example-list.html
"""
examples = os.listdir(relPath)
examples = [example for example in examples if example.endswith('.html') and example != "example-list.html"]
return examples
def getExampleHtml(location):
"""
returns html of a specific example that is available online or locally
"""
print '.',
if location.startswith('http'):
return urllib2.urlopen(location).read()
else:
f = open(location)
html = f.read()
f.close()
return html
def extractById(soup, tagId, value=None):
"""
returns full contents of a particular tag id
"""
beautifulTag = soup.find(id=tagId)
if beautifulTag:
if beautifulTag.contents:
value = str(beautifulTag.renderContents()).strip()
value = value.replace('\t','')
value = value.replace('\n','')
return value
def getRelatedClasses(html):
"""
parses the html, and returns a list of all OpenLayers Classes
used within (ie what parts of OL the javascript uses).
"""
rawstr = r'''(?P<class>OpenLayers\..*?)\('''
return re.findall(rawstr, html)
def parseHtml(html,ids):
"""
returns dictionary of items of interest
"""
soup = BeautifulSoup(html)
d = {}
for tagId in ids:
d[tagId] = extractById(soup,tagId)
#classes should eventually be parsed from docs - not automatically created.
classes = getRelatedClasses(html)
d['classes'] = classes
return d
def getSvnInfo(path):
h = os.popen("svn info %s --xml" % path)
tree = ElementTree.fromstring(h.read())
h.close()
d = {
'url': tree.findtext('entry/url'),
'author': tree.findtext('entry/commit/author'),
'date': tree.findtext('entry/commit/date')
}
return d
def createFeed(examples):
doc = Document()
atomuri = "http://www.w3.org/2005/Atom"
feed = doc.createElementNS(atomuri, "feed")
feed.setAttribute("xmlns", atomuri)
title = doc.createElementNS(atomuri, "title")
title.appendChild(doc.createTextNode("OpenLayers Examples"))
feed.appendChild(title)
link = doc.createElementNS(atomuri, "link")
link.setAttribute("rel", "self")
link.setAttribute("href", feedPath + feedName)
modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
id = doc.createElementNS(atomuri, "id")
id.appendChild(doc.createTextNode("%s%s#%s" % (feedPath, feedName, modtime)))
feed.appendChild(id)
updated = doc.createElementNS(atomuri, "updated")
updated.appendChild(doc.createTextNode(modtime))
feed.appendChild(updated)
examples.sort(key=lambda x:x["modified"])
for example in sorted(examples, key=lambda x:x["modified"], reverse=True):
entry = doc.createElementNS(atomuri, "entry")
title = doc.createElementNS(atomuri, "title")
title.appendChild(doc.createTextNode(example["title"] or example["example"]))
entry.appendChild(title)
link = doc.createElementNS(atomuri, "link")
link.setAttribute("href", "%s%s" % (feedPath, example["example"]))
entry.appendChild(link)
summary = doc.createElementNS(atomuri, "summary")
summary.appendChild(doc.createTextNode(example["shortdesc"] or example["example"]))
entry.appendChild(summary)
updated = doc.createElementNS(atomuri, "updated")
updated.appendChild(doc.createTextNode(example["modified"]))
entry.appendChild(updated)
author = doc.createElementNS(atomuri, "author")
name = doc.createElementNS(atomuri, "name")
name.appendChild(doc.createTextNode(example["author"]))
author.appendChild(name)
entry.appendChild(author)
id = doc.createElementNS(atomuri, "id")
id.appendChild(doc.createTextNode("%s%s#%s" % (feedPath, example["example"], example["modified"])))
entry.appendChild(id)
feed.appendChild(entry)
doc.appendChild(feed)
return doc
def wordIndex(examples):
"""
Create an inverted index based on words in title and shortdesc. Keys are
lower cased words. Values are dictionaries with example index keys and
count values.
"""
index = {}
unword = re.compile("\\W+")
keys = ["shortdesc", "title"]
for i in range(len(examples)):
for key in keys:
text = examples[i][key]
if text:
words = unword.split(text)
for word in words:
if word:
word = word.lower()
if index.has_key(word):
if index[word].has_key(i):
index[word][i] += 1
else:
index[word][i] = 1
else:
index[word] = {i: 1}
return index
if __name__ == "__main__":
if missing_deps:
print "This script requires simplejson and BeautifulSoup. You don't have them. \n(%s)" % E
sys.exit()
if len(sys.argv) > 1:
outFile = open(sys.argv[1],'w')
else:
outFile = open('../examples/example-list.js','w')
examplesLocation = '../examples'
print 'Reading examples from %s and writing out to %s' % (examplesLocation, outFile.name)
exampleList = []
docIds = ['title','shortdesc']
#comment out option to create docs from online resource
#examplesLocation = 'http://svn.openlayers.org/sandbox/docs/examples/'
#examples = getListOfOnlineExamples(examplesLocation)
examples = getListOfExamples(examplesLocation)
modtime = time.strftime("%Y-%m-%dT%I:%M:%SZ", time.gmtime())
for example in examples:
url = os.path.join(examplesLocation,example)
html = getExampleHtml(url)
tagvalues = parseHtml(html,docIds)
tagvalues['example'] = example
# add in svn info
d = getSvnInfo(url)
tagvalues["modified"] = d["date"] or modtime
tagvalues["author"] = d["author"] or "anonymous"
tagvalues['link'] = example
exampleList.append(tagvalues)
print
exampleList.sort(key=lambda x:x['example'].lower())
index = wordIndex(exampleList)
json = simplejson.dumps({"examples": exampleList, "index": index})
#give the json a global variable we can use in our js. This should be replaced or made optional.
json = 'var info=' + json
outFile.write(json)
outFile.close()
print "writing feed to ../examples/%s " % feedName
atom = open('../examples/%s' % feedName, 'w')
doc = createFeed(exampleList)
atom.write(doc.toxml())
atom.close()
print 'complete'