From 89c3a37fef239ccb51517ce0322889889557b553 Mon Sep 17 00:00:00 2001 From: Edmar Moretti Date: Fri, 6 Feb 2009 10:27:22 +0000 Subject: [PATCH] --- pacotes/openlayers/OpenLayers.js | 1050 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/art/arrows.svg | 127 ------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/art/layer-switcher-maximize.svg | 128 -------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/art/layer-switcher-minimize.svg | 142 ---------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/art/marker.svg | 25 ------------------------- pacotes/openlayers/art/measuring-stick-off.svg | 36 ------------------------------------ pacotes/openlayers/art/measuring-stick-on.svg | 36 ------------------------------------ pacotes/openlayers/art/panning-hand-off.svg | 44 -------------------------------------------- pacotes/openlayers/art/panning-hand-on.svg | 44 -------------------------------------------- pacotes/openlayers/art/slider.svg | 71 ----------------------------------------------------------------------- pacotes/openlayers/art/zoom-world.svg | 193 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/art/zoombar.svg | 73 ------------------------------------------------------------------------- pacotes/openlayers/build/OpenLayers.js | 842 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/build/README.txt | 14 -------------- pacotes/openlayers/build/build.py | 27 --------------------------- pacotes/openlayers/build/build.sh | 40 ---------------------------------------- pacotes/openlayers/build/buildUncompressed.py | 25 ------------------------- pacotes/openlayers/build/docs.sh | 39 --------------------------------------- pacotes/openlayers/build/full.cfg | 12 ------------ pacotes/openlayers/build/library.cfg | 47 ----------------------------------------------- pacotes/openlayers/build/license.txt | 45 --------------------------------------------- pacotes/openlayers/build/lite.cfg | 20 -------------------- pacotes/openlayers/doc/Ajax.txt | 9 --------- pacotes/openlayers/doc/Bounds.txt | 21 --------------------- pacotes/openlayers/doc/Control.LayerSwitcher.txt | 14 -------------- pacotes/openlayers/doc/Control.MouseDefaults.txt | 19 ------------------- pacotes/openlayers/doc/Control.MousePosition.txt | 32 -------------------------------- pacotes/openlayers/doc/Control.MouseToolbar.txt | 15 --------------- pacotes/openlayers/doc/Control.OverviewMap.txt | 38 -------------------------------------- pacotes/openlayers/doc/Control.PanZoom.txt | 9 --------- pacotes/openlayers/doc/Control.PanZoomBar.txt | 6 ------ pacotes/openlayers/doc/Control.Permalink.txt | 6 ------ pacotes/openlayers/doc/Control.Scale.txt | 6 ------ pacotes/openlayers/doc/Control.txt | 9 --------- pacotes/openlayers/doc/Icon.txt | 9 --------- pacotes/openlayers/doc/Layer.Boxes.txt | 7 ------- pacotes/openlayers/doc/Layer.EventPane.txt | 6 ------ pacotes/openlayers/doc/Layer.GeoRSS.txt | 12 ------------ pacotes/openlayers/doc/Layer.Google.txt | 16 ---------------- pacotes/openlayers/doc/Layer.Grid.txt | 31 ------------------------------- pacotes/openlayers/doc/Layer.HTTPRequest.txt | 13 ------------- pacotes/openlayers/doc/Layer.Image.txt | 9 --------- pacotes/openlayers/doc/Layer.KaMap.txt | 7 ------- pacotes/openlayers/doc/Layer.Markers.txt | 13 ------------- pacotes/openlayers/doc/Layer.TMS.txt | 15 --------------- pacotes/openlayers/doc/Layer.Text.txt | 10 ---------- pacotes/openlayers/doc/Layer.VirtualEarth.txt | 14 -------------- pacotes/openlayers/doc/Layer.WMS.txt | 15 --------------- pacotes/openlayers/doc/Layer.txt | 40 ---------------------------------------- pacotes/openlayers/doc/LonLat.txt | 13 ------------- pacotes/openlayers/doc/Map.txt | 77 ----------------------------------------------------------------------------- pacotes/openlayers/doc/Marker.Box.txt | 10 ---------- pacotes/openlayers/doc/Marker.txt | 15 --------------- pacotes/openlayers/doc/Pixel.txt | 13 ------------- pacotes/openlayers/doc/Size.txt | 11 ----------- pacotes/openlayers/doc/Tile.Image.txt | 7 ------- pacotes/openlayers/doc/Tile.WFS.txt | 6 ------ pacotes/openlayers/doc/Tile.txt | 10 ---------- pacotes/openlayers/doc/Util.txt | 8 -------- pacotes/openlayers/doc/authors.txt | 25 ------------------------- pacotes/openlayers/doc/customization | 49 ------------------------------------------------- pacotes/openlayers/doc/readme.txt | 3 --- pacotes/openlayers/doc/reference.html | 840 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/examples/GMLParser.html | 33 --------------------------------- pacotes/openlayers/examples/KMLParser.html | 33 --------------------------------- pacotes/openlayers/examples/baseLayers.html | 83 ----------------------------------------------------------------------------------- pacotes/openlayers/examples/boxes.html | 49 ------------------------------------------------- pacotes/openlayers/examples/canvas.html | 613 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/ciesin.html | 40 ---------------------------------------- pacotes/openlayers/examples/click.html | 42 ------------------------------------------ pacotes/openlayers/examples/controls.html | 53 ----------------------------------------------------- pacotes/openlayers/examples/custom-control.html | 49 ------------------------------------------------- pacotes/openlayers/examples/custom-style.html | 53 ----------------------------------------------------- pacotes/openlayers/examples/doubleSetCenter.html | 17 ----------------- pacotes/openlayers/examples/draw-feature.html | 96 ------------------------------------------------------------------------------------------------ pacotes/openlayers/examples/editingtoolbar.html | 40 ---------------------------------------- pacotes/openlayers/examples/example.html | 51 --------------------------------------------------- pacotes/openlayers/examples/freemap.html | 49 ------------------------------------------------- pacotes/openlayers/examples/fullScreen.html | 40 ---------------------------------------- pacotes/openlayers/examples/georss-serialize.html | 50 -------------------------------------------------- pacotes/openlayers/examples/georss.html | 43 ------------------------------------------- pacotes/openlayers/examples/georss.xml | 378 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/examples/getfeatureinfo.html | 47 ----------------------------------------------- pacotes/openlayers/examples/gml-layer.html | 32 -------------------------------- pacotes/openlayers/examples/gml-serialize.html | 86 -------------------------------------------------------------------------------------- pacotes/openlayers/examples/gml/line.xml | 42 ------------------------------------------ pacotes/openlayers/examples/gml/multipoint.xml | 70 ---------------------------------------------------------------------- pacotes/openlayers/examples/gml/multipolygon.xml | 106 ---------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/gml/owls.xml | 156 ------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/examples/gml/point.xml | 42 ------------------------------------------ pacotes/openlayers/examples/gml/polygon.xml | 89 ----------------------------------------------------------------------------------------- pacotes/openlayers/examples/google.html | 85 ------------------------------------------------------------------------------------- pacotes/openlayers/examples/gutter.html | 49 ------------------------------------------------- pacotes/openlayers/examples/image-layer.html | 52 ---------------------------------------------------- pacotes/openlayers/examples/kamap.html | 39 --------------------------------------- pacotes/openlayers/examples/kamap.txt | 508 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/kml-layer-linestring.html | 32 -------------------------------- pacotes/openlayers/examples/kml-layer.html | 32 -------------------------------- pacotes/openlayers/examples/kml/lines.kml | 267 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/kml/mc-search.kml | 332 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/layer-opacity.html | 86 -------------------------------------------------------------------------------------- pacotes/openlayers/examples/lite.html | 31 ------------------------------- pacotes/openlayers/examples/lonlatfrompx.html | 43 ------------------------------------------- pacotes/openlayers/examples/mapserver.html | 35 ----------------------------------- pacotes/openlayers/examples/mapserver_untiled.html | 26 -------------------------- pacotes/openlayers/examples/markerResize.html | 52 ---------------------------------------------------- pacotes/openlayers/examples/markers.html | 54 ------------------------------------------------------ pacotes/openlayers/examples/markersTextLayer.html | 36 ------------------------------------ pacotes/openlayers/examples/mm.html | 57 --------------------------------------------------------- pacotes/openlayers/examples/multiserver.html | 35 ----------------------------------- pacotes/openlayers/examples/mvs.html | 130 ---------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/navtoolbar.html | 37 ------------------------------------- pacotes/openlayers/examples/notile.html | 30 ------------------------------ pacotes/openlayers/examples/openmnnd.html | 143 ----------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/openstreetmap.html | 35 ----------------------------------- pacotes/openlayers/examples/outOfRangeMarkers.html | 54 ------------------------------------------------------ pacotes/openlayers/examples/outOfRangeMarkers.txt | 3 --- pacotes/openlayers/examples/overviewmap.html | 47 ----------------------------------------------- pacotes/openlayers/examples/panel.html | 90 ------------------------------------------------------------------------------------------ pacotes/openlayers/examples/popups.html | 133 ------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/proxy.cgi | 55 ------------------------------------------------------- pacotes/openlayers/examples/scroll.html | 151 ------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/select-feature.html | 82 ---------------------------------------------------------------------------------- pacotes/openlayers/examples/setextent.html | 29 ----------------------------- pacotes/openlayers/examples/supports-vector.html | 22 ---------------------- pacotes/openlayers/examples/textfile.txt | 4 ---- pacotes/openlayers/examples/tiger.html | 36 ------------------------------------ pacotes/openlayers/examples/tms.html | 45 --------------------------------------------- pacotes/openlayers/examples/urban.html | 36 ------------------------------------ pacotes/openlayers/examples/ve.html | 65 ----------------------------------------------------------------- pacotes/openlayers/examples/vector-features.html | 79 ------------------------------------------------------------------------------- pacotes/openlayers/examples/webcam.html | 44 -------------------------------------------- pacotes/openlayers/examples/wfs-scribble.html | 79 ------------------------------------------------------------------------------- pacotes/openlayers/examples/wfs-states.html | 36 ------------------------------------ pacotes/openlayers/examples/wfs-t.html | 71 ----------------------------------------------------------------------- pacotes/openlayers/examples/wfs.html | 37 ------------------------------------- pacotes/openlayers/examples/wkt.html | 152 -------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/examples/wms-untiled.html | 34 ---------------------------------- pacotes/openlayers/examples/wms.html | 34 ---------------------------------- pacotes/openlayers/examples/wmst.html | 42 ------------------------------------------ pacotes/openlayers/examples/worldwind.html | 42 ------------------------------------------ pacotes/openlayers/examples/xhtml.html | 23 ----------------------- pacotes/openlayers/examples/yahoo.html | 38 -------------------------------------- pacotes/openlayers/examples/zoomLevels.html | 53 ----------------------------------------------------- pacotes/openlayers/img/blank.gif | Bin 42 -> 0 bytes pacotes/openlayers/img/close.gif | Bin 1078 -> 0 bytes pacotes/openlayers/img/drag-rectangle-off.png | Bin 1202 -> 0 bytes pacotes/openlayers/img/drag-rectangle-on.png | Bin 1218 -> 0 bytes pacotes/openlayers/img/east-mini.png | Bin 451 -> 0 bytes pacotes/openlayers/img/layer-switcher-maximize.png | Bin 451 -> 0 bytes pacotes/openlayers/img/layer-switcher-minimize.png | Bin 249 -> 0 bytes pacotes/openlayers/img/marker-blue.png | Bin 992 -> 0 bytes pacotes/openlayers/img/marker-gold.png | Bin 831 -> 0 bytes pacotes/openlayers/img/marker-green.png | Bin 967 -> 0 bytes pacotes/openlayers/img/marker.png | Bin 606 -> 0 bytes pacotes/openlayers/img/measuring-stick-off.png | Bin 3343 -> 0 bytes pacotes/openlayers/img/measuring-stick-on.png | Bin 3816 -> 0 bytes pacotes/openlayers/img/north-mini.png | Bin 323 -> 0 bytes pacotes/openlayers/img/panning-hand-off.png | Bin 3875 -> 0 bytes pacotes/openlayers/img/panning-hand-on.png | Bin 3977 -> 0 bytes pacotes/openlayers/img/slider.png | Bin 285 -> 0 bytes pacotes/openlayers/img/south-mini.png | Bin 481 -> 0 bytes pacotes/openlayers/img/west-mini.png | Bin 453 -> 0 bytes pacotes/openlayers/img/zoom-minus-mini.png | Bin 359 -> 0 bytes pacotes/openlayers/img/zoom-plus-mini.png | Bin 489 -> 0 bytes pacotes/openlayers/img/zoom-world-mini.png | Bin 1072 -> 0 bytes pacotes/openlayers/img/zoombar.png | Bin 463 -> 0 bytes pacotes/openlayers/lib/OpenLayers.js | 172 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Ajax.js | 322 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/BaseTypes.js | 939 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control.js | 146 -------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/ArgParser.js | 114 ------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Control/DragPan.js | 59 ----------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/DrawFeature.js | 63 --------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/EditingToolbar.js | 48 ------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js | 99 --------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/LayerSwitcher.js | 498 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Control/LayerTabs.js | 226 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/MouseDefaults.js | 314 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/MousePosition.js | 107 ----------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/MouseToolbar.js | 327 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/NavToolbar.js | 37 ------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/Navigation.js | 93 --------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/OverviewMap.js | 609 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/PanZoom.js | 163 ------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/PanZoomBar.js | 253 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/Panel.js | 161 ----------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/Permalink.js | 113 ----------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/Scale.js | 65 ----------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/SelectFeature.js | 172 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Control/ZoomBox.js | 42 ------------------------------------------ pacotes/openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js | 24 ------------------------ pacotes/openlayers/lib/OpenLayers/Events.js | 561 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Feature.js | 162 ------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Feature/Vector.js | 250 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Feature/WFS.js | 62 -------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Format.js | 37 ------------------------------------- pacotes/openlayers/lib/OpenLayers/Format/GML.js | 441 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Format/GeoRSS.js | 111 --------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Format/KML.js | 170 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Format/WFS.js | 160 ---------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Format/WKT.js | 311 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Geometry.js | 161 ----------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Geometry/Collection.js | 233 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Geometry/Curve.js | 52 ---------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Geometry/LineString.js | 40 ---------------------------------------- pacotes/openlayers/lib/OpenLayers/Geometry/LinearRing.js | 125 ----------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Geometry/MultiLineString.js | 36 ------------------------------------ pacotes/openlayers/lib/OpenLayers/Geometry/MultiPoint.js | 54 ------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Geometry/MultiPolygon.js | 36 ------------------------------------ pacotes/openlayers/lib/OpenLayers/Geometry/Point.js | 109 ------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Geometry/Polygon.js | 56 -------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Geometry/Rectangle.js | 76 ---------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Geometry/Surface.js | 25 ------------------------- pacotes/openlayers/lib/OpenLayers/Handler.js | 165 --------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Handler/Box.js | 134 -------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Handler/Drag.js | 172 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Handler/Feature.js | 151 ------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Handler/Keyboard.js | 76 ---------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Handler/MouseWheel.js | 133 ------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Handler/Path.js | 220 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Handler/Point.js | 233 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Handler/Polygon.js | 110 -------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Icon.js | 136 ---------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer.js | 686 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/Boxes.js | 68 -------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/Canvas.js | 120 ------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Layer/EventPane.js | 313 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/FixedZoomLevels.js | 236 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/GML.js | 113 ----------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/GeoRSS.js | 207 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/Google.js | 384 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Layer/Grid.js | 453 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/HTTPRequest.js | 194 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/Image.js | 183 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/KaMap.js | 181 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/MapServer.js | 173 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/MapServer/Untiled.js | 245 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/Markers.js | 133 ------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/MultiMap.js | 214 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/TMS.js | 117 --------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/Text.js | 171 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/Vector.js | 371 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/VirtualEarth.js | 228 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Layer/WFS.js | 348 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Layer/WMS.js | 155 ----------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js | 246 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Layer/WorldWind.js | 92 -------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Layer/Yahoo.js | 286 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Map.js | 1298 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Marker.js | 142 ---------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Marker/Box.js | 99 --------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Popup.js | 382 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Popup/Anchored.js | 128 -------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js | 168 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Renderer.js | 188 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Renderer/Elements.js | 259 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Renderer/SVG.js | 462 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/lib/OpenLayers/Renderer/VML.js | 453 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/SingleFile.js | 6 ------ pacotes/openlayers/lib/OpenLayers/Tile.js | 139 ------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Tile/Image.js | 207 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Tile/WFS.js | 124 ---------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/OpenLayers/Util.js | 968 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/Prototype.js | 1781 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/Rico/Color.js | 235 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/lib/Rico/Corner.js | 314 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/license.txt | 27 --------------------------- pacotes/openlayers/news.txt | 56 -------------------------------------------------------- pacotes/openlayers/readme.txt | 66 ------------------------------------------------------------------ pacotes/openlayers/release-license.txt | 29 ----------------------------- pacotes/openlayers/repository-license.txt | 35 ----------------------------------- pacotes/openlayers/tests/BaseTypes/test_Bounds.html | 389 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/BaseTypes/test_Class.html | 107 ----------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/BaseTypes/test_LonLat.html | 96 ------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/BaseTypes/test_Pixel.html | 96 ------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/BaseTypes/test_Size.html | 67 ------------------------------------------------------------------- pacotes/openlayers/tests/Control/test_KeyboardDefaults.html | 107 ----------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Control/test_LayerSwitcher.html | 114 ------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/Control/test_MouseToolbar.html | 59 ----------------------------------------------------------- pacotes/openlayers/tests/Control/test_NavToolbar.html | 33 --------------------------------- pacotes/openlayers/tests/Control/test_OverviewMap.html | 77 ----------------------------------------------------------------------------- pacotes/openlayers/tests/Control/test_PanZoom.html | 161 ----------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Control/test_PanZoomBar.html | 41 ----------------------------------------- pacotes/openlayers/tests/Control/test_Permalink.html | 59 ----------------------------------------------------------- pacotes/openlayers/tests/Control/test_Scale.html | 47 ----------------------------------------------- pacotes/openlayers/tests/Feature/test_Vector.html | 23 ----------------------- pacotes/openlayers/tests/Format/test_GML.html | 57 --------------------------------------------------------- pacotes/openlayers/tests/Format/test_GeoRSS.html | 34 ---------------------------------- pacotes/openlayers/tests/Format/test_WKT.html | 190 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Geometry/test_Collection.html | 228 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/Geometry/test_Curve.html | 157 ------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Geometry/test_LineString.html | 126 ------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/Geometry/test_LinearRing.html | 105 --------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Geometry/test_MultiLineString.html | 29 ----------------------------- pacotes/openlayers/tests/Geometry/test_MultiPoint.html | 76 ---------------------------------------------------------------------------- pacotes/openlayers/tests/Geometry/test_MultiPolygon.html | 34 ---------------------------------- pacotes/openlayers/tests/Geometry/test_Point.html | 116 -------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Geometry/test_Polygon.html | 164 -------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Geometry/test_Rectangle.html | 88 ---------------------------------------------------------------------------------------- pacotes/openlayers/tests/Geometry/test_Surface.html | 21 --------------------- pacotes/openlayers/tests/Layer/test_EventPane.html | 114 ------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/Layer/test_FixedZoomLevels.html | 97 ------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_GML.html | 23 ----------------------- pacotes/openlayers/tests/Layer/test_GeoRSS.html | 99 --------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_Google.html | 105 --------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_Grid.html | 209 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_HTTPRequest.html | 209 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_Image.html | 108 ------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/Layer/test_KaMap.html | 222 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/Layer/test_MapServer.html | 249 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_MapServer_Untiled.html | 163 ------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_Markers.html | 40 ---------------------------------------- pacotes/openlayers/tests/Layer/test_MultiMap.html | 105 --------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_TMS.html | 168 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/Layer/test_Text.html | 113 ----------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_Vector.html | 165 --------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Layer/test_WFS.html | 37 ------------------------------------- pacotes/openlayers/tests/Layer/test_WMS.html | 302 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/Marker/test_Box.html | 181 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/README.txt | 16 ---------------- pacotes/openlayers/tests/Tile/test_Image.html | 226 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/atom-1.0.xml | 34 ---------------------------------- pacotes/openlayers/tests/data_Layer_Text_textfile.txt | 3 --- pacotes/openlayers/tests/data_Layer_Text_textfile_2.txt | 3 --- pacotes/openlayers/tests/georss.txt | 378 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/grid_inittiles.html | 32 -------------------------------- pacotes/openlayers/tests/list-tests.html | 63 --------------------------------------------------------------- pacotes/openlayers/tests/run-tests.html | 2384 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Bounds.html | 300 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/test_Class.html | 106 ---------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Control.html | 18 ------------------ pacotes/openlayers/tests/test_Control_LayerSwitcher.html | 114 ------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/test_Control_MouseToolbar.html | 58 ---------------------------------------------------------- pacotes/openlayers/tests/test_Control_OverviewMap.html | 75 --------------------------------------------------------------------------- pacotes/openlayers/tests/test_Control_PanZoom.html | 72 ------------------------------------------------------------------------ pacotes/openlayers/tests/test_Control_PanZoomBar.html | 39 --------------------------------------- pacotes/openlayers/tests/test_Control_Permalink.html | 59 ----------------------------------------------------------- pacotes/openlayers/tests/test_Events.html | 317 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Feature.html | 112 ---------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Format.html | 21 --------------------- pacotes/openlayers/tests/test_Geometry.html | 202 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Icon.html | 42 ------------------------------------------ pacotes/openlayers/tests/test_Layer.html | 207 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Layer_EventPane.html | 114 ------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/test_Layer_FixedZoomLevels.html | 97 ------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Layer_GeoRSS.html | 73 ------------------------------------------------------------------------- pacotes/openlayers/tests/test_Layer_Google.html | 156 ------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/test_Layer_Grid.html | 206 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Layer_HTTPRequest.html | 183 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Layer_Image.html | 96 ------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/test_Layer_KaMap.html | 195 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Layer_Markers.html | 40 ---------------------------------------- pacotes/openlayers/tests/test_Layer_MultiMap.html | 128 -------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Layer_TMS.html | 164 -------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Layer_Text.html | 83 ----------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Layer_WMS.html | 244 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_LonLat.html | 96 ------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/test_Map.html | 408 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/test_Marker.html | 115 ------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Pixel.html | 96 ------------------------------------------------------------------------------------------------ pacotes/openlayers/tests/test_Popup.html | 118 ---------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Renderer.html | 166 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Size.html | 67 ------------------------------------------------------------------- pacotes/openlayers/tests/test_Tile.html | 36 ------------------------------------ pacotes/openlayers/tests/test_Tile_Image.html | 177 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/test_Util.html | 579 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tests/throws.js | 83 ----------------------------------------------------------------------------------- pacotes/openlayers/theme/default/img/add_point_off.png | Bin 1616 -> 0 bytes pacotes/openlayers/theme/default/img/add_point_on.png | Bin 1464 -> 0 bytes pacotes/openlayers/theme/default/img/drag-rectangle-off.png | Bin 1036 -> 0 bytes pacotes/openlayers/theme/default/img/drag-rectangle-on.png | Bin 1000 -> 0 bytes pacotes/openlayers/theme/default/img/draw_line_off.png | Bin 1567 -> 0 bytes pacotes/openlayers/theme/default/img/draw_line_on.png | Bin 1399 -> 0 bytes pacotes/openlayers/theme/default/img/draw_point_off.png | Bin 1612 -> 0 bytes pacotes/openlayers/theme/default/img/draw_point_on.png | Bin 1460 -> 0 bytes pacotes/openlayers/theme/default/img/draw_polygon_off.png | Bin 1546 -> 0 bytes pacotes/openlayers/theme/default/img/draw_polygon_on.png | Bin 1407 -> 0 bytes pacotes/openlayers/theme/default/img/icolimites.png | Bin 927 -> 0 bytes pacotes/openlayers/theme/default/img/move_feature_off.png | Bin 1543 -> 0 bytes pacotes/openlayers/theme/default/img/move_feature_on.png | Bin 1379 -> 0 bytes pacotes/openlayers/theme/default/img/pan_off.png | Bin 1696 -> 0 bytes pacotes/openlayers/theme/default/img/pan_on.png | Bin 1568 -> 0 bytes pacotes/openlayers/theme/default/img/panning-hand-off.png | Bin 928 -> 0 bytes pacotes/openlayers/theme/default/img/panning-hand-on.png | Bin 912 -> 0 bytes pacotes/openlayers/theme/default/img/remove_point_off.png | Bin 1612 -> 0 bytes pacotes/openlayers/theme/default/img/remove_point_on.png | Bin 1464 -> 0 bytes pacotes/openlayers/theme/default/style.css | 165 --------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tools/README.txt | 14 -------------- pacotes/openlayers/tools/jsmin.c | 272 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tools/jsmin.py | 216 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ pacotes/openlayers/tools/mergejs.py | 257 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- pacotes/openlayers/tools/release.sh | 16 ---------------- pacotes/openlayers/tools/shrinksafe.py | 54 ------------------------------------------------------ pacotes/openlayers/tools/toposort.py | 260 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 395 files changed, 0 insertions(+), 49804 deletions(-) delete mode 100644 pacotes/openlayers/OpenLayers.js delete mode 100644 pacotes/openlayers/art/arrows.svg delete mode 100644 pacotes/openlayers/art/layer-switcher-maximize.svg delete mode 100644 pacotes/openlayers/art/layer-switcher-minimize.svg delete mode 100644 pacotes/openlayers/art/marker.svg delete mode 100644 pacotes/openlayers/art/measuring-stick-off.svg delete mode 100644 pacotes/openlayers/art/measuring-stick-on.svg delete mode 100644 pacotes/openlayers/art/panning-hand-off.svg delete mode 100644 pacotes/openlayers/art/panning-hand-on.svg delete mode 100644 pacotes/openlayers/art/slider.svg delete mode 100644 pacotes/openlayers/art/zoom-world.svg delete mode 100644 pacotes/openlayers/art/zoombar.svg delete mode 100644 pacotes/openlayers/build/OpenLayers.js delete mode 100644 pacotes/openlayers/build/README.txt delete mode 100644 pacotes/openlayers/build/build.py delete mode 100644 pacotes/openlayers/build/build.sh delete mode 100644 pacotes/openlayers/build/buildUncompressed.py delete mode 100644 pacotes/openlayers/build/docs.sh delete mode 100644 pacotes/openlayers/build/full.cfg delete mode 100644 pacotes/openlayers/build/library.cfg delete mode 100644 pacotes/openlayers/build/license.txt delete mode 100644 pacotes/openlayers/build/lite.cfg delete mode 100644 pacotes/openlayers/doc/Ajax.txt delete mode 100644 pacotes/openlayers/doc/Bounds.txt delete mode 100644 pacotes/openlayers/doc/Control.LayerSwitcher.txt delete mode 100644 pacotes/openlayers/doc/Control.MouseDefaults.txt delete mode 100644 pacotes/openlayers/doc/Control.MousePosition.txt delete mode 100644 pacotes/openlayers/doc/Control.MouseToolbar.txt delete mode 100644 pacotes/openlayers/doc/Control.OverviewMap.txt delete mode 100644 pacotes/openlayers/doc/Control.PanZoom.txt delete mode 100644 pacotes/openlayers/doc/Control.PanZoomBar.txt delete mode 100644 pacotes/openlayers/doc/Control.Permalink.txt delete mode 100644 pacotes/openlayers/doc/Control.Scale.txt delete mode 100644 pacotes/openlayers/doc/Control.txt delete mode 100644 pacotes/openlayers/doc/Icon.txt delete mode 100644 pacotes/openlayers/doc/Layer.Boxes.txt delete mode 100644 pacotes/openlayers/doc/Layer.EventPane.txt delete mode 100644 pacotes/openlayers/doc/Layer.GeoRSS.txt delete mode 100644 pacotes/openlayers/doc/Layer.Google.txt delete mode 100644 pacotes/openlayers/doc/Layer.Grid.txt delete mode 100644 pacotes/openlayers/doc/Layer.HTTPRequest.txt delete mode 100644 pacotes/openlayers/doc/Layer.Image.txt delete mode 100644 pacotes/openlayers/doc/Layer.KaMap.txt delete mode 100644 pacotes/openlayers/doc/Layer.Markers.txt delete mode 100644 pacotes/openlayers/doc/Layer.TMS.txt delete mode 100644 pacotes/openlayers/doc/Layer.Text.txt delete mode 100644 pacotes/openlayers/doc/Layer.VirtualEarth.txt delete mode 100644 pacotes/openlayers/doc/Layer.WMS.txt delete mode 100644 pacotes/openlayers/doc/Layer.txt delete mode 100644 pacotes/openlayers/doc/LonLat.txt delete mode 100644 pacotes/openlayers/doc/Map.txt delete mode 100644 pacotes/openlayers/doc/Marker.Box.txt delete mode 100644 pacotes/openlayers/doc/Marker.txt delete mode 100644 pacotes/openlayers/doc/Pixel.txt delete mode 100644 pacotes/openlayers/doc/Size.txt delete mode 100644 pacotes/openlayers/doc/Tile.Image.txt delete mode 100644 pacotes/openlayers/doc/Tile.WFS.txt delete mode 100644 pacotes/openlayers/doc/Tile.txt delete mode 100644 pacotes/openlayers/doc/Util.txt delete mode 100644 pacotes/openlayers/doc/authors.txt delete mode 100644 pacotes/openlayers/doc/customization delete mode 100644 pacotes/openlayers/doc/readme.txt delete mode 100644 pacotes/openlayers/doc/reference.html delete mode 100644 pacotes/openlayers/examples/GMLParser.html delete mode 100644 pacotes/openlayers/examples/KMLParser.html delete mode 100644 pacotes/openlayers/examples/baseLayers.html delete mode 100644 pacotes/openlayers/examples/boxes.html delete mode 100644 pacotes/openlayers/examples/canvas.html delete mode 100644 pacotes/openlayers/examples/ciesin.html delete mode 100644 pacotes/openlayers/examples/click.html delete mode 100644 pacotes/openlayers/examples/controls.html delete mode 100644 pacotes/openlayers/examples/custom-control.html delete mode 100644 pacotes/openlayers/examples/custom-style.html delete mode 100644 pacotes/openlayers/examples/doubleSetCenter.html delete mode 100644 pacotes/openlayers/examples/draw-feature.html delete mode 100644 pacotes/openlayers/examples/editingtoolbar.html delete mode 100644 pacotes/openlayers/examples/example.html delete mode 100644 pacotes/openlayers/examples/freemap.html delete mode 100644 pacotes/openlayers/examples/fullScreen.html delete mode 100644 pacotes/openlayers/examples/georss-serialize.html delete mode 100644 pacotes/openlayers/examples/georss.html delete mode 100644 pacotes/openlayers/examples/georss.xml delete mode 100644 pacotes/openlayers/examples/getfeatureinfo.html delete mode 100644 pacotes/openlayers/examples/gml-layer.html delete mode 100644 pacotes/openlayers/examples/gml-serialize.html delete mode 100644 pacotes/openlayers/examples/gml/line.xml delete mode 100644 pacotes/openlayers/examples/gml/multipoint.xml delete mode 100644 pacotes/openlayers/examples/gml/multipolygon.xml delete mode 100644 pacotes/openlayers/examples/gml/owls.xml delete mode 100644 pacotes/openlayers/examples/gml/point.xml delete mode 100644 pacotes/openlayers/examples/gml/polygon.xml delete mode 100644 pacotes/openlayers/examples/google.html delete mode 100644 pacotes/openlayers/examples/gutter.html delete mode 100644 pacotes/openlayers/examples/image-layer.html delete mode 100644 pacotes/openlayers/examples/kamap.html delete mode 100644 pacotes/openlayers/examples/kamap.txt delete mode 100644 pacotes/openlayers/examples/kml-layer-linestring.html delete mode 100644 pacotes/openlayers/examples/kml-layer.html delete mode 100644 pacotes/openlayers/examples/kml/lines.kml delete mode 100644 pacotes/openlayers/examples/kml/mc-search.kml delete mode 100644 pacotes/openlayers/examples/layer-opacity.html delete mode 100644 pacotes/openlayers/examples/lite.html delete mode 100644 pacotes/openlayers/examples/lonlatfrompx.html delete mode 100644 pacotes/openlayers/examples/mapserver.html delete mode 100644 pacotes/openlayers/examples/mapserver_untiled.html delete mode 100644 pacotes/openlayers/examples/markerResize.html delete mode 100644 pacotes/openlayers/examples/markers.html delete mode 100644 pacotes/openlayers/examples/markersTextLayer.html delete mode 100644 pacotes/openlayers/examples/mm.html delete mode 100644 pacotes/openlayers/examples/multiserver.html delete mode 100644 pacotes/openlayers/examples/mvs.html delete mode 100644 pacotes/openlayers/examples/navtoolbar.html delete mode 100644 pacotes/openlayers/examples/notile.html delete mode 100644 pacotes/openlayers/examples/openmnnd.html delete mode 100644 pacotes/openlayers/examples/openstreetmap.html delete mode 100644 pacotes/openlayers/examples/outOfRangeMarkers.html delete mode 100644 pacotes/openlayers/examples/outOfRangeMarkers.txt delete mode 100644 pacotes/openlayers/examples/overviewmap.html delete mode 100644 pacotes/openlayers/examples/panel.html delete mode 100644 pacotes/openlayers/examples/popups.html delete mode 100644 pacotes/openlayers/examples/proxy.cgi delete mode 100644 pacotes/openlayers/examples/scroll.html delete mode 100644 pacotes/openlayers/examples/select-feature.html delete mode 100644 pacotes/openlayers/examples/setextent.html delete mode 100644 pacotes/openlayers/examples/supports-vector.html delete mode 100644 pacotes/openlayers/examples/textfile.txt delete mode 100644 pacotes/openlayers/examples/tiger.html delete mode 100644 pacotes/openlayers/examples/tms.html delete mode 100644 pacotes/openlayers/examples/urban.html delete mode 100644 pacotes/openlayers/examples/ve.html delete mode 100644 pacotes/openlayers/examples/vector-features.html delete mode 100644 pacotes/openlayers/examples/webcam.html delete mode 100644 pacotes/openlayers/examples/wfs-scribble.html delete mode 100644 pacotes/openlayers/examples/wfs-states.html delete mode 100644 pacotes/openlayers/examples/wfs-t.html delete mode 100644 pacotes/openlayers/examples/wfs.html delete mode 100644 pacotes/openlayers/examples/wkt.html delete mode 100644 pacotes/openlayers/examples/wms-untiled.html delete mode 100644 pacotes/openlayers/examples/wms.html delete mode 100644 pacotes/openlayers/examples/wmst.html delete mode 100644 pacotes/openlayers/examples/worldwind.html delete mode 100644 pacotes/openlayers/examples/xhtml.html delete mode 100644 pacotes/openlayers/examples/yahoo.html delete mode 100644 pacotes/openlayers/examples/zoomLevels.html delete mode 100644 pacotes/openlayers/img/blank.gif delete mode 100644 pacotes/openlayers/img/close.gif delete mode 100644 pacotes/openlayers/img/drag-rectangle-off.png delete mode 100644 pacotes/openlayers/img/drag-rectangle-on.png delete mode 100644 pacotes/openlayers/img/east-mini.png delete mode 100644 pacotes/openlayers/img/layer-switcher-maximize.png delete mode 100644 pacotes/openlayers/img/layer-switcher-minimize.png delete mode 100644 pacotes/openlayers/img/marker-blue.png delete mode 100644 pacotes/openlayers/img/marker-gold.png delete mode 100644 pacotes/openlayers/img/marker-green.png delete mode 100644 pacotes/openlayers/img/marker.png delete mode 100644 pacotes/openlayers/img/measuring-stick-off.png delete mode 100644 pacotes/openlayers/img/measuring-stick-on.png delete mode 100644 pacotes/openlayers/img/north-mini.png delete mode 100644 pacotes/openlayers/img/panning-hand-off.png delete mode 100644 pacotes/openlayers/img/panning-hand-on.png delete mode 100644 pacotes/openlayers/img/slider.png delete mode 100644 pacotes/openlayers/img/south-mini.png delete mode 100644 pacotes/openlayers/img/west-mini.png delete mode 100644 pacotes/openlayers/img/zoom-minus-mini.png delete mode 100644 pacotes/openlayers/img/zoom-plus-mini.png delete mode 100644 pacotes/openlayers/img/zoom-world-mini.png delete mode 100644 pacotes/openlayers/img/zoombar.png delete mode 100644 pacotes/openlayers/lib/OpenLayers.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Ajax.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/BaseTypes.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/ArgParser.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/DragPan.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/DrawFeature.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/EditingToolbar.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/LayerSwitcher.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/LayerTabs.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/MouseDefaults.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/MousePosition.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/MouseToolbar.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/NavToolbar.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/Navigation.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/OverviewMap.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/PanZoom.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/PanZoomBar.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/Panel.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/Permalink.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/Scale.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/SelectFeature.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/ZoomBox.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Events.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Feature.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Feature/Vector.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Feature/WFS.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Format.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Format/GML.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Format/GeoRSS.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Format/KML.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Format/WFS.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Format/WKT.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/Collection.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/Curve.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/LineString.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/LinearRing.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/MultiLineString.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/MultiPoint.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/MultiPolygon.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/Point.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/Polygon.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/Rectangle.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Geometry/Surface.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Handler.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Handler/Box.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Handler/Drag.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Handler/Feature.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Handler/Keyboard.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Handler/MouseWheel.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Handler/Path.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Handler/Point.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Handler/Polygon.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Icon.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/Boxes.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/Canvas.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/EventPane.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/FixedZoomLevels.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/GML.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/GeoRSS.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/Google.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/Grid.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/HTTPRequest.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/Image.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/KaMap.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/MapServer.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/MapServer/Untiled.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/Markers.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/MultiMap.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/TMS.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/Text.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/Vector.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/VirtualEarth.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/WFS.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/WMS.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/WMS/Untiled.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/WorldWind.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Layer/Yahoo.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Map.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Marker.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Marker/Box.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Popup.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Popup/Anchored.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Renderer.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Renderer/Elements.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Renderer/SVG.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Renderer/VML.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/SingleFile.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Tile.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Tile/Image.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Tile/WFS.js delete mode 100644 pacotes/openlayers/lib/OpenLayers/Util.js delete mode 100644 pacotes/openlayers/lib/Prototype.js delete mode 100644 pacotes/openlayers/lib/Rico/Color.js delete mode 100644 pacotes/openlayers/lib/Rico/Corner.js delete mode 100644 pacotes/openlayers/license.txt delete mode 100644 pacotes/openlayers/news.txt delete mode 100644 pacotes/openlayers/readme.txt delete mode 100644 pacotes/openlayers/release-license.txt delete mode 100644 pacotes/openlayers/repository-license.txt delete mode 100644 pacotes/openlayers/tests/BaseTypes/test_Bounds.html delete mode 100644 pacotes/openlayers/tests/BaseTypes/test_Class.html delete mode 100644 pacotes/openlayers/tests/BaseTypes/test_LonLat.html delete mode 100644 pacotes/openlayers/tests/BaseTypes/test_Pixel.html delete mode 100644 pacotes/openlayers/tests/BaseTypes/test_Size.html delete mode 100644 pacotes/openlayers/tests/Control/test_KeyboardDefaults.html delete mode 100644 pacotes/openlayers/tests/Control/test_LayerSwitcher.html delete mode 100644 pacotes/openlayers/tests/Control/test_MouseToolbar.html delete mode 100644 pacotes/openlayers/tests/Control/test_NavToolbar.html delete mode 100644 pacotes/openlayers/tests/Control/test_OverviewMap.html delete mode 100644 pacotes/openlayers/tests/Control/test_PanZoom.html delete mode 100644 pacotes/openlayers/tests/Control/test_PanZoomBar.html delete mode 100644 pacotes/openlayers/tests/Control/test_Permalink.html delete mode 100644 pacotes/openlayers/tests/Control/test_Scale.html delete mode 100644 pacotes/openlayers/tests/Feature/test_Vector.html delete mode 100644 pacotes/openlayers/tests/Format/test_GML.html delete mode 100644 pacotes/openlayers/tests/Format/test_GeoRSS.html delete mode 100644 pacotes/openlayers/tests/Format/test_WKT.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_Collection.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_Curve.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_LineString.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_LinearRing.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_MultiLineString.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_MultiPoint.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_MultiPolygon.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_Point.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_Polygon.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_Rectangle.html delete mode 100644 pacotes/openlayers/tests/Geometry/test_Surface.html delete mode 100644 pacotes/openlayers/tests/Layer/test_EventPane.html delete mode 100644 pacotes/openlayers/tests/Layer/test_FixedZoomLevels.html delete mode 100644 pacotes/openlayers/tests/Layer/test_GML.html delete mode 100644 pacotes/openlayers/tests/Layer/test_GeoRSS.html delete mode 100644 pacotes/openlayers/tests/Layer/test_Google.html delete mode 100644 pacotes/openlayers/tests/Layer/test_Grid.html delete mode 100644 pacotes/openlayers/tests/Layer/test_HTTPRequest.html delete mode 100644 pacotes/openlayers/tests/Layer/test_Image.html delete mode 100644 pacotes/openlayers/tests/Layer/test_KaMap.html delete mode 100644 pacotes/openlayers/tests/Layer/test_MapServer.html delete mode 100644 pacotes/openlayers/tests/Layer/test_MapServer_Untiled.html delete mode 100644 pacotes/openlayers/tests/Layer/test_Markers.html delete mode 100644 pacotes/openlayers/tests/Layer/test_MultiMap.html delete mode 100644 pacotes/openlayers/tests/Layer/test_TMS.html delete mode 100644 pacotes/openlayers/tests/Layer/test_Text.html delete mode 100644 pacotes/openlayers/tests/Layer/test_Vector.html delete mode 100644 pacotes/openlayers/tests/Layer/test_WFS.html delete mode 100644 pacotes/openlayers/tests/Layer/test_WMS.html delete mode 100644 pacotes/openlayers/tests/Marker/test_Box.html delete mode 100644 pacotes/openlayers/tests/README.txt delete mode 100644 pacotes/openlayers/tests/Tile/test_Image.html delete mode 100644 pacotes/openlayers/tests/atom-1.0.xml delete mode 100644 pacotes/openlayers/tests/data_Layer_Text_textfile.txt delete mode 100644 pacotes/openlayers/tests/data_Layer_Text_textfile_2.txt delete mode 100644 pacotes/openlayers/tests/georss.txt delete mode 100644 pacotes/openlayers/tests/grid_inittiles.html delete mode 100644 pacotes/openlayers/tests/list-tests.html delete mode 100644 pacotes/openlayers/tests/run-tests.html delete mode 100644 pacotes/openlayers/tests/test_Bounds.html delete mode 100644 pacotes/openlayers/tests/test_Class.html delete mode 100644 pacotes/openlayers/tests/test_Control.html delete mode 100644 pacotes/openlayers/tests/test_Control_LayerSwitcher.html delete mode 100644 pacotes/openlayers/tests/test_Control_MouseToolbar.html delete mode 100644 pacotes/openlayers/tests/test_Control_OverviewMap.html delete mode 100644 pacotes/openlayers/tests/test_Control_PanZoom.html delete mode 100644 pacotes/openlayers/tests/test_Control_PanZoomBar.html delete mode 100644 pacotes/openlayers/tests/test_Control_Permalink.html delete mode 100644 pacotes/openlayers/tests/test_Events.html delete mode 100644 pacotes/openlayers/tests/test_Feature.html delete mode 100644 pacotes/openlayers/tests/test_Format.html delete mode 100644 pacotes/openlayers/tests/test_Geometry.html delete mode 100644 pacotes/openlayers/tests/test_Icon.html delete mode 100644 pacotes/openlayers/tests/test_Layer.html delete mode 100644 pacotes/openlayers/tests/test_Layer_EventPane.html delete mode 100644 pacotes/openlayers/tests/test_Layer_FixedZoomLevels.html delete mode 100644 pacotes/openlayers/tests/test_Layer_GeoRSS.html delete mode 100644 pacotes/openlayers/tests/test_Layer_Google.html delete mode 100644 pacotes/openlayers/tests/test_Layer_Grid.html delete mode 100644 pacotes/openlayers/tests/test_Layer_HTTPRequest.html delete mode 100644 pacotes/openlayers/tests/test_Layer_Image.html delete mode 100644 pacotes/openlayers/tests/test_Layer_KaMap.html delete mode 100644 pacotes/openlayers/tests/test_Layer_Markers.html delete mode 100644 pacotes/openlayers/tests/test_Layer_MultiMap.html delete mode 100644 pacotes/openlayers/tests/test_Layer_TMS.html delete mode 100644 pacotes/openlayers/tests/test_Layer_Text.html delete mode 100644 pacotes/openlayers/tests/test_Layer_WMS.html delete mode 100644 pacotes/openlayers/tests/test_LonLat.html delete mode 100644 pacotes/openlayers/tests/test_Map.html delete mode 100644 pacotes/openlayers/tests/test_Marker.html delete mode 100644 pacotes/openlayers/tests/test_Pixel.html delete mode 100644 pacotes/openlayers/tests/test_Popup.html delete mode 100644 pacotes/openlayers/tests/test_Renderer.html delete mode 100644 pacotes/openlayers/tests/test_Size.html delete mode 100644 pacotes/openlayers/tests/test_Tile.html delete mode 100644 pacotes/openlayers/tests/test_Tile_Image.html delete mode 100644 pacotes/openlayers/tests/test_Util.html delete mode 100644 pacotes/openlayers/tests/throws.js delete mode 100644 pacotes/openlayers/theme/default/img/add_point_off.png delete mode 100644 pacotes/openlayers/theme/default/img/add_point_on.png delete mode 100644 pacotes/openlayers/theme/default/img/drag-rectangle-off.png delete mode 100644 pacotes/openlayers/theme/default/img/drag-rectangle-on.png delete mode 100644 pacotes/openlayers/theme/default/img/draw_line_off.png delete mode 100644 pacotes/openlayers/theme/default/img/draw_line_on.png delete mode 100644 pacotes/openlayers/theme/default/img/draw_point_off.png delete mode 100644 pacotes/openlayers/theme/default/img/draw_point_on.png delete mode 100644 pacotes/openlayers/theme/default/img/draw_polygon_off.png delete mode 100644 pacotes/openlayers/theme/default/img/draw_polygon_on.png delete mode 100644 pacotes/openlayers/theme/default/img/icolimites.png delete mode 100644 pacotes/openlayers/theme/default/img/move_feature_off.png delete mode 100644 pacotes/openlayers/theme/default/img/move_feature_on.png delete mode 100644 pacotes/openlayers/theme/default/img/pan_off.png delete mode 100644 pacotes/openlayers/theme/default/img/pan_on.png delete mode 100644 pacotes/openlayers/theme/default/img/panning-hand-off.png delete mode 100644 pacotes/openlayers/theme/default/img/panning-hand-on.png delete mode 100644 pacotes/openlayers/theme/default/img/remove_point_off.png delete mode 100644 pacotes/openlayers/theme/default/img/remove_point_on.png delete mode 100644 pacotes/openlayers/theme/default/style.css delete mode 100644 pacotes/openlayers/tools/README.txt delete mode 100644 pacotes/openlayers/tools/jsmin.c delete mode 100644 pacotes/openlayers/tools/jsmin.py delete mode 100644 pacotes/openlayers/tools/mergejs.py delete mode 100644 pacotes/openlayers/tools/release.sh delete mode 100644 pacotes/openlayers/tools/shrinksafe.py delete mode 100644 pacotes/openlayers/tools/toposort.py diff --git a/pacotes/openlayers/OpenLayers.js b/pacotes/openlayers/OpenLayers.js deleted file mode 100644 index 886a6fe..0000000 --- a/pacotes/openlayers/OpenLayers.js +++ /dev/null @@ -1,1050 +0,0 @@ -/* - - OpenLayers.js -- OpenLayers Map Viewer Library - - Copyright 2005-2007 MetaCarta, Inc., released under the BSD license. - Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt - for the full text of the license. - - Includes compressed code under the following licenses: - - (For uncompressed versions of the code used please see the - OpenLayers SVN repository: ) - -*/ - -/* Contains portions of Prototype.js: - * - * Prototype JavaScript framework, version 1.4.0 - * (c) 2005 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -/** -* -* Contains portions of Rico -* -* Copyright 2005 Sabre Airline Solutions -* -* 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 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -* implied. See the License for the specific language governing -* permissions and limitations under the License. -* -**/ - -OpenLayers={singleFile:true};(function(){var singleFile=(typeof OpenLayers=="object"&&OpenLayers.singleFile);OpenLayers={_scriptName:(!singleFile)?"lib/OpenLayers.js":"OpenLayers.js",_getScriptLocation:function(){var scriptLocation="";var scriptName=OpenLayers._scriptName;var scripts=document.getElementsByTagName('script');for(var i=0;i-1)&&(index+scriptName.length==src.length)){scriptLocation=src.slice(0,-scriptName.length);break;}}} -return scriptLocation;}};if(!singleFile){var jsfiles=new Array("OpenLayers/Util.js","OpenLayers/BaseTypes.js","OpenLayers/BaseTypes/Class.js","OpenLayers/BaseTypes/Bounds.js","OpenLayers/BaseTypes/Element.js","OpenLayers/BaseTypes/LonLat.js","OpenLayers/BaseTypes/Pixel.js","OpenLayers/BaseTypes/Size.js","OpenLayers/Console.js","Rico/Corner.js","Rico/Color.js","OpenLayers/Ajax.js","OpenLayers/Events.js","OpenLayers/Map.js","OpenLayers/Layer.js","OpenLayers/Icon.js","OpenLayers/Marker.js","OpenLayers/Marker/Box.js","OpenLayers/Popup.js","OpenLayers/Tile.js","OpenLayers/Tile/Image.js","OpenLayers/Tile/WFS.js","OpenLayers/Layer/Image.js","OpenLayers/Layer/SphericalMercator.js","OpenLayers/Layer/EventPane.js","OpenLayers/Layer/FixedZoomLevels.js","OpenLayers/Layer/Google.js","OpenLayers/Layer/VirtualEarth.js","OpenLayers/Layer/Yahoo.js","OpenLayers/Layer/HTTPRequest.js","OpenLayers/Layer/Grid.js","OpenLayers/Layer/MapServer.js","OpenLayers/Layer/MapServer/Untiled.js","OpenLayers/Layer/KaMap.js","OpenLayers/Layer/MultiMap.js","OpenLayers/Layer/Markers.js","OpenLayers/Layer/Text.js","OpenLayers/Layer/WorldWind.js","OpenLayers/Layer/WMS.js","OpenLayers/Layer/WMS/Untiled.js","OpenLayers/Layer/GeoRSS.js","OpenLayers/Layer/Boxes.js","OpenLayers/Layer/TMS.js","OpenLayers/Layer/TileCache.js","OpenLayers/Popup/Anchored.js","OpenLayers/Popup/AnchoredBubble.js","OpenLayers/Feature.js","OpenLayers/Feature/Vector.js","OpenLayers/Feature/WFS.js","OpenLayers/Handler.js","OpenLayers/Handler/Point.js","OpenLayers/Handler/Path.js","OpenLayers/Handler/Polygon.js","OpenLayers/Handler/Feature.js","OpenLayers/Handler/Drag.js","OpenLayers/Handler/RegularPolygon.js","OpenLayers/Handler/Box.js","OpenLayers/Handler/MouseWheel.js","OpenLayers/Handler/Keyboard.js","OpenLayers/Control.js","OpenLayers/Control/Attribution.js","OpenLayers/Control/ZoomBox.js","OpenLayers/Control/ZoomToMaxExtent.js","OpenLayers/Control/DragPan.js","OpenLayers/Control/Navigation.js","OpenLayers/Control/MouseDefaults.js","OpenLayers/Control/MousePosition.js","OpenLayers/Control/OverviewMap.js","OpenLayers/Control/KeyboardDefaults.js","OpenLayers/Control/PanZoom.js","OpenLayers/Control/PanZoomBar.js","OpenLayers/Control/ArgParser.js","OpenLayers/Control/Permalink.js","OpenLayers/Control/Scale.js","OpenLayers/Control/LayerSwitcher.js","OpenLayers/Control/DrawFeature.js","OpenLayers/Control/DragFeature.js","OpenLayers/Control/ModifyFeature.js","OpenLayers/Control/Panel.js","OpenLayers/Control/SelectFeature.js","OpenLayers/Geometry.js","OpenLayers/Geometry/Rectangle.js","OpenLayers/Geometry/Collection.js","OpenLayers/Geometry/Point.js","OpenLayers/Geometry/MultiPoint.js","OpenLayers/Geometry/Curve.js","OpenLayers/Geometry/LineString.js","OpenLayers/Geometry/LinearRing.js","OpenLayers/Geometry/Polygon.js","OpenLayers/Geometry/MultiLineString.js","OpenLayers/Geometry/MultiPolygon.js","OpenLayers/Geometry/Surface.js","OpenLayers/Renderer.js","OpenLayers/Renderer/Elements.js","OpenLayers/Renderer/SVG.js","OpenLayers/Renderer/VML.js","OpenLayers/Layer/Vector.js","OpenLayers/Layer/GML.js","OpenLayers/Format.js","OpenLayers/Format/XML.js","OpenLayers/Format/GML.js","OpenLayers/Format/KML.js","OpenLayers/Format/GeoRSS.js","OpenLayers/Format/WFS.js","OpenLayers/Format/WKT.js","OpenLayers/Format/JSON.js","OpenLayers/Format/GeoJSON.js","OpenLayers/Layer/WFS.js","OpenLayers/Control/MouseToolbar.js","OpenLayers/Control/NavToolbar.js","OpenLayers/Control/EditingToolbar.js");var allScriptTags="";var host=OpenLayers._getScriptLocation()+"lib/";for(var i=0;i";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);}})();OpenLayers.VERSION_NUMBER="$Revision: 4899 $";OpenLayers.String={startsWith:function(str,sub){return(str.indexOf(sub)==0);},contains:function(str,sub){return(str.indexOf(sub)!=-1);},trim:function(str){return str.replace(/^\s*(.*?)\s*$/,"$1");},camelize:function(str){var oStringList=str.split('-');var camelizedString=oStringList[0];for(var i=1;i0){fig=parseFloat(num.toPrecision(sig));}else{fig=0;} -return fig;}};if(!Number.prototype.limitSigDigs){Number.prototype.limitSigDigs=function(sig){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.Number.limitSigDigs instead");return OpenLayers.Number.limitSigDigs(this,sig);};} -OpenLayers.Function={bind:function(func,object){var args=Array.prototype.slice.apply(arguments,[2]);return function(){var newArgs=args.concat(Array.prototype.slice.apply(arguments,[0]));return func.apply(object,newArgs);};},bindAsEventListener:function(func,object){return function(event){return func.call(object,event||window.event);};}};if(!Function.prototype.bind){Function.prototype.bind=function(){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.Function.bind instead");Array.prototype.unshift.apply(arguments,[this]);return OpenLayers.Function.bind.apply(null,arguments);};} -if(!Function.prototype.bindAsEventListener){Function.prototype.bindAsEventListener=function(object){OpenLayers.Console.warn("This method has been deprecated and will be removed in 3.0. "+"Please use OpenLayers.Function.bindAsEventListener instead");return OpenLayers.Function.bindAsEventListener(this,object);};} -OpenLayers.Class=function(){var Class=function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype){this.initialize.apply(this,arguments);}} -var extended={};var parent;for(var i=0;i=5.5)&&(version<7));} -OpenLayers.Util.modifyAlphaImageDiv=function(div,id,px,sz,imgURL,position,border,sizing,opacity){OpenLayers.Util.modifyDOMElement(div,id,px,sz);var img=div.childNodes[0];if(imgURL){img.src=imgURL;} -OpenLayers.Util.modifyDOMElement(img,div.id+"_innerImage",null,sz,"relative",border);if(opacity){div.style.opacity=opacity;div.style.filter='alpha(opacity='+(opacity*100)+')';} -if(OpenLayers.Util.alphaHack()){div.style.display="inline-block";if(sizing==null){sizing="scale";} -div.style.filter="progid:DXImageTransform.Microsoft"+".AlphaImageLoader(src='"+img.src+"', "+"sizingMethod='"+sizing+"')";if(div.style.opacity){div.style.filter+=" alpha(opacity="+div.style.opacity*100+")";} -img.style.filter="progid:DXImageTransform.Microsoft"+".Alpha(opacity=0)";}};OpenLayers.Util.createAlphaImageDiv=function(id,px,sz,imgURL,position,border,sizing,opacity,delayDisplay){var div=OpenLayers.Util.createDiv();var img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);div.appendChild(img);if(delayDisplay){img.style.display="none";OpenLayers.Event.observe(img,"load",OpenLayers.Function.bind(OpenLayers.Util.onImageLoad,div));OpenLayers.Event.observe(img,"error",OpenLayers.Function.bind(OpenLayers.Util.onImageLoadError,div));} -OpenLayers.Util.modifyAlphaImageDiv(div,id,px,sz,imgURL,position,border,sizing,opacity);return div;};OpenLayers.Util.upperCaseObject=function(object){var uObject={};for(var key in object){uObject[key.toUpperCase()]=object[key];} -return uObject;};OpenLayers.Util.applyDefaults=function(to,from){for(var key in from){if(to[key]==null){to[key]=from[key];}}};OpenLayers.Util.getParameterString=function(params){paramsArray=[];for(var key in params){var value=params[key];if((value!=null)&&(typeof value!='function')){var encodedValue;if(typeof value=='object'&&value.constructor==Array){var encodedItemArray=[];for(var itemIndex=0;itemIndex0)) -{if(!index){index=0;} -if(result[index].childNodes.length>1){return result.childNodes[1].nodeValue;} -else if(result[index].childNodes.length==1){return result[index].firstChild.nodeValue;}}else{return"";}};OpenLayers.Util.getXmlNodeValue=function(node){var val=null;OpenLayers.Util.Try(function(){val=node.text;if(!val) -val=node.textContent;if(!val) -val=node.firstChild.nodeValue;},function(){val=node.textContent;});return val;};OpenLayers.Util.mouseLeft=function(evt,div){var target=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;while(target!=div&&target!=null){target=target.parentNode;} -return(target!=div);};OpenLayers.Util.rad=function(x){return x*Math.PI/180;};OpenLayers.Util.distVincenty=function(p1,p2){var a=6378137,b=6356752.3142,f=1/298.257223563;var L=OpenLayers.Util.rad(p2.lon-p1.lon);var U1=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p1.lat)));var U2=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p2.lat)));var sinU1=Math.sin(U1),cosU1=Math.cos(U1);var sinU2=Math.sin(U2),cosU2=Math.cos(U2);var lambda=L,lambdaP=2*Math.PI;var iterLimit=20;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){var sinLambda=Math.sin(lambda),cosLambda=Math.cos(lambda);var sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+ -(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma==0)return 0;var cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;var sigma=Math.atan2(sinSigma,cosSigma);var alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);var cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);var cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));} -if(iterLimit==0)return NaN -var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)- -B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));var s=b*A*(sigma-deltaSigma);var d=s.toFixed(3)/1000;return d;};OpenLayers.Util.getParameters=function(url){url=url||window.location.href -if(url==null){url=window.location.href;} -var paramsString="";if(OpenLayers.String.contains(url,'?')){var start=url.indexOf('?')+1;var end=OpenLayers.String.contains(url,"#")?url.indexOf('#'):url.length;paramsString=url.substring(start,end);} -var parameters={};var pairs=paramsString.split(/[&;]/);for(var i=0;i1.0)?(1.0/scale):scale;return normScale;};OpenLayers.Util.getResolutionFromScale=function(scale,units){if(units==null){units="degrees";} -var normScale=OpenLayers.Util.normalizeScale(scale);var resolution=1/(normScale*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH);return resolution;};OpenLayers.Util.getScaleFromResolution=function(resolution,units){if(units==null){units="degrees";} -var scale=resolution*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH;return scale;};OpenLayers.Util.safeStopPropagation=function(evt){OpenLayers.Event.stop(evt,true);};OpenLayers.Util.pagePosition=function(forElement){var valueT=0,valueL=0;var element=forElement;var child=forElement;while(element){if(element==document.body){if(child&&child.style&&OpenLayers.Element.getStyle(child,'position')=='absolute'){break;}} -valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;child=element;try{element=element.offsetParent;}catch(e){OpenLayers.Console.error("OpenLayers.Util.pagePosition failed: element with id "+ -element.id+" may be misplaced.");break;}} -element=forElement;while(element){valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;element=element.parentNode;} -return[valueL,valueT];};OpenLayers.Util.isEquivalentUrl=function(url1,url2,options){options=options||{};OpenLayers.Util.applyDefaults(options,{ignoreCase:true,ignorePort80:true,ignoreHash:true});urlObj1=OpenLayers.Util.createUrlObject(url1,options);urlObj2=OpenLayers.Util.createUrlObject(url2,options);for(var key in urlObj1){if(options.test){alert(key+"\n1:"+urlObj1[key]+"\n2:"+urlObj2[key]);} -var val1=urlObj1[key];var val2=urlObj2[key];switch(key){case"args":break;case"host":case"port":case"protocol":if((val1=="")||(val2=="")){break;} -default:if((key!="args")&&(urlObj1[key]!=urlObj2[key])){return false;} -break;}} -for(var key in urlObj1.args){if(urlObj1.args[key]!=urlObj2.args[key]){return false;} -delete urlObj2.args[key];} -for(var key in urlObj2.args){return false;} -return true;};OpenLayers.Util.createUrlObject=function(url,options){options=options||{};var urlObject={};if(options.ignoreCase){url=url.toLowerCase();} -var a=document.createElement('a');a.href=url;urlObject.host=a.host;var port=a.port;if(port.length<=0){var newHostLength=urlObject.host.length-(port.length);urlObject.host=urlObject.host.substring(0,newHostLength);} -urlObject.protocol=a.protocol;urlObject.port=((port=="80")&&(options.ignorePort80))?"":port;urlObject.hash=(options.ignoreHash)?"":a.hash;var queryString=a.search;if(!queryString){var qMark=url.indexOf("?");queryString=(qMark!=-1)?url.substr(qMark):"";} -urlObject.args=OpenLayers.Util.getParameters(queryString);if(((urlObject.protocol=="file:")&&(url.indexOf("file:")!=-1))||((urlObject.protocol!="file:")&&(urlObject.host!=""))){urlObject.pathname=a.pathname;var qIndex=urlObject.pathname.indexOf("?");if(qIndex!=-1){urlObject.pathname=urlObject.pathname.substring(0,qIndex);}}else{var relStr=OpenLayers.Util.removeTail(url);var backs=0;do{var index=relStr.indexOf("../");if(index==0){backs++ -relStr=relStr.substr(3);}else if(index>=0){var prevChunk=relStr.substr(0,index-1);var slash=prevChunk.indexOf("/");prevChunk=(slash!=-1)?prevChunk.substr(0,slash+1):"";var postChunk=relStr.substr(index+3);relStr=prevChunk+postChunk;}}while(index!=-1) -var windowAnchor=document.createElement("a");var windowUrl=window.location.href;if(options.ignoreCase){windowUrl=windowUrl.toLowerCase();} -windowAnchor.href=windowUrl;urlObject.protocol=windowAnchor.protocol;var splitter=(windowAnchor.pathname.indexOf("/")!=-1)?"/":"\\";var dirs=windowAnchor.pathname.split(splitter);dirs.pop();while((backs>0)&&(dirs.length>0)){dirs.pop();backs--;} -relStr=dirs.join("/")+"/"+relStr;urlObject.pathname=relStr;} -if((urlObject.protocol=="file:")||(urlObject.protocol=="")){urlObject.host="localhost";} -return urlObject;};OpenLayers.Util.removeTail=function(url){var head=null;var qMark=url.indexOf("?");var hashMark=url.indexOf("#");if(qMark==-1){head=(hashMark!=-1)?url.substr(0,hashMark):url;}else{head=(hashMark!=-1)?url.substr(0,Math.min(qMark,hashMark)):url.substr(0,qMark);} -return head;};OpenLayers.Util.getBrowserName=function(){var browserName="";var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("opera")!=-1){browserName="opera";}else if(ua.indexOf("msie")!=-1){browserName="msie";}else if(ua.indexOf("safari")!=-1){browserName="safari";}else if(ua.indexOf("mozilla")!=-1){if(ua.indexOf("firefox")!=-1){browserName="firefox";}else{browserName="mozilla";}} -return browserName;};OpenLayers.Rico=new Object();OpenLayers.Rico.Corner={round:function(e,options){e=OpenLayers.Util.getElement(e);this._setOptions(options);var color=this.options.color;if(this.options.color=="fromElement") -color=this._background(e);var bgColor=this.options.bgColor;if(this.options.bgColor=="fromParent") -bgColor=this._background(e.offsetParent);this._roundCornersImpl(e,color,bgColor);},changeColor:function(theDiv,newColor){theDiv.style.backgroundColor=newColor;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx"+el.innerHTML+""},_roundTopCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=0;i=0;i--) -corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom"));el.style.paddingBottom=0;el.appendChild(corner);},_createCorner:function(bgColor){var corner=document.createElement("div");corner.style.backgroundColor=(this._isTransparent()?"transparent":bgColor);return corner;},_createCornerSlice:function(color,bgColor,n,position){var slice=document.createElement("span");var inStyle=slice.style;inStyle.backgroundColor=color;inStyle.display="block";inStyle.height="1px";inStyle.overflow="hidden";inStyle.fontSize="1px";var borderColor=this._borderColor(color,bgColor);if(this.options.border&&n==0){inStyle.borderTopStyle="solid";inStyle.borderTopWidth="1px";inStyle.borderLeftWidth="0px";inStyle.borderRightWidth="0px";inStyle.borderBottomWidth="0px";inStyle.height="0px";inStyle.borderColor=borderColor;} -else if(borderColor){inStyle.borderColor=borderColor;inStyle.borderStyle="solid";inStyle.borderWidth="0px 1px";} -if(!this.options.compact&&(n==(this.options.numSlices-1))) -inStyle.height="2px";this._setMargin(slice,n,position);this._setBorder(slice,n,position);return slice;},_setOptions:function(options){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false} -OpenLayers.Util.extend(this.options,options||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()) -this.options.blend=false;},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")) -return"";if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0) -return"";if(this.options.corners.indexOf("tl")>=0) -return"left";else if(this.options.corners.indexOf("tr")>=0) -return"right";return"";},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")) -return"";if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0) -return"";if(this.options.corners.indexOf("bl")>=0) -return"left";else if(this.options.corners.indexOf("br")>=0) -return"right";return"";},_borderColor:function(color,bgColor){if(color=="transparent") -return bgColor;else if(this.options.border) -return this.options.border;else if(this.options.blend) -return this._blend(bgColor,color);else -return"";},_setMargin:function(el,n,corners){var marginSize=this._marginSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.marginLeft=marginSize+"px";el.style.marginRight="0px";} -else if(whichSide=="right"){el.style.marginRight=marginSize+"px";el.style.marginLeft="0px";} -else{el.style.marginLeft=marginSize+"px";el.style.marginRight=marginSize+"px";}},_setBorder:function(el,n,corners){var borderSize=this._borderSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth="0px";} -else if(whichSide=="right"){el.style.borderRightWidth=borderSize+"px";el.style.borderLeftWidth="0px";} -else{el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";} -if(this.options.border!=false) -el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";},_marginSize:function(n){if(this._isTransparent()) -return 0;var marginSizes=[5,3,2,1];var blendedMarginSizes=[3,2,1,0];var compactMarginSizes=[2,1];var smBlendedMarginSizes=[1,0];if(this.options.compact&&this.options.blend) -return smBlendedMarginSizes[n];else if(this.options.compact) -return compactMarginSizes[n];else if(this.options.blend) -return blendedMarginSizes[n];else -return marginSizes[n];},_borderSize:function(n){var transparentBorderSizes=[5,3,2,1];var blendedBorderSizes=[2,1,1,1];var compactBorderSizes=[1,0];var actualBorderSizes=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())) -return 1;else if(this.options.compact) -return compactBorderSizes[n];else if(this.options.blend) -return blendedBorderSizes[n];else if(this.options.border) -return actualBorderSizes[n];else if(this._isTransparent()) -return transparentBorderSizes[n];return 0;},_hasString:function(str){for(var i=1;i=0)return true;return false;},_blend:function(c1,c2){var cc1=OpenLayers.Rico.Color.createFromHex(c1);cc1.blend(OpenLayers.Rico.Color.createFromHex(c2));return cc1;},_background:function(el){try{return OpenLayers.Rico.Color.createColorFromBackground(el).asHex();}catch(err){return"#ffffff";}},_isTransparent:function(){return this.options.color=="transparent";},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr");},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br");},_hasSingleTextChild:function(el){return el.childNodes.length==1&&el.childNodes[0].nodeType==3;}} -OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(request){alert("Unhandled request return "+request.statusText);};OpenLayers.loadURL=function(uri,params,caller,onComplete,onFailure){if(OpenLayers.ProxyHost&&OpenLayers.String.startsWith(uri,"http")){uri=OpenLayers.ProxyHost+escape(uri);} -var success=(onComplete)?OpenLayers.Function.bind(onComplete,caller):OpenLayers.nullHandler;var failure=(onFailure)?OpenLayers.Function.bind(onFailure,caller):OpenLayers.nullHandler;new OpenLayers.Ajax.Request(uri,{method:'get',parameters:params,onComplete:success,onFailure:failure});};OpenLayers.parseXMLString=function(text){var index=text.indexOf('<');if(index>0){text=text.substring(index);} -var ajaxResponse=OpenLayers.Util.Try(function(){var xmldom=new ActiveXObject('Microsoft.XMLDOM');xmldom.loadXML(text);return xmldom;},function(){return new DOMParser().parseFromString(text,'text/xml');},function(){var req=new XMLHttpRequest();req.open("GET","data:"+"text/xml"+";charset=utf-8,"+encodeURIComponent(text),false);if(req.overrideMimeType){req.overrideMimeType("text/xml");} -req.send(null);return req.responseXML;});return ajaxResponse;};OpenLayers.Ajax={emptyFunction:function(){},getTransport:function(){return OpenLayers.Util.Try(function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')},function(){return new XMLHttpRequest()})||false;},activeRequestCount:0};OpenLayers.Ajax.Responders={responders:[],register:function(responderToAdd){for(var i=0;i=200&&this.transport.status<300);},responseIsFailure:function(){return!this.responseIsSuccess();}};OpenLayers.Ajax.Request=OpenLayers.Class(OpenLayers.Ajax.Base,{initialize:function(url,options){this.transport=OpenLayers.Ajax.getTransport();this.setOptions(options);this.request(url);},request:function(url){var parameters=this.options.parameters||'';if(parameters.length>0)parameters+='&_=';try{this.url=url;if(this.options.method=='get'&¶meters.length>0){this.url+=(this.url.match(/\?/)?'&':'?')+parameters;} -OpenLayers.Ajax.Responders.dispatch('onCreate',this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=OpenLayers.Function.bind(this.onStateChange,this);setTimeout(OpenLayers.Function.bind((function(){this.respondToReadyState(1)}),this),10);} -this.setRequestHeaders();var body=this.options.postBody?this.options.postBody:parameters;this.transport.send(this.options.method=='post'?body:null);if(!this.options.asynchronous&&this.transport.overrideMimeType){this.onStateChange();}}catch(e){this.dispatchException(e);}},setRequestHeaders:function(){var requestHeaders=['X-Requested-With','XMLHttpRequest','X-Prototype-Version','OpenLayers'];if(this.options.method=='post'&&!this.options.postBody){requestHeaders.push('Content-type','application/x-www-form-urlencoded');if(this.transport.overrideMimeType){requestHeaders.push('Connection','close');}} -if(this.options.requestHeaders){requestHeaders.push.apply(requestHeaders,this.options.requestHeaders);} -for(var i=0;ithis.right)){this.right=bounds.right;} -if((this.top==null)||(bounds.top>this.top)){this.top=bounds.top;}}}},containsLonLat:function(ll,inclusive){return this.contains(ll.lon,ll.lat,inclusive);},containsPixel:function(px,inclusive){return this.contains(px.x,px.y,inclusive);},contains:function(x,y,inclusive){if(inclusive==null){inclusive=true;} -var contains=false;if(inclusive){contains=((x>=this.left)&&(x<=this.right)&&(y>=this.bottom)&&(y<=this.top));}else{contains=((x>this.left)&&(xthis.bottom)&&(ythis.bottom)&&(bounds.bottombounds.bottom)&&(this.bottomthis.bottom)&&(bounds.topbounds.bottom)&&(this.topthis.left)&&(bounds.rightbounds.left)&&(this.rightthis.left)&&(bounds.leftbounds.left)&&(this.left=this.left)&&(bounds.left<=this.right);inTop=(bounds.top>=this.bottom)&&(bounds.top<=this.top);inRight=(bounds.right>=this.left)&&(bounds.right<=this.right);inBottom=(bounds.bottom>=this.bottom)&&(bounds.bottom<=this.top);}else{inLeft=(bounds.left>this.left)&&(bounds.leftthis.bottom)&&(bounds.topthis.left)&&(bounds.rightthis.bottom)&&(bounds.bottom=maxExtent.right&&newBounds.right>maxExtent.right){newBounds=newBounds.add(-maxExtent.getWidth(),0);}} -return newBounds;},CLASS_NAME:"OpenLayers.Bounds"});OpenLayers.Bounds.fromString=function(str){var bounds=str.split(",");return OpenLayers.Bounds.fromArray(bounds);};OpenLayers.Bounds.fromArray=function(bbox){return new OpenLayers.Bounds(parseFloat(bbox[0]),parseFloat(bbox[1]),parseFloat(bbox[2]),parseFloat(bbox[3]));};OpenLayers.Bounds.fromSize=function(size){return new OpenLayers.Bounds(0,size.h,size.w,0);};OpenLayers.Bounds.oppositeQuadrant=function(quadrant){var opp="";opp+=(quadrant.charAt(0)=='t')?'b':'t';opp+=(quadrant.charAt(1)=='l')?'r':'l';return opp;};OpenLayers.Element={visible:function(element){return OpenLayers.Util.getElement(element).style.display!='none';},toggle:function(){for(var i=0;imaxExtent.right){newLonLat.lon-=maxExtent.getWidth();}} -return newLonLat;},CLASS_NAME:"OpenLayers.LonLat"});OpenLayers.LonLat.fromString=function(str){var pair=str.split(",");return new OpenLayers.LonLat(parseFloat(pair[0]),parseFloat(pair[1]));};OpenLayers.Pixel=OpenLayers.Class({x:0.0,y:0.0,initialize:function(x,y){this.x=parseFloat(x);this.y=parseFloat(y);},toString:function(){return("x="+this.x+",y="+this.y);},clone:function(){return new OpenLayers.Pixel(this.x,this.y);},equals:function(px){var equals=false;if(px!=null){equals=((this.x==px.x&&this.y==px.y)||(isNaN(this.x)&&isNaN(this.y)&&isNaN(px.x)&&isNaN(px.y)));} -return equals;},add:function(x,y){if((x==null)||(y==null)){var msg="You must pass both x and y values to the add function.";OpenLayers.Console.error(msg);return null;} -return new OpenLayers.Pixel(this.x+x,this.y+y);},offset:function(px){var newPx=this.clone();if(px){newPx=this.add(px.x,px.y);} -return newPx;},CLASS_NAME:"OpenLayers.Pixel"});OpenLayers.Size=OpenLayers.Class({w:0.0,h:0.0,initialize:function(w,h){this.w=parseFloat(w);this.h=parseFloat(h);},toString:function(){return("w="+this.w+",h="+this.h);},clone:function(){return new OpenLayers.Size(this.w,this.h);},equals:function(sz){var equals=false;if(sz!=null){equals=((this.w==sz.w&&this.h==sz.h)||(isNaN(this.w)&&isNaN(this.h)&&isNaN(sz.w)&&isNaN(sz.h)));} -return equals;},CLASS_NAME:"OpenLayers.Size"});OpenLayers.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(){},CLASS_NAME:"OpenLayers.Console"};(function(){if(window.console){var scripts=document.getElementsByTagName("script");for(var i=0;i0.5;},isDark:function(){return!this.isBright();},asRGB:function(){return"rgb("+this.rgb.r+","+this.rgb.g+","+this.rgb.b+")";},asHex:function(){return"#"+this.rgb.r.toColorPart()+this.rgb.g.toColorPart()+this.rgb.b.toColorPart();},asHSB:function(){return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r,this.rgb.g,this.rgb.b);},toString:function(){return this.asHex();}});OpenLayers.Rico.Color.createFromHex=function(hexCode){if(hexCode.length==4){var shortHexCode=hexCode;var hexCode='#';for(var i=1;i<4;i++)hexCode+=(shortHexCode.charAt(i)+ -shortHexCode.charAt(i));} -if(hexCode.indexOf('#')==0) -hexCode=hexCode.substring(1);var red=hexCode.substring(0,2);var green=hexCode.substring(2,4);var blue=hexCode.substring(4,6);return new OpenLayers.Rico.Color(parseInt(red,16),parseInt(green,16),parseInt(blue,16));} -OpenLayers.Rico.Color.createColorFromBackground=function(elem){var actualColor=RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem),"backgroundColor","background-color");if(actualColor=="transparent"&&elem.parentNode) -return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);if(actualColor==null) -return new OpenLayers.Rico.Color(255,255,255);if(actualColor.indexOf("rgb(")==0){var colors=actualColor.substring(4,actualColor.length-1);var colorArray=colors.split(",");return new OpenLayers.Rico.Color(parseInt(colorArray[0]),parseInt(colorArray[1]),parseInt(colorArray[2]));} -else if(actualColor.indexOf("#")==0){return OpenLayers.Rico.Color.createFromHex(actualColor);} -else -return new OpenLayers.Rico.Color(255,255,255);} -OpenLayers.Rico.Color.HSBtoRGB=function(hue,saturation,brightness){var red=0;var green=0;var blue=0;if(saturation==0){red=parseInt(brightness*255.0+0.5);green=red;blue=red;} -else{var h=(hue-Math.floor(hue))*6.0;var f=h-Math.floor(h);var p=brightness*(1.0-saturation);var q=brightness*(1.0-saturation*f);var t=brightness*(1.0-(saturation*(1.0-f)));switch(parseInt(h)){case 0:red=(brightness*255.0+0.5);green=(t*255.0+0.5);blue=(p*255.0+0.5);break;case 1:red=(q*255.0+0.5);green=(brightness*255.0+0.5);blue=(p*255.0+0.5);break;case 2:red=(p*255.0+0.5);green=(brightness*255.0+0.5);blue=(t*255.0+0.5);break;case 3:red=(p*255.0+0.5);green=(q*255.0+0.5);blue=(brightness*255.0+0.5);break;case 4:red=(t*255.0+0.5);green=(p*255.0+0.5);blue=(brightness*255.0+0.5);break;case 5:red=(brightness*255.0+0.5);green=(p*255.0+0.5);blue=(q*255.0+0.5);break;}} -return{r:parseInt(red),g:parseInt(green),b:parseInt(blue)};} -OpenLayers.Rico.Color.RGBtoHSB=function(r,g,b){var hue;var saturation;var brightness;var cmax=(r>g)?r:g;if(b>cmax) -cmax=b;var cmin=(rBase Layer";this.baseLbl.style.marginTop="3px";this.baseLbl.style.marginLeft="3px";this.baseLbl.style.marginBottom="3px";this.baseLayersDiv=document.createElement("div");this.baseLayersDiv.style.paddingLeft="10px";this.dataLbl=document.createElement("div");this.dataLbl.innerHTML="Overlays";this.dataLbl.style.marginTop="3px";this.dataLbl.style.marginLeft="3px";this.dataLbl.style.marginBottom="3px";this.dataLayersDiv=document.createElement("div");this.dataLayersDiv.style.paddingLeft="10px";if(this.ascending){this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);}else{this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);this.layersDiv.appendChild(this.baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);} -this.div.appendChild(this.layersDiv);OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.activeColor,blend:false});OpenLayers.Rico.Corner.changeOpacity(this.layersDiv,0.75);var imgLocation=OpenLayers.Util.getImagesLocation();var sz=new OpenLayers.Size(18,18);var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MaximizeDiv",null,sz,img,"absolute");this.maximizeDiv.style.top="5px";this.maximizeDiv.style.right="0px";this.maximizeDiv.style.left="";this.maximizeDiv.style.display="none";OpenLayers.Event.observe(this.maximizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';var sz=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,sz,img,"absolute");this.minimizeDiv.style.top="5px";this.minimizeDiv.style.right="0px";this.minimizeDiv.style.left="";this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);},ignoreEvent:function(evt){OpenLayers.Event.stop(evt);},mouseDown:function(evt){this.isMouseDown=true;this.ignoreEvent(evt);},mouseUp:function(evt){if(this.isMouseDown){this.isMouseDown=false;this.ignoreEvent(evt);}},CLASS_NAME:"OpenLayers.Control.LayerSwitcher"});OpenLayers.Control.MouseDefaults=OpenLayers.Class(OpenLayers.Control,{performedDrag:false,wheelObserver:null,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();} -this.handler=null;this.map.events.unregister("click",this,this.defaultClick);this.map.events.unregister("dblclick",this,this.defaultDblClick);this.map.events.unregister("mousedown",this,this.defaultMouseDown);this.map.events.unregister("mouseup",this,this.defaultMouseUp);this.map.events.unregister("mousemove",this,this.defaultMouseMove);this.map.events.unregister("mouseout",this,this.defaultMouseOut);OpenLayers.Event.stopObserving(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.stopObserving(window,"mousewheel",this.wheelObserver);OpenLayers.Event.stopObserving(document,"mousewheel",this.wheelObserver);this.wheelObserver=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.map.events.register("click",this,this.defaultClick);this.map.events.register("dblclick",this,this.defaultDblClick);this.map.events.register("mousedown",this,this.defaultMouseDown);this.map.events.register("mouseup",this,this.defaultMouseUp);this.map.events.register("mousemove",this,this.defaultMouseMove);this.map.events.register("mouseout",this,this.defaultMouseOut);this.registerWheelEvents();},registerWheelEvents:function(){this.wheelObserver=OpenLayers.Function.bindAsEventListener(this.onWheelEvent,this);OpenLayers.Event.observe(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.observe(window,"mousewheel",this.wheelObserver);OpenLayers.Event.observe(document,"mousewheel",this.wheelObserver);},defaultClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;var notAfterDrag=!this.performedDrag;this.performedDrag=false;return notAfterDrag;},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.mouseDragStart=evt.xy.clone();this.performedDrag=false;if(evt.shiftKey){this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.viewPortDiv.appendChild(this.zoomBox);} -document.onselectstart=function(){return false;} -OpenLayers.Event.stop(evt);},defaultMouseMove:function(evt){this.mousePosition=evt.xy.clone();if(this.mouseDragStart!=null){if(this.zoomBox){var deltaX=Math.abs(this.mouseDragStart.x-evt.xy.x);var deltaY=Math.abs(this.mouseDragStart.y-evt.xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";if(evt.xy.x0){this.map.setCenter(this.map.getLonLatFromPixel(evt.xy),this.map.getZoom()-1);}},zoomBoxEnd:function(evt){if(this.mouseDragStart!=null){if(Math.abs(this.mouseDragStart.x-evt.xy.x)>5||Math.abs(this.mouseDragStart.y-evt.xy.y)>5){var start=this.map.getLonLatFromViewPortPx(this.mouseDragStart);var end=this.map.getLonLatFromViewPortPx(evt.xy);var top=Math.max(start.lat,end.lat);var bottom=Math.min(start.lat,end.lat);var left=Math.min(start.lon,end.lon);var right=Math.max(start.lon,end.lon);var bounds=new OpenLayers.Bounds(left,bottom,right,top);this.map.zoomToExtent(bounds);}else{var end=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(new OpenLayers.LonLat((end.lon),(end.lat)),this.map.getZoom()+1);} -this.removeZoomBox();}},removeZoomBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;},onWheelEvent:function(e){var inMap=false;var elem=OpenLayers.Event.element(e);while(elem!=null){if(this.map&&elem==this.map.div){inMap=true;break;} -elem=elem.parentNode;} -if(inMap){var delta=0;if(!e){e=window.event;} -if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera){delta=-delta;}}else if(e.detail){delta=-e.detail/3;} -if(delta){e.xy=this.mousePosition;if(delta<0){this.defaultWheelDown(e);}else{this.defaultWheelUp(e);}} -OpenLayers.Event.stop(e);}},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});OpenLayers.Control.MousePosition=OpenLayers.Class(OpenLayers.Control,{element:null,prefix:'',separator:', ',suffix:'',numdigits:5,granularity:10,lastXy:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.map){this.map.events.unregister('mousemove',this,this.redraw);} -OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.left="";this.div.top="";this.div.className=this.displayClass;this.element=this.div;} -this.redraw();return this.div;},redraw:function(evt){var lonLat;if(evt==null){lonLat=new OpenLayers.LonLat(0,0);}else{if(this.lastXy==null||Math.abs(evt.xy.x-this.lastXy.x)>this.granularity||Math.abs(evt.xy.y-this.lastXy.y)>this.granularity) -{this.lastXy=evt.xy;return;} -lonLat=this.map.getLonLatFromPixel(evt.xy);this.lastXy=evt.xy;} -var digits=parseInt(this.numdigits);var newHtml=this.prefix+ -lonLat.lon.toFixed(digits)+ -this.separator+ -lonLat.lat.toFixed(digits)+ -this.suffix;if(newHtml!=this.element.innerHTML){this.element.innerHTML=newHtml;}},setMap:function(){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register('mousemove',this,this.redraw);},CLASS_NAME:"OpenLayers.Control.MousePosition"});OpenLayers.Control.PanZoom=OpenLayers.Class(OpenLayers.Control,{slideFactor:50,buttons:null,position:null,initialize:function(options){this.position=new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,OpenLayers.Control.PanZoom.Y);OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);while(this.buttons.length){var btn=this.buttons.shift();btn.map=null;OpenLayers.Event.stopObservingElement(btn);} -this.buttons=null;this.position=null;},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position;this.buttons=[];var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.y+sz.h;this._addButton("panleft","west-mini.png",px,sz);this._addButton("panright","east-mini.png",px.add(sz.w,0),sz);this._addButton("pandown","south-mini.png",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);this._addButton("zoomworld","zoom-world-mini.png",centered.add(0,sz.h*4+5),sz);this._addButton("zoomout","zoom-minus-mini.png",centered.add(0,sz.h*5+5),sz);return this.div;},_addButton:function(id,img,xy,sz){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_PanZoom_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);OpenLayers.Event.observe(btn,"mousedown",OpenLayers.Function.bindAsEventListener(this.buttonDown,btn));OpenLayers.Event.observe(btn,"dblclick",OpenLayers.Function.bindAsEventListener(this.doubleClick,btn));OpenLayers.Event.observe(btn,"click",OpenLayers.Function.bindAsEventListener(this.doubleClick,btn));btn.action=id;btn.map=this.map;btn.slideFactor=this.slideFactor;this.buttons.push(btn);return btn;},doubleClick:function(evt){OpenLayers.Event.stop(evt);return false;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;switch(this.action){case"panup":this.map.pan(0,-50);break;case"pandown":this.map.pan(0,50);break;case"panleft":this.map.pan(-50,0);break;case"panright":this.map.pan(50,0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break;case"zoomworld":this.map.zoomToMaxExtent();break;} -OpenLayers.Event.stop(evt);},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.Panel=OpenLayers.Class(OpenLayers.Control,{controls:null,defaultControl:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,[options]);this.controls=[];},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var i=this.controls.length-1;i>=0;i--){OpenLayers.Event.stopObservingElement(this.controls[i].panel_div);this.controls[i].panel_div=null;}},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var i=0;i=9500&&scale<=950000){scale=Math.round(scale/1000)+"K";}else if(scale>=950000){scale=Math.round(scale/1000000)+"M";}else{scale=Math.round(scale);} -this.element.innerHTML="Scale = 1 : "+scale;},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){if(this.map){this.map.zoomToMaxExtent();}},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},stop:function(event,allowDefault){if(!allowDefault){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}} -if(event.stopPropagation){event.stopPropagation();}else{event.cancelBubble=true;}},findElement:function(event,tagName){var element=OpenLayers.Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase()))) -element=element.parentNode;return element;},observe:function(elementParam,name,observer,useCapture){var element=OpenLayers.Util.getElement(elementParam);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent)){name='keydown';} -if(!this.observers){this.observers={};} -if(!element._eventCacheID){var idPrefix="eventCacheID_";if(element.id){idPrefix=element.id+"_"+idPrefix;} -element._eventCacheID=OpenLayers.Util.createUniqueID(idPrefix);} -var cacheID=element._eventCacheID;if(!this.observers[cacheID]){this.observers[cacheID]=[];} -this.observers[cacheID].push({'element':element,'name':name,'observer':observer,'useCapture':useCapture});if(element.addEventListener){element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){element.attachEvent('on'+name,observer);}},stopObservingElement:function(elementParam){var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[cacheID]);},_removeElementObservers:function(elementObservers){if(elementObservers){for(var i=elementObservers.length-1;i>=0;i--){var entry=elementObservers[i];var args=new Array(entry.element,entry.name,entry.observer,entry.useCapture);var removed=OpenLayers.Event.stopObserving.apply(this,args);}}},stopObserving:function(elementParam,name,observer,useCapture){useCapture=useCapture||false;var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;if(name=='keypress'){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent){name='keydown';}} -var foundEntry=false;var elementObservers=OpenLayers.Event.observers[cacheID];if(elementObservers){var i=0;while(!foundEntry&&i0)){for(var i=0;i0){this.root.removeChild(this.root.firstChild);}}},getNodeType:function(geometry){},drawGeometry:function(geometry,style,featureId){var className=geometry.CLASS_NAME;if((className=="OpenLayers.Geometry.Collection")||(className=="OpenLayers.Geometry.MultiPoint")||(className=="OpenLayers.Geometry.MultiLineString")||(className=="OpenLayers.Geometry.MultiPolygon")){for(var i=0;ibottomRight.lon){if(topLeft.lon<0){topLeft.lon=-180-(topLeft.lon+180);}else{bottomRight.lon=180+bottomRight.lon+180;}} -bounds=new OpenLayers.Bounds(topLeft.lon,bottomRight.lat,bottomRight.lon,topLeft.lat);return bounds;},CLASS_NAME:"OpenLayers.Tile"});OpenLayers.Control.MouseToolbar=OpenLayers.Class(OpenLayers.Control.MouseDefaults,{mode:null,buttons:null,direction:"vertical",buttonClicked:null,initialize:function(position,direction){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.position=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,OpenLayers.Control.MouseToolbar.Y);if(position){this.position=position;} -if(direction){this.direction=direction;} -this.measureDivs=[];},destroy:function(){for(var btnId in this.buttons){var btn=this.buttons[btnId];btn.map=null;btn.events.destroy();} -OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);OpenLayers.Control.MouseDefaults.prototype.draw.apply(this,arguments);this.buttons={};var sz=new OpenLayers.Size(28,28);var centered=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);this._addButton("zoombox","drag-rectangle-off.png","drag-rectangle-on.png",centered,sz,"Shift->Drag to zoom to area");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this._addButton("pan","panning-hand-off.png","panning-hand-on.png",centered,sz,"Drag the map to pan.");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this.switchModeTo("pan");return this.div;},_addButton:function(id,img,activeImg,xy,sz,title){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var activeImgLocation=OpenLayers.Util.getImagesLocation()+activeImg;var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MouseToolbar_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);btn.imgLocation=imgLocation;btn.activeImgLocation=activeImgLocation;btn.events=new OpenLayers.Events(this,btn,null,true);btn.events.register("mousedown",this,this.buttonDown);btn.events.register("mouseup",this,this.buttonUp);btn.events.register("dblclick",this,OpenLayers.Event.stop);btn.action=id;btn.title=title;btn.alt=title;btn.map=this.map;this.buttons[id]=btn;return btn;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.buttonClicked=evt.element.action;OpenLayers.Event.stop(evt);},buttonUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.buttonClicked!=null){if(this.buttonClicked==evt.element.action){this.switchModeTo(evt.element.action);} -OpenLayers.Event.stop(evt);this.buttonClicked=null;}},defaultDblClick:function(evt){this.switchModeTo("pan");this.performedDrag=false;var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.mouseDragStart=evt.xy.clone();this.performedDrag=false;this.startViaKeyboard=false;if(evt.shiftKey&&this.mode!="zoombox"){this.switchModeTo("zoombox");this.startViaKeyboard=true;}else if(evt.altKey&&this.mode!="measure"){this.switchModeTo("measure");}else if(!this.mode){this.switchModeTo("pan");} -switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.viewPortDiv.appendChild(this.zoomBox);this.performedDrag=true;break;case"measure":var distance="";if(this.measureStart){measureEnd=this.map.getLonLatFromViewPortPx(this.mouseDragStart);distance=OpenLayers.Util.distVincenty(this.measureStart,measureEnd);distance=Math.round(distance*100)/100;distance=distance+"km";this.measureStartBox=this.measureBox;} -this.measureStart=this.map.getLonLatFromViewPortPx(this.mouseDragStart);;this.measureBox=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),-2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBox.style.width="4px";this.measureBox.style.height="4px";this.measureBox.style.fontSize="1px";this.measureBox.style.backgroundColor="red";this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);if(distance){this.measureBoxDistance=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBoxDistance.innerHTML=distance;this.measureBoxDistance.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBoxDistance);this.measureDivs.push(this.measureBoxDistance);} -this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);this.measureDivs.push(this.measureBox);break;default:this.map.div.style.cursor="move";break;} -document.onselectstart=function(){return false;} -OpenLayers.Event.stop(evt);},switchModeTo:function(mode){if(mode!=this.mode){if(this.mode&&this.buttons[this.mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode],null,null,null,this.buttons[this.mode].imgLocation);} -if(this.mode=="measure"&&mode!="measure"){for(var i=0;i0)){if(this.map.baseLayer){var layer=this.map.baseLayer.clone();this.layers=[layer];}else{this.map.events.register("changebaselayer",this,this.baseLayerDraw);return this.div;}} -this.element=document.createElement('div');this.element.className=this.displayClass+'Element';this.element.style.display='none';this.mapDiv=document.createElement('div');this.mapDiv.style.width=this.size.w+'px';this.mapDiv.style.height=this.size.h+'px';this.mapDiv.style.position='relative';this.mapDiv.style.overflow='hidden';this.mapDiv.id=OpenLayers.Util.createUniqueID('overviewMap');this.extentRectangle=document.createElement('div');this.extentRectangle.style.position='absolute';this.extentRectangle.style.zIndex=1000;this.extentRectangle.style.overflow='hidden';this.extentRectangle.style.backgroundImage='url('+ -OpenLayers.Util.getImagesLocation()+'blank.gif)';this.extentRectangle.className=this.displayClass+'ExtentRectangle';this.mapDiv.appendChild(this.extentRectangle);this.element.appendChild(this.mapDiv);this.div.appendChild(this.element);this.map.events.register('moveend',this,this.update);this.elementEvents=new OpenLayers.Events(this,this.element);this.elementEvents.register('mousedown',this,function(e){OpenLayers.Event.stop(e);});this.elementEvents.register('click',this,function(e){OpenLayers.Event.stop(e);});this.elementEvents.register('dblclick',this,function(e){OpenLayers.Event.stop(e);});this.rectEvents=new OpenLayers.Events(this,this.extentRectangle,null,true);this.rectEvents.register('mouseout',this,this.rectMouseOut);this.rectEvents.register('mousedown',this,this.rectMouseDown);this.rectEvents.register('mousemove',this,this.rectMouseMove);this.rectEvents.register('mouseup',this,this.rectMouseUp);this.rectEvents.register('click',this,function(e){OpenLayers.Event.stop(e);});this.rectEvents.register('dblclick',this,this.rectDblClick);this.mapDivEvents=new OpenLayers.Events(this,this.mapDiv);this.mapDivEvents.register('click',this,this.mapDivClick);if(!this.outsideViewport){this.div.className=this.displayClass+'Container';var imgLocation=OpenLayers.Util.getImagesLocation();var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+'MaximizeButton',null,new OpenLayers.Size(18,18),img,'absolute');this.maximizeDiv.style.display='none';this.maximizeDiv.className=this.displayClass+'MaximizeButton';OpenLayers.Event.observe(this.maximizeDiv,'click',OpenLayers.Function.bindAsEventListener(this.maximizeControl,this));this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv('OpenLayers_Control_minimizeDiv',null,new OpenLayers.Size(18,18),img,'absolute');this.minimizeDiv.style.display='none';this.minimizeDiv.className=this.displayClass+'MinimizeButton';OpenLayers.Event.observe(this.minimizeDiv,'click',OpenLayers.Function.bindAsEventListener(this.minimizeControl,this));this.div.appendChild(this.minimizeDiv);var eventsToStop=['dblclick','mousedown'];for(var i=0;i=this.size.h-this.hComp)||(rectPxBounds.right>=this.size.w-this.wComp)){this.updateMapToRect();}else{return;}} -document.onselectstart=null;this.rectDragStart=null;}},rectMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.rectDragStart=evt.xy.clone();this.performedRectDrag=false;OpenLayers.Event.stop(evt);},rectMouseMove:function(evt){if(this.rectDragStart!=null){var deltaX=this.rectDragStart.x-evt.xy.x;var deltaY=this.rectDragStart.y-evt.xy.y;var rectPxBounds=this.getRectPxBounds();var rectTop=rectPxBounds.top;var rectLeft=rectPxBounds.left;var rectHeight=Math.abs(rectPxBounds.getHeight());var rectWidth=rectPxBounds.getWidth();var newTop=Math.max(0,(rectTop-deltaY));newTop=Math.min(newTop,this.ovmap.size.h-this.hComp-rectHeight);var newLeft=Math.max(0,(rectLeft-deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-this.wComp-rectWidth);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+rectHeight,newLeft+rectWidth,newTop));this.rectDragStart=evt.xy.clone();this.performedRectDrag=true;OpenLayers.Event.stop(evt);}},rectMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.performedRectDrag){this.updateMapToRect();OpenLayers.Event.stop(evt);} -document.onselectstart=null;this.rectDragStart=null;},rectDblClick:function(evt){this.performedRectDrag=false;OpenLayers.Event.stop(evt);this.updateOverview();},mapDivClick:function(evt){var pxBounds=this.getRectPxBounds();var pxCenter=pxBounds.getCenterPixel();var deltaX=evt.xy.x-pxCenter.x;var deltaY=evt.xy.y-pxCenter.y;var top=pxBounds.top;var left=pxBounds.left;var height=Math.abs(pxBounds.getHeight());var width=pxBounds.getWidth();var newTop=Math.max(0,(top+deltaY));newTop=Math.min(newTop,this.ovmap.size.h-height);var newLeft=Math.max(0,(left+deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-width);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+height,newLeft+width,newTop));this.updateMapToRect();OpenLayers.Event.stop(evt);},maximizeControl:function(e){this.element.style.display='';this.showToggle(false);if(e!=null){OpenLayers.Event.stop(e);}},minimizeControl:function(e){this.element.style.display='none';this.showToggle(true);if(e!=null){OpenLayers.Event.stop(e);}},showToggle:function(minimize){this.maximizeDiv.style.display=minimize?'':'none';this.minimizeDiv.style.display=minimize?'none':'';},update:function(){if(this.ovmap==null){this.createMap();} -if(!this.isSuitableOverview()){this.updateOverview();} -this.updateRectToMap();},isSuitableOverview:function(){var mapExtent=this.map.getExtent();var maxExtent=this.map.maxExtent;var testExtent=new OpenLayers.Bounds(Math.max(mapExtent.left,maxExtent.left),Math.max(mapExtent.bottom,maxExtent.bottom),Math.min(mapExtent.right,maxExtent.right),Math.min(mapExtent.top,maxExtent.top));var resRatio=this.ovmap.getResolution()/this.map.getResolution();return((resRatio>this.minRatio)&&(resRatio<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(testExtent)));},updateOverview:function(){var mapRes=this.map.getResolution();var targetRes=this.ovmap.getResolution();var resRatio=targetRes/mapRes;if(resRatio>this.maxRatio){targetRes=this.minRatio*mapRes;}else if(resRatio<=this.minRatio){targetRes=this.maxRatio*mapRes;} -this.ovmap.setCenter(this.map.center,this.ovmap.getZoomForResolution(targetRes));this.updateRectToMap();},createMap:function(){var options=OpenLayers.Util.extend({controls:[],maxResolution:'auto'},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv,options);this.ovmap.addLayers(this.layers);this.ovmap.zoomToMaxExtent();this.wComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-left-width'))+ -parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-right-width'));this.wComp=(this.wComp)?this.wComp:2;this.hComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-top-width'))+ -parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-bottom-width'));this.hComp=(this.hComp)?this.hComp:2;},updateRectToMap:function(){if(this.map.units!='degrees'){if(this.ovmap.getProjection()&&(this.map.getProjection()!=this.ovmap.getProjection())){alert('The overview map only works when it is in the same projection as the main map');}} -var pxBounds=this.getRectBoundsFromMapBounds(this.map.getExtent());if(pxBounds){this.setRectPxBounds(pxBounds);}},updateMapToRect:function(){var pxBounds=this.getRectPxBounds();var lonLatBounds=this.getMapBoundsFromRectBounds(pxBounds);this.map.setCenter(lonLatBounds.getCenterLonLat(),this.map.zoom);},getRectPxBounds:function(){var top=parseInt(this.extentRectangle.style.top);var left=parseInt(this.extentRectangle.style.left);var height=parseInt(this.extentRectangle.style.height);var width=parseInt(this.extentRectangle.style.width);return new OpenLayers.Bounds(left,top+height,left+width,top);},setRectPxBounds:function(pxBounds){var top=Math.max(pxBounds.top,0);var left=Math.max(pxBounds.left,0);var bottom=Math.min(pxBounds.top+Math.abs(pxBounds.getHeight()),this.ovmap.size.h-this.hComp);var right=Math.min(pxBounds.left+pxBounds.getWidth(),this.ovmap.size.w-this.wComp);this.extentRectangle.style.top=parseInt(top)+'px';this.extentRectangle.style.left=parseInt(left)+'px';this.extentRectangle.style.height=parseInt(Math.max(bottom-top,0))+'px';this.extentRectangle.style.width=parseInt(Math.max(right-left,0))+'px';},getRectBoundsFromMapBounds:function(lonLatBounds){var leftBottomLonLat=new OpenLayers.LonLat(lonLatBounds.left,lonLatBounds.bottom);var rightTopLonLat=new OpenLayers.LonLat(lonLatBounds.right,lonLatBounds.top);var leftBottomPx=this.getOverviewPxFromLonLat(leftBottomLonLat);var rightTopPx=this.getOverviewPxFromLonLat(rightTopLonLat);var bounds=null;if(leftBottomPx&&rightTopPx){bounds=new OpenLayers.Bounds(leftBottomPx.x,leftBottomPx.y,rightTopPx.x,rightTopPx.y);} -return bounds;},getMapBoundsFromRectBounds:function(pxBounds){var leftBottomPx=new OpenLayers.Pixel(pxBounds.left,pxBounds.bottom);var rightTopPx=new OpenLayers.Pixel(pxBounds.right,pxBounds.top);var leftBottomLonLat=this.getLonLatFromOverviewPx(leftBottomPx);var rightTopLonLat=this.getLonLatFromOverviewPx(rightTopPx);return new OpenLayers.Bounds(leftBottomLonLat.lon,leftBottomLonLat.lat,rightTopLonLat.lon,rightTopLonLat.lat);},getLonLatFromOverviewPx:function(overviewMapPx){var size=this.ovmap.size;var res=this.ovmap.getResolution();var center=this.ovmap.getExtent().getCenterLonLat();var delta_x=overviewMapPx.x-(size.w/2);var delta_y=overviewMapPx.y-(size.h/2);return new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);},getOverviewPxFromLonLat:function(lonlat){var res=this.ovmap.getResolution();var extent=this.ovmap.getExtent();var px=null;if(extent){px=new OpenLayers.Pixel(Math.round(1/res*(lonlat.lon-extent.left)),Math.round(1/res*(extent.top-lonlat.lat)));} -return px;},CLASS_NAME:'OpenLayers.Control.OverviewMap'});OpenLayers.Control.PanZoomBar=OpenLayers.Class(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoomBarDiv:null,divEvents:null,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments);},destroy:function(){this.div.removeChild(this.slider);this.slider=null;this.sliderEvents.destroy();this.sliderEvents=null;this.div.removeChild(this.zoombarDiv);this.zoomBarDiv=null;this.divEvents.destroy();this.divEvents=null;this.map.events.unregister("zoomend",this,this.moveZoomBar);this.map.events.unregister("changebaselayer",this,this.redraw) -OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw);},redraw:function(){if(this.div!=null){this.div.innerHTML="";} -this.draw();},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position.clone();this.buttons=[];var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.y+sz.h;this._addButton("panleft","west-mini.png",px,sz);this._addButton("panright","east-mini.png",px.add(sz.w,0),sz);this._addButton("pandown","south-mini.png",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);centered=this._addZoomBar(centered.add(0,sz.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",centered,sz);return this.div;},_addZoomBar:function(centered){var imgLocation=OpenLayers.Util.getImagesLocation();var id="OpenLayers_Control_PanZoomBar_Slider"+this.map.id;var zoomsToEnd=this.map.getNumZoomLevels()-1-this.map.getZoom();var slider=OpenLayers.Util.createAlphaImageDiv(id,centered.add(-1,zoomsToEnd*this.zoomStopHeight),new OpenLayers.Size(20,9),imgLocation+"slider.png","absolute");this.slider=slider;this.sliderEvents=new OpenLayers.Events(this,slider,null,true);this.sliderEvents.register("mousedown",this,this.zoomBarDown);this.sliderEvents.register("mousemove",this,this.zoomBarDrag);this.sliderEvents.register("mouseup",this,this.zoomBarUp);this.sliderEvents.register("dblclick",this,this.doubleClick);this.sliderEvents.register("click",this,this.doubleClick);sz=new OpenLayers.Size();sz.h=this.zoomStopHeight*this.map.getNumZoomLevels();sz.w=this.zoomStopWidth;var div=null -if(OpenLayers.Util.alphaHack()){var id="OpenLayers_Control_PanZoomBar"+this.map.id;div=OpenLayers.Util.createAlphaImageDiv(id,centered,new OpenLayers.Size(sz.w,this.zoomStopHeight),imgLocation+"zoombar.png","absolute",null,"crop");div.style.height=sz.h;}else{div=OpenLayers.Util.createDiv('OpenLayers_Control_PanZoomBar_Zoombar'+this.map.id,centered,sz,imgLocation+"zoombar.png");} -this.zoombarDiv=div;this.divEvents=new OpenLayers.Events(this,div,null,true);this.divEvents.register("mousedown",this,this.divClick);this.divEvents.register("mousemove",this,this.passEventToSlider);this.divEvents.register("dblclick",this,this.doubleClick);this.divEvents.register("click",this,this.doubleClick);this.div.appendChild(div);this.startTop=parseInt(div.style.top);this.div.appendChild(slider);this.map.events.register("zoomend",this,this.moveZoomBar);centered=centered.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return centered;},passEventToSlider:function(evt){this.sliderEvents.handleBrowserEvent(evt);},divClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;var y=evt.xy.y;var top=OpenLayers.Util.pagePosition(evt.object)[1];var levels=Math.floor((y-top)/this.zoomStopHeight);this.map.zoomTo((this.map.getNumZoomLevels()-1)-levels);OpenLayers.Event.stop(evt);},zoomBarDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.map.events.register("mousemove",this,this.passEventToSlider);this.map.events.register("mouseup",this,this.passEventToSlider);this.mouseDragStart=evt.xy.clone();this.zoomStart=evt.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(evt);},zoomBarDrag:function(evt){if(this.mouseDragStart!=null){var deltaY=this.mouseDragStart.y-evt.xy.y -var offsets=OpenLayers.Util.pagePosition(this.zoombarDiv);if((evt.clientY-offsets[1])>0&&(evt.clientY-offsets[1])0){pieces.push(',');} -pieces.push(this.writeNewline(),this.writeIndent(),json);}} -this.level-=1;pieces.push(this.writeNewline(),this.writeIndent(),']');return pieces.join('');},'string':function(string){var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};if(/["\\\x00-\x1f]/.test(string)){return'"'+string.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;} -c=b.charCodeAt();return'\\u00'+ -Math.floor(c/16).toString(16)+ -(c%16).toString(16);})+'"';} -return'"'+string+'"';},'number':function(number){return isFinite(number)?String(number):"null";},'boolean':function(bool){return String(bool);},'date':function(date){function format(number){return(number<10)?'0'+number:number;} -return'"'+date.getFullYear()+'-'+ -format(date.getMonth()+1)+'-'+ -format(date.getDate())+'T'+ -format(date.getHours())+':'+ -format(date.getMinutes())+':'+ -format(date.getSeconds())+'"';}},CLASS_NAME:"OpenLayers.Format.JSON"});OpenLayers.Format.XML=OpenLayers.Class(OpenLayers.Format,{xmldom:null,initialize:function(options){if(window.ActiveXObject){this.xmldom=new ActiveXObject("Microsoft.XMLDOM");} -OpenLayers.Format.prototype.initialize.apply(this,[options]);},read:function(text){var index=text.indexOf('<');if(index>0){text=text.substring(index);} -var node=OpenLayers.Util.Try(OpenLayers.Function.bind((function(){var xmldom;if(window.ActiveXObject&&!this.xmldom){xmldom=new ActiveXObject("Microsoft.XMLDOM");}else{xmldom=this.xmldom;} -xmldom.loadXML(text);return xmldom;}),this),function(){return new DOMParser().parseFromString(text,'text/xml');},function(){var req=new XMLHttpRequest();req.open("GET","data:"+"text/xml"+";charset=utf-8,"+encodeURIComponent(text),false);if(req.overrideMimeType){req.overrideMimeType("text/xml");} -req.send(null);return req.responseXML;});return node;},write:function(node){var data;if(this.xmldom){data=node.xml;}else{var serializer=new XMLSerializer();data=serializer.serializeToString(node);} -return data;},createElementNS:function(uri,name){var element;if(this.xmldom){element=this.xmldom.createNode(1,name,uri);}else{element=document.createElementNS(uri,name);} -return element;},createTextNode:function(text){var node;if(this.xmldom){node=this.xmldom.createTextNode(text);}else{node=document.createTextNode(text);} -return node;},getElementsByTagNameNS:function(node,uri,name){var elements=[];if(node.getElementsByTagNameNS){elements=node.getElementsByTagNameNS(uri,name);}else{var allNodes=node.getElementsByTagName("*");var potentialNode,fullName;for(var i=0;i=0;--i){this.layers[i].destroy(false);} -this.layers=null;} -if(this.controls!=null){for(var i=this.controls.length-1;i>=0;--i){this.controls[i].destroy();} -this.controls=null;} -if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv);} -this.viewPortDiv=null;this.events.destroy();this.events=null;},setOptions:function(options){this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.theme=OpenLayers._getScriptLocation()+'theme/default/style.css';OpenLayers.Util.extend(this,options);},getTileSize:function(){return this.tileSize;},getLayer:function(id){var foundLayer=null;for(var i=0;ithis.layers.length){idx=this.layers.length;} -if(base!=idx){this.layers.splice(base,1);this.layers.splice(idx,0,layer);for(var i=0;ithis.restrictedExtent.getWidth()){lonlat=new OpenLayers.LonLat(maxCenter.lon,lonlat.lat);}else if(extent.leftthis.restrictedExtent.right){lonlat=lonlat.add(this.restrictedExtent.right- -extent.right,0);} -if(extent.getHeight()>this.restrictedExtent.getHeight()){lonlat=new OpenLayers.LonLat(lonlat.lon,maxCenter.lat);}else if(extent.bottomthis.restrictedExtent.top){lonlat=lonlat.add(0,this.restrictedExtent.top- -extent.top);}}} -var zoomChanged=forceZoomChange||((this.isValidZoomLevel(zoom))&&(zoom!=this.getZoom()));var centerChanged=(this.isValidLonLat(lonlat))&&(!lonlat.equals(this.center));if(zoomChanged||centerChanged||!dragging){if(!dragging){this.events.triggerEvent("movestart");} -if(centerChanged){if((!zoomChanged)&&(this.center)){this.centerLayerContainer(lonlat);} -this.center=lonlat.clone();} -if((zoomChanged)||(this.layerContainerOrigin==null)){this.layerContainerOrigin=this.center.clone();this.layerContainerDiv.style.left="0px";this.layerContainerDiv.style.top="0px";} -if(zoomChanged){this.zoom=zoom;this.viewRequestID++;} -var bounds=this.getExtent();this.baseLayer.moveTo(bounds,zoomChanged,dragging);bounds=this.baseLayer.getExtent();for(var i=0;i=0)&&(zoomLevelthis.maxPixel){draw=false;} -if(y<-this.maxPixel||y>this.maxPixel){draw=false;} -if(draw){node.setAttributeNS(null,"cx",x);node.setAttributeNS(null,"cy",y);node.setAttributeNS(null,"r",radius);}else{this.root.removeChild(node);}},drawLineString:function(node,geometry){node.setAttributeNS(null,"points",this.getComponentsString(geometry.components));},drawLinearRing:function(node,geometry){node.setAttributeNS(null,"points",this.getComponentsString(geometry.components));},drawPolygon:function(node,geometry){var d="";var draw=true;for(var j=0;jthis.maxPixel){draw=false;} -if(y<-this.maxPixel||y>this.maxPixel){draw=false;} -if(draw){node.setAttributeNS(null,"x",x);node.setAttributeNS(null,"y",y);node.setAttributeNS(null,"width",geometry.width);node.setAttributeNS(null,"height",geometry.height);}else{node.setAttributeNS(null,"x","");node.setAttributeNS(null,"y","");node.setAttributeNS(null,"width",0);node.setAttributeNS(null,"height",0);}},drawCurve:function(node,geometry){var d=null;var draw=true;for(var i=0;ithis.maxPixel){return false;} -if(y<-this.maxPixel||y>this.maxPixel){return false;} -var string=x+","+y;return string;},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.VML=OpenLayers.Class(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",initialize:function(containerID){if(!this.supported()){return;} -document.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=document.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML); "+"position: relative; display: inline-block;");OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);},supported:function(){var supported=document.namespaces;return supported;},setExtent:function(extent){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var org=extent.left/resolution+" "+ -extent.top/resolution;this.root.setAttribute("coordorigin",org);var size=extent.getWidth()/resolution+" "+ --extent.getHeight()/resolution;this.root.setAttribute("coordsize",size);},setSize:function(size){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.style.width=this.size.w;this.rendererRoot.style.height=this.size.h;this.root.style.width="100%";this.root.style.height="100%";},getNodeType:function(geometry){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":nodeType="v:oval";break;case"OpenLayers.Geometry.Rectangle":nodeType="v:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="v:shape";break;default:break;} -return nodeType;},setStyle:function(node,style,options,geometry){style=style||node._style;options=options||node._options;if(node._geometryClass=="OpenLayers.Geometry.Point"){if(style.externalGraphic){var id=node.id;var _featureId=node._featureId;var _geometryClass=node._geometryClass;var _style=node._style;this.root.removeChild(node);var node=this.createNode("v:rect",id);var fill=this.createNode("v:fill",id+"_image");node.appendChild(fill);node._featureId=_featureId;node._geometryClass=_geometryClass;node._style=_style;this.root.appendChild(node);fill.src=style.externalGraphic;fill.type="frame";node.style.flip="y";if(!(style.graphicWidth&&style.graphicHeight)){fill.aspect="atmost";} -var width=style.graphicWidth||style.graphicHeight;var height=style.graphicHeight||style.graphicWidth;width=width?width:style.pointRadius*2;height=height?height:style.pointRadius*2;var resolution=this.getResolution();var xOffset=(style.graphicXOffset!=undefined)?style.graphicXOffset:-(0.5*width);var yOffset=(style.graphicYOffset!=undefined)?style.graphicYOffset:-(0.5*height);node.style.left=((geometry.x/resolution)+xOffset).toFixed();node.style.top=((geometry.y/resolution)-(yOffset+height)).toFixed();node.style.width=width;node.style.height=height;style.fillColor="none";style.strokeColor="none";}else{this.drawCircle(node,geometry,style.pointRadius);}} -var fillColor=(options.isFilled)?style.fillColor:"none";node.setAttribute("fillcolor",fillColor);var fills=node.getElementsByTagName("fill");var fill=(fills.length==0)?null:fills[0];if(!options.isFilled){if(fill){node.removeChild(fill);}}else{if(!fill){fill=this.createNode('v:fill',node.id+"_fill");node.appendChild(fill);} -if(node._geometryClass=="OpenLayers.Geometry.Point"&&style.externalGraphic&&style.graphicOpacity){fill.setAttribute("opacity",style.graphicOpacity);}else if(style.fillOpacity){fill.setAttribute("opacity",style.fillOpacity);}} -var strokeColor=(options.isStroked)?style.strokeColor:"none";node.setAttribute("strokecolor",strokeColor);node.setAttribute("strokeweight",style.strokeWidth);var strokes=node.getElementsByTagName("stroke");var stroke=(strokes.length==0)?null:strokes[0];if(!options.isStroked){if(stroke){node.removeChild(stroke);}}else{if(!stroke){stroke=this.createNode('v:stroke',node.id+"_stroke");node.appendChild(stroke);} -stroke.setAttribute("opacity",style.strokeOpacity);stroke.setAttribute("endcap",!style.strokeLinecap||style.strokeLinecap=='butt'?'flat':style.strokeLinecap);} -if(style.cursor){node.style.cursor=style.cursor;}},setNodeDimension:function(node,geometry){var bbox=geometry.getBounds();if(bbox){var resolution=this.getResolution();var scaledBox=new OpenLayers.Bounds((bbox.left/resolution).toFixed(),(bbox.bottom/resolution).toFixed(),(bbox.right/resolution).toFixed(),(bbox.top/resolution).toFixed());node.style.left=scaledBox.left;node.style.top=scaledBox.top;node.style.width=scaledBox.getWidth();node.style.height=scaledBox.getHeight();node.coordorigin=scaledBox.left+" "+scaledBox.top;node.coordsize=scaledBox.getWidth()+" "+scaledBox.getHeight();}},createNode:function(type,id){var node=document.createElement(type);if(id){node.setAttribute('id',id);} -return node;},nodeTypeCompare:function(node,type){var subType=type;var splitIndex=subType.indexOf(":");if(splitIndex!=-1){subType=subType.substr(splitIndex+1);} -var nodeName=node.nodeName;splitIndex=nodeName.indexOf(":");if(splitIndex!=-1){nodeName=nodeName.substr(splitIndex+1);} -return(subType==nodeName);},createRenderRoot:function(){var id=this.container.id+"_vmlRoot";var rendererRoot=this.nodeFactory(id,"div");return rendererRoot;},createRoot:function(){var id=this.container.id+"_root";var root=this.nodeFactory(id,"v:group");return root;},drawPoint:function(node,geometry){this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){if(!isNaN(geometry.x)&&!isNaN(geometry.y)){var resolution=this.getResolution();node.style.left=(geometry.x/resolution).toFixed()-radius;node.style.top=(geometry.y/resolution).toFixed()-radius;var diameter=radius*2;node.style.width=diameter;node.style.height=diameter;}},drawLineString:function(node,geometry){this.drawLine(node,geometry,false);},drawLinearRing:function(node,geometry){this.drawLine(node,geometry,true);},drawLine:function(node,geometry,closeLine){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="m";for(var i=0;i0){var feature=this.features.shift();feature.destroy();}},CLASS_NAME:"OpenLayers.Tile.WFS"});OpenLayers.Feature=OpenLayers.Class({layer:null,id:null,lonlat:null,data:null,marker:null,popupClass:OpenLayers.Popup.AnchoredBubble,popup:null,initialize:function(layer,lonlat,data){this.layer=layer;this.lonlat=lonlat;this.data=(data!=null)?data:{};this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){if((this.layer!=null)&&(this.layer.map!=null)){if(this.popup!=null){this.layer.map.removePopup(this.popup);}} -this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null;} -if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null;}},onScreen:function(){var onScreen=false;if((this.layer!=null)&&(this.layer.map!=null)){var screenBounds=this.layer.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);} -return onScreen;},createMarker:function(){if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);} -return this.marker;},destroyMarker:function(){this.marker.destroy();},createPopup:function(closeBox){if(this.lonlat!=null){var id=this.id+"_popup";var anchor=(this.marker)?this.marker.icon:null;this.popup=new this.popupClass(id,this.lonlat,this.data.popupSize,this.data.popupContentHTML,anchor,closeBox);if(this.data.overflow!=null){this.popup.contentDiv.style.overflow=this.data.overflow;} -this.popup.feature=this;} -return this.popup;},destroyPopup:function(){this.popup.feature=null;this.popup.destroy()},CLASS_NAME:"OpenLayers.Feature"});OpenLayers.Handler.Drag=OpenLayers.Class(OpenLayers.Handler,{started:false,dragging:false,last:null,start:null,oldOnselectstart:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);},down:function(evt){},move:function(evt){},up:function(evt){},out:function(evt){},mousedown:function(evt){var propagate=true;this.dragging=false;if(this.checkModifiers(evt)&&OpenLayers.Event.isLeftClick(evt)){this.started=true;this.start=evt.xy;this.last=evt.xy;this.map.div.style.cursor="move";this.down(evt);this.callback("down",[evt.xy]);OpenLayers.Event.stop(evt);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=function(){return false;}} -propagate=false;}else{this.started=false;this.start=null;this.last=null;} -return propagate;},mousemove:function(evt){if(this.started){if(evt.xy.x!=this.last.x||evt.xy.y!=this.last.y){this.dragging=true;this.move(evt);this.callback("move",[evt.xy]);if(!this.oldOnselectstart){this.oldOnselectstart=document.onselectstart;document.onselectstart=function(){return false;}} -this.last=evt.xy;}} -return true;},mouseup:function(evt){if(this.started){this.started=false;this.dragging=false;this.map.div.style.cursor="";this.up(evt);this.callback("up",[evt.xy]);this.callback("done",[evt.xy]);document.onselectstart=this.oldOnselectstart;} -return true;},mouseout:function(evt){if(this.started&&OpenLayers.Util.mouseLeft(evt,this.map.div)){this.started=false;this.dragging=false;this.map.div.style.cursor="";this.out(evt);this.callback("out",[]);if(document.onselectstart){document.onselectstart=this.oldOnselectstart;} -this.callback("done",[evt.xy])} -return true;},click:function(evt){return(this.start==this.last);},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragging=false;activated=true;} -return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.started=false;this.dragging=false;this.start=null;this.last=null;deactivated=true;} -return deactivated;},CLASS_NAME:"OpenLayers.Handler.Drag"});OpenLayers.Handler.Feature=OpenLayers.Class(OpenLayers.Handler,{geometryTypes:null,layerIndex:null,feature:null,initialize:function(control,layer,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.layer=layer;},click:function(evt){var selected=this.select('click',evt);return!selected;},mousedown:function(evt){var selected=this.select('down',evt);return!selected;},mousemove:function(evt){this.select('move',evt);return true;},mouseup:function(evt){var selected=this.select('up',evt);return!selected;},dblclick:function(evt){var selected=this.select('dblclick',evt);return!selected;},select:function(type,evt){var feature=this.layer.getFeatureFromEvent(evt);var selected=false;if(feature){if(this.geometryTypes==null||(OpenLayers.Util.indexOf(this.geometryTypes,feature.geometry.CLASS_NAME)>-1)){if(!this.feature){this.callback('over',[feature]);}else if(this.feature!=feature){this.callback('out',[this.feature]);this.callback('over',[feature]);} -this.feature=feature;this.callback(type,[feature]);selected=true;}else{if(this.feature&&(this.feature!=feature)){this.callback('out',[this.feature]);this.feature=null;} -selected=false;}}else{if(this.feature){this.callback('out',[this.feature]);this.feature=null;} -selected=false;} -return selected;},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.layerIndex=this.layer.div.style.zIndex;this.layer.div.style.zIndex=this.map.Z_INDEX_BASE['Popup']-1;return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){if(this.layer&&this.layer.div){this.layer.div.style.zIndex=this.layerIndex;} -return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Handler.Keyboard=OpenLayers.Class(OpenLayers.Handler,{KEY_EVENTS:["keydown","keypress","keyup"],eventListener:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.eventListener=OpenLayers.Function.bindAsEventListener(this.handleKeyEvent,this);},destroy:function(){this.deactivate();this.eventListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments);},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){for(var i=0;i=this.minResolution)&&(resolution<=this.maxResolution));} -return inRange;},setIsBaseLayer:function(isBaseLayer){if(isBaseLayer!=this.isBaseLayer){this.isBaseLayer=isBaseLayer;if(this.map!=null){this.map.events.triggerEvent("changelayer");}}},initResolutions:function(){var props=new Array('projection','units','scales','resolutions','maxScale','minScale','maxResolution','minResolution','minExtent','maxExtent','numZoomLevels','maxZoomLevel');var confProps={};for(var i=0;iminDiff){break;} -minDiff=diff;}else{if(this.resolutions[i]5||Math.abs(this.dragHandler.start.y-end.y)>5){var start=this.dragHandler.start;var top=Math.min(start.y,end.y);var bottom=Math.max(start.y,end.y);var left=Math.min(start.x,end.x);var right=Math.max(start.x,end.x);result=new OpenLayers.Bounds(left,bottom,right,top);}else{result=this.dragHandler.start.clone();} -this.removeBox();this.map.div.style.cursor="";this.callback("done",[result]);},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragHandler.activate();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.dragHandler.deactivate();return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Handler.RegularPolygon=OpenLayers.Class(OpenLayers.Handler.Drag,{sides:4,radius:null,snapAngle:null,snapToggle:'shiftKey',persist:false,angle:null,fixedRadius:false,feature:null,layer:null,origin:null,initialize:function(control,callbacks,options){this.style=OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'],{});OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.options=(options)?options:new Object();},setOptions:function(newOptions){OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);},activate:function(){var activated=false;if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var options={displayInLayerSwitcher:false};this.layer=new OpenLayers.Layer.Vector(this.CLASS_NAME,options);this.map.addLayer(this.layer);activated=true;} -return activated;},deactivate:function(){var deactivated=false;if(OpenLayers.Handler.Drag.prototype.deactivate.apply(this,arguments)){if(this.dragging){this.cancel();} -this.map.removeLayer(this.layer,false);this.layer.destroy();if(this.feature){this.feature.destroy();} -deactivated=true;} -return deactivated;},down:function(evt){this.fixedRadius=!!(this.radius);var maploc=this.map.getLonLatFromPixel(evt.xy);this.origin=new OpenLayers.Geometry.Point(maploc.lon,maploc.lat);if(!this.fixedRadius){this.radius=this.map.getResolution();} -if(this.persist){this.clear();} -this.feature=new OpenLayers.Feature.Vector();this.createGeometry();this.layer.addFeatures([this.feature]);this.layer.drawFeature(this.feature,this.style);},move:function(evt){var maploc=this.map.getLonLatFromPixel(evt.xy);var point=new OpenLayers.Geometry.Point(maploc.lon,maploc.lat);if(this.fixedRadius){this.origin=point;}else{this.calculateAngle(point,evt);this.radius=Math.max(this.map.getResolution()/2,point.distanceTo(this.origin));} -this.modifyGeometry();this.layer.drawFeature(this.feature,this.style);},up:function(evt){this.finalize();},out:function(evt){this.finalize();},createGeometry:function(){this.angle=Math.PI*((1/this.sides)-(1/2));if(this.snapAngle){this.angle+=this.snapAngle*(Math.PI/180);} -this.feature.geometry=OpenLayers.Geometry.Polygon.createRegularPolygon(this.origin,this.radius,this.sides,this.snapAngle);},modifyGeometry:function(){var angle,dx,dy,point;var ring=this.feature.geometry.components[0];if(ring.components.length!=(this.sides+1)){this.createGeometry();} -for(var i=0;i0){this.removeMarker(this.markers[0]);}}},drawMarker:function(marker){var px=this.map.getLayerPxFromLonLat(marker.lonlat);if(px==null){marker.display(false);}else{var markerImg=marker.draw(px);if(!marker.drawn){this.div.appendChild(markerImg);marker.drawn=true;}}},getDataExtent:function(){var maxExtent=null;if(this.markers&&(this.markers.length>0)){var maxExtent=new OpenLayers.Bounds();for(var i=0;i-1){this.unselect(feature);}else{this.select(feature);}}else{if(OpenLayers.Util.indexOf(this.layer.selectedFeatures,feature)>-1){this.unselect(feature);}else{if(this.layer.selectedFeatures){for(var i=0;i-1)){this.select(feature);}},outFeature:function(feature){if(!this.hover){return;} -this.unselect(feature);},select:function(feature){if(feature.originalStyle==null){feature.originalStyle=feature.style;} -this.layer.selectedFeatures.push(feature);feature.style=this.selectStyle;this.layer.drawFeature(feature);this.onSelect(feature);},unselect:function(feature){if(feature.originalStyle!=null){feature.style=feature.originalStyle;} -this.layer.drawFeature(feature);OpenLayers.Util.removeItem(this.layer.selectedFeatures,feature);this.onUnselect(feature);},setMap:function(map){this.handler.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Control.ZoomBox=OpenLayers.Class(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,draw:function(){this.handler=new OpenLayers.Handler.Box(this,{done:this.zoomBox},{keyMask:this.keyMask});},zoomBox:function(position){if(position instanceof OpenLayers.Bounds){var minXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.left,position.bottom));var maxXY=this.map.getLonLatFromPixel(new OpenLayers.Pixel(position.right,position.top));var bounds=new OpenLayers.Bounds(minXY.lon,minXY.lat,maxXY.lon,maxXY.lat);this.map.zoomToExtent(bounds);}else{this.map.setCenter(this.map.getLonLatFromPixel(position),this.map.getZoom()+1);}},CLASS_NAME:"OpenLayers.Control.ZoomBox"});OpenLayers.Format.WKT=OpenLayers.Class(OpenLayers.Format,{initialize:function(options){this.regExes={'typeStr':/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,'spaces':/\s+/,'parenComma':/\)\s*,\s*\(/,'doubleParenComma':/\)\s*\)\s*,\s*\(\s*\(/,'trimParens':/^\s*\(?(.*?)\)?\s*$/};OpenLayers.Format.prototype.initialize.apply(this,[options]);},read:function(wkt){var features,type,str;var matches=this.regExes.typeStr.exec(wkt);if(matches){type=matches[1].toLowerCase();str=matches[2];if(this.parse[type]){features=this.parse[type].apply(this,[str]);}} -return features;},write:function(features){var collection,geometry,type,data,isCollection;if(features.constructor==Array){collection=features;isCollection=true;}else{collection=[features];isCollection=false;} -var pieces=[];if(isCollection){pieces.push('GEOMETRYCOLLECTION(');} -for(var i=0;i0){pieces.push(',');} -geometry=collection[i].geometry;type=geometry.CLASS_NAME.split('.')[2].toLowerCase();if(!this.extract[type]){return null;} -data=this.extract[type].apply(this,[geometry]);pieces.push(type.toUpperCase()+'('+data+')');} -if(isCollection){pieces.push(')');} -return pieces.join('');},extract:{'point':function(point){return point.x+' '+point.y;},'multipoint':function(multipoint){var array=[];for(var i=0;i0){var location=point[0].firstChild.nodeValue.split(" ");if(location.length!=2){var location=point[0].firstChild.nodeValue.split(",");}}else if(lat.length>0&&lon.length>0){var location=[parseFloat(lat[0].firstChild.nodeValue),parseFloat(lon[0].firstChild.nodeValue)];}else{continue;} -location=new OpenLayers.LonLat(parseFloat(location[1]),parseFloat(location[0]));var title="Untitled";try{title=OpenLayers.Util.getNodes(itemlist[i],"title")[0].firstChild.nodeValue;} -catch(e){title="Untitled";} -var descr_nodes=null;try{descr_nodes=itemlist[i].getElementsByTagNameNS("*","description");} -catch(e){descr_nodes=itemlist[i].getElementsByTagName("description");} -if(descr_nodes.length==0){try{descr_nodes=itemlist[i].getElementsByTagNameNS("*","summary");} -catch(e){descr_nodes=itemlist[i].getElementsByTagName("summary");}} -var description="No description.";try{description=descr_nodes[0].firstChild.nodeValue;} -catch(e){description="No description.";} -try{var link=OpenLayers.Util.getNodes(itemlist[i],"link")[0].firstChild.nodeValue;} -catch(e){try{var link=OpenLayers.Util.getNodes(itemlist[i],"link")[0].getAttribute("href");} -catch(e){}} -data.icon=this.icon==null?OpenLayers.Marker.defaultIcon():this.icon.clone();data.popupSize=this.popupSize?this.popupSize.clone():new OpenLayers.Size(250,120);if((title!=null)&&(description!=null)){contentHTML='
[x]
';contentHTML+='
';if(link)contentHTML+='';contentHTML+=title;if(link)contentHTML+='';contentHTML+='
';contentHTML+='
';contentHTML+=description;contentHTML+='
';data['popupContentHTML']=contentHTML;} -var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();marker.events.register('click',feature,this.markerClick);this.addMarker(marker);} -this.events.triggerEvent("loadend");},markerClick:function(evt){sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0;i0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});OpenLayers.Layer.Google=OpenLayers.Class(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.00002145767211914062,0.00001072883605957031,0.00000536441802978515,0.00000268220901489257],type:null,sphericalMercator:false,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.addContainerPxFunction();if(this.sphericalMercator){OpenLayers.Util.extend(this,OpenLayers.Layer.SphericalMercator);this.initMercatorParameters();}},loadMapObject:function(){try{this.mapObject=new GMap2(this.div);var poweredBy=this.div.lastChild;this.div.removeChild(poweredBy);this.pane.appendChild(poweredBy);poweredBy.className="olLayerGooglePoweredBy gmnoprint";poweredBy.style.left="";poweredBy.style.bottom="";var termsOfUse=this.div.lastChild;this.div.removeChild(termsOfUse);this.pane.appendChild(termsOfUse);termsOfUse.className="olLayerGoogleCopyright";termsOfUse.style.right="";termsOfUse.style.bottom="";}catch(e){}},setMap:function(map){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType);}},setMapType:function(){if(this.mapObject.getCenter()!=null){this.mapObject.setMapType(this.type);this.map.events.unregister("moveend",this,this.setMapType);}},onMapResize:function(){this.mapObject.checkResize();},getOLBoundsFromMapObjectBounds:function(moBounds){var olBounds=null;if(moBounds!=null){var sw=moBounds.getSouthWest();var ne=moBounds.getNorthEast();if(this.sphericalMercator){sw=this.forwardMercator(sw.lng(),sw.lat());ne=this.forwardMercator(ne.lng(),ne.lat());}else{sw=new OpenLayers.LonLat(sw.lng(),sw.lat());ne=new OpenLayers.LonLat(ne.lng(),ne.lat());} -olBounds=new OpenLayers.Bounds(sw.lon,sw.lat,ne.lon,ne.lat);} -return olBounds;},getMapObjectBoundsFromOLBounds:function(olBounds){var moBounds=null;if(olBounds!=null){var sw=this.sphericalMercator?this.inverseMercator(olBounds.bottom,olBounds.left):new OpenLayers.LonLat(olBounds.bottom,olBounds.left);var ne=this.sphericalMercator?this.inverseMercator(olBounds.top,olBounds.right):new OpenLayers.LonLat(olBounds.top,olBounds.right);moBounds=new GLatLngBounds(new GLatLng(sw.lat,sw.lon),new GLatLng(ne.lat,ne.lon));} -return moBounds;},addContainerPxFunction:function(){if((typeof GMap2!="undefined")&&!GMap2.prototype.fromLatLngToContainerPixel){GMap2.prototype.fromLatLngToContainerPixel=function(gLatLng){var gPoint=this.fromLatLngToDivPixel(gLatLng);var div=this.getContainer().firstChild.firstChild;gPoint.x+=div.offsetLeft;gPoint.y+=div.offsetTop;return gPoint;};}},getWarningHTML:function(){var html="";html+="The Google Layer was unable to load correctly.
";html+="
";html+="To get rid of this message, select a new BaseLayer " -html+="in the layer switcher in the upper-right corner.
";html+="
";html+="Most likely, this is because the Google Maps library";html+=" script was either not included, or does not contain the";html+=" correct API key for your site.
";html+="
";html+="Developers: For help getting this working correctly, ";html+="=bounds.bottom-tilelat*this.buffer)||rowidx=0)&&(testCell=0)){tile=this.grid[testRow][testCell];} -if((tile!=null)&&(!tile.queued)){tileQueue.unshift(tile);tile.queued=true;directionsTried=0;iRow=testRow;iCell=testCell;}else{direction=(direction+1)%4;directionsTried++;}} -for(var i=0;i-this.tileSize.w*(buffer-1)){this.shiftColumn(true);}else if(tlViewPort.x<-this.tileSize.w*buffer){this.shiftColumn(false);}else if(tlViewPort.y>-this.tileSize.h*(buffer-1)){this.shiftRow(true);}else if(tlViewPort.y<-this.tileSize.h*buffer){this.shiftRow(false);}else{break;}};if(this.buffer==0){for(var r=0,rl=this.grid.length;rrows){var row=this.grid.pop();for(var i=0,l=row.length;icolumns){for(var i=0,l=this.grid.length;i'+title+'

'+description+'

';} -data['overflow']=overflow||"auto";var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();if((title!=null)&&(description!=null)){marker.events.register('click',feature,this.markerClick);} -this.addMarker(marker);}}}} -this.events.triggerEvent("loadend");},markerClick:function(evt){var sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0;i0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.Text"});OpenLayers.Layer.Vector=OpenLayers.Class(OpenLayers.Layer,{isBaseLayer:false,isFixed:false,isVector:true,features:null,selectedFeatures:null,reportError:true,style:null,renderers:['SVG','VML'],renderer:null,geometryType:null,drawn:false,initialize:function(name,options){var defaultStyle=OpenLayers.Feature.Vector.style['default'];this.style=OpenLayers.Util.extend({},defaultStyle);OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(!this.renderer||!this.renderer.supported()){this.assignRenderer();} -if(!this.renderer||!this.renderer.supported()){this.renderer=null;this.displayError();} -this.features=[];this.selectedFeatures=[];},destroy:function(){OpenLayers.Layer.prototype.destroy.apply(this,arguments);this.destroyFeatures();this.features=null;this.selectedFeatures=null;if(this.renderer){this.renderer.destroy();} -this.renderer=null;this.geometryType=null;this.drawn=null;},assignRenderer:function(){for(var i=0;i=0;i--){var feature=features[i];this.features=OpenLayers.Util.removeItem(this.features,feature);if(feature.geometry){this.renderer.eraseGeometry(feature.geometry);} -if(OpenLayers.Util.indexOf(this.selectedFeatures,feature)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,feature);}}},destroyFeatures:function(){this.selectedFeatures=[];for(var i=this.features.length-1;i>=0;i--){this.features[i].destroy();}},drawFeature:function(feature,style){if(style==null){if(feature.style){style=feature.style;}else{style=this.style;}} -this.renderer.drawFeature(feature,style);},eraseFeatures:function(features){this.renderer.eraseFeatures(features);},getFeatureFromEvent:function(evt){if(!this.renderer){OpenLayers.Console.error("getFeatureFromEvent called on layer with no renderer. This usually means you destroyed a layer, but not some handler which is associated with it.");return null;} -var featureId=this.renderer.getFeatureIdFromEvent(evt);return this.getFeatureById(featureId);},getFeatureById:function(featureId){var feature=null;for(var i=0;i0){this.layer.removeFeatures(this.vertices);this.vertices=[];} -if(this.virtualVertices.length>0){this.layer.removeFeatures(this.virtualVertices);this.virtualVertices=[];} -if(this.feature&&this.feature.geometry.CLASS_NAME!="OpenLayers.Geometry.Point"){this.collectVertices(this.feature.geometry);this.layer.addFeatures(this.vertices);this.layer.addFeatures(this.virtualVertices);}},handleKeypress:function(code){if(this.feature&&OpenLayers.Util.indexOf(this.deleteCodes,code)!=-1){var vertex=this.dragControl.feature;if(vertex&&OpenLayers.Util.indexOf(this.vertices,vertex)!=-1){vertex.geometry.parent.removeComponent(vertex.geometry);this.layer.drawFeature(this.feature,this.selectControl.selectStyle);this.resetVertices();this.onModification(this.feature);}}},collectVertices:function(){this.vertices=[];this.virtualVirtices=[];var control=this;function collectComponentVertices(geometry){var i,vertex,component;if(geometry.CLASS_NAME=="OpenLayers.Geometry.Point"){vertex=new OpenLayers.Feature.Vector(geometry);control.vertices.push(vertex);}else{for(i=0;i=bounds.bottom-tilelat*this.buffer||rowidx0){OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);} -if(options==null||options.isBaseLayer==null){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true));}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,this.options);} -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},getURL:function(bounds){bounds=this.adjustBounds(bounds);var extent=[bounds.left,bounds.bottom,bounds.right,bounds.top];var imageSize=this.getImageSize();var url=this.getFullRequestString({mapext:extent,imgext:extent,map_size:[imageSize.w,imageSize.h],imgx:imageSize.w/2,imgy:imageSize.h/2,imgxy:[imageSize.w,imageSize.h]});return url;},getFullRequestString:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;if(typeof url=="object"){url=url[Math.floor(Math.random()*url.length)];} -var requestString=url;var allParams=OpenLayers.Util.extend({},this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getParameters(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}} -var paramsString=OpenLayers.Util.getParameterString(allParams);paramsString=paramsString.replace(/,/g,"+");if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}} -return requestString;},CLASS_NAME:"OpenLayers.Layer.MapServer"});OpenLayers.Layer.TMS=OpenLayers.Class(OpenLayers.Layer.Grid,{serviceVersion:"1.0.0",isBaseLayer:true,tileOrigin:null,initialize:function(name,url,options){var newArguments=[];newArguments.push(name,url,{},options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TMS(this.name,this.url,this.options);} -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){bounds=this.adjustBounds(bounds);var res=this.map.getResolution();var x=Math.round((bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w));var y=Math.round((bounds.bottom-this.tileOrigin.lat)/(res*this.tileSize.h));var z=this.map.getZoom();var path=this.serviceVersion+"/"+this.layername+"/"+z+"/"+x+"/"+y+"."+this.type;var url=this.url;if(url instanceof Array){url=this.selectUrl(path,url);} -return url+path;},addTile:function(bounds,position){return new OpenLayers.Tile.Image(this,position,bounds,null,this.tileSize);},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.TMS"});OpenLayers.Layer.TileCache=OpenLayers.Class(OpenLayers.Layer.Grid,{isBaseLayer:true,tileOrigin:null,format:'image/png',initialize:function(name,url,layername,options){options=OpenLayers.Util.extend({maxResolution:180/256},options);this.layername=layername;OpenLayers.Layer.Grid.prototype.initialize.apply(this,[name,url,{},options]);this.extension=this.format.split('/')[1].toLowerCase();this.extension=(this.extension=='jpeg')?'jpg':this.extension;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TileCache(this.name,this.url,this.options);} -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var res=this.map.getResolution();var bbox=this.maxExtent;var size=this.tileSize;var tileX=Math.floor((bounds.left-bbox.left)/(res*size.w));var tileY=Math.floor((bounds.bottom-bbox.bottom)/(res*size.h));var tileZ=this.map.zoom;function zeroPad(number,length){number=String(number);var zeros=[];for(var i=0;i0){this.setBounds(this.components[0].getBounds());for(var i=1;i-1)){if(index!=null&&(index0)){area+=Math.abs(this.components[0].getArea());for(var i=1;i1)){for(var i=1;i2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Format.GML=OpenLayers.Class(OpenLayers.Format.XML,{featureNS:"http://mapserver.gis.umn.edu/mapserver",featurePrefix:"feature",featureName:"featureMember",layerName:"features",geometryName:"geometry",collectionName:"FeatureCollection",gmlns:"http://www.opengis.net/gml",extractAttributes:true,initialize:function(options){this.regExes={trimSpace:(/^\s*|\s*$/g),removeSpace:(/\s*/g),splitSpace:(/\s+/),trimComma:(/\s*,\s*/g)};OpenLayers.Format.XML.prototype.initialize.apply(this,[options]);},read:function(data){if(typeof data=="string"){data=OpenLayers.Format.XML.prototype.read.apply(this,[data]);} -var featureNodes=this.getElementsByTagNameNS(data.documentElement,this.gmlns,this.featureName);var features=[];for(var i=0;i0){var parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);}else{OpenLayers.Console.error("Unsupported geometry type: "+ -type);} -break;}} -var attributes;if(this.extractAttributes){attributes=this.parseAttributes(node);} -var feature=new OpenLayers.Feature.Vector(geometry,attributes);var childNode=node.firstChild;var fid;while(childNode){if(childNode.nodeType==1){fid=childNode.getAttribute("fid")||childNode.getAttribute("id");if(fid){break;}} -childNode=childNode.nextSibling;} -feature.fid=fid;return feature;},parseGeometry:{point:function(node){var nodeList;var coords=[];var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"pos");if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);} -if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coordinates");if(nodeList.length>0){coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");}} -if(coords.length==0){nodeList=this.getElementsByTagNameNS(node,this.gmlns,"coord");if(nodeList.length>0){var xList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"X");var yList=this.getElementsByTagNameNS(nodeList[0],this.gmlns,"Y");if(xList.length>0&&yList.length>0){coords=[xList[0].firstChild.nodeValue,yList[0].firstChild.nodeValue];}}} -if(coords.length==2){coords[2]=null;} -return new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);},multipoint:function(node){var nodeList=this.getElementsByTagNameNS(node,this.gmlns,"Point");var components=[];if(nodeList.length>0){var point;for(var i=0;i0){coordString=this.concatChildValues(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coords=coordString.split(this.regExes.splitSpace);var dim=parseInt(nodeList[0].getAttribute("dimension"));var j,x,y,z;for(var i=0;i0){coordString=this.concatChildValues(nodeList[0]);coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);for(var i=0;i0){var line;for(var i=0;i0){var ring;for(var i=0;i0){var polygon;for(var i=0;i0||(lat.length>0&&lon.length>0)){if(point.length>0){var location=OpenLayers.String.trim(point[0].firstChild.nodeValue).split(/\s+/);if(location.length!=2){var location=OpenLayers.String.trim(point[0].firstChild.nodeValue).split(/\s*,\s*/);}}else{var location=[parseFloat(lat[0].firstChild.nodeValue),parseFloat(lon[0].firstChild.nodeValue)];} -var geometry=new OpenLayers.Geometry.Point(parseFloat(location[1]),parseFloat(location[0]));}else if(line.length>0){var coords=OpenLayers.String.trim(line[0].firstChild.nodeValue).split(/\s+/);var components=[];for(var i=0;i0){var coords=OpenLayers.String.trim(polygon[0].firstChild.nodeValue).split(/\s+/);var components=[];for(var i=0;i0){var parser=this.parseGeometry[type.toLowerCase()];if(parser){geometry=parser.apply(this,[nodeList[0]]);}else{OpenLayers.Console.error("Unsupported geometry type: "+ -type);} -break;}} -var attributes;if(this.extractAttributes){attributes=this.parseAttributes(node);} -var feature=new OpenLayers.Feature.Vector(geometry,attributes);var fid=node.getAttribute("id");if(fid!=null){feature.fid=fid;} -return feature;},parseGeometry:{point:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var coords=[];if(nodeList.length>0){var coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.removeSpace,"");coords=coordString.split(",");} -var point=null;if(coords.length>1){if(coords.length==2){coords[2]=null;} -point=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad coordinate string: "+coordString;} -return point;},linestring:function(node,ring){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"coordinates");var line=null;if(nodeList.length>0){var coordString=nodeList[0].firstChild.nodeValue;coordString=coordString.replace(this.regExes.trimSpace,"");coordString=coordString.replace(this.regExes.trimComma,",");var pointList=coordString.split(this.regExes.splitSpace);var numPoints=pointList.length;var points=new Array(numPoints);var coords,numCoords;for(var i=0;i1){if(coords.length==2){coords[2]=null;} -points[i]=new OpenLayers.Geometry.Point(coords[0],coords[1],coords[2]);}else{throw"Bad LineString point coordinates: "+ -pointList[i];}} -if(numPoints){if(ring){line=new OpenLayers.Geometry.LinearRing(points);}else{line=new OpenLayers.Geometry.LineString(points);}}else{throw"Bad LineString coordinates: "+coordString;}} -return line;},polygon:function(node){var nodeList=this.getElementsByTagNameNS(node,this.internalns,"LinearRing");var numRings=nodeList.length;var components=new Array(numRings);if(numRings>0){var ring;for(var i=0;i4){this.components.pop();OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint]);}},move:function(x,y){for(var i=0;i2)){var sum=0.0;for(var i=0;i - - - - - - - - image/svg+xml - - - - - - - - - - - - − - - - - diff --git a/pacotes/openlayers/art/layer-switcher-maximize.svg b/pacotes/openlayers/art/layer-switcher-maximize.svg deleted file mode 100644 index 6b9f0d3..0000000 --- a/pacotes/openlayers/art/layer-switcher-maximize.svg +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - - + - - - - diff --git a/pacotes/openlayers/art/layer-switcher-minimize.svg b/pacotes/openlayers/art/layer-switcher-minimize.svg deleted file mode 100644 index 70fcb8c..0000000 --- a/pacotes/openlayers/art/layer-switcher-minimize.svg +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - diff --git a/pacotes/openlayers/art/marker.svg b/pacotes/openlayers/art/marker.svg deleted file mode 100644 index b35c293..0000000 --- a/pacotes/openlayers/art/marker.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - -]> - - - - - - - - - - - - - - - - - diff --git a/pacotes/openlayers/art/measuring-stick-off.svg b/pacotes/openlayers/art/measuring-stick-off.svg deleted file mode 100644 index 2e47a2f..0000000 --- a/pacotes/openlayers/art/measuring-stick-off.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - diff --git a/pacotes/openlayers/art/measuring-stick-on.svg b/pacotes/openlayers/art/measuring-stick-on.svg deleted file mode 100644 index ca0c18c..0000000 --- a/pacotes/openlayers/art/measuring-stick-on.svg +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - diff --git a/pacotes/openlayers/art/panning-hand-off.svg b/pacotes/openlayers/art/panning-hand-off.svg deleted file mode 100644 index bf2e40b..0000000 --- a/pacotes/openlayers/art/panning-hand-off.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - diff --git a/pacotes/openlayers/art/panning-hand-on.svg b/pacotes/openlayers/art/panning-hand-on.svg deleted file mode 100644 index 139ce97..0000000 --- a/pacotes/openlayers/art/panning-hand-on.svg +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - -]> - - - - - - - - - - - - - - - diff --git a/pacotes/openlayers/art/slider.svg b/pacotes/openlayers/art/slider.svg deleted file mode 100644 index 9fa435d..0000000 --- a/pacotes/openlayers/art/slider.svg +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/pacotes/openlayers/art/zoom-world.svg b/pacotes/openlayers/art/zoom-world.svg deleted file mode 100644 index 749e7c7..0000000 --- a/pacotes/openlayers/art/zoom-world.svg +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pacotes/openlayers/art/zoombar.svg b/pacotes/openlayers/art/zoombar.svg deleted file mode 100644 index a88ff36..0000000 --- a/pacotes/openlayers/art/zoombar.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - diff --git a/pacotes/openlayers/build/OpenLayers.js b/pacotes/openlayers/build/OpenLayers.js deleted file mode 100644 index b4c70b2..0000000 --- a/pacotes/openlayers/build/OpenLayers.js +++ /dev/null @@ -1,842 +0,0 @@ -/* - - OpenLayers.js -- OpenLayers Map Viewer Library - - Copyright 2005-2006 MetaCarta, Inc., released under the BSD license. - Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt - for the full text of the license. - - Includes compressed code under the following licenses: - - (For uncompressed versions of the code used please see the - OpenLayers SVN repository: ) - -*/ - -/* Contains portions of Prototype.js: - * - * Prototype JavaScript framework, version 1.4.0 - * (c) 2005 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -/** -* -* Contains portions of Rico -* -* Copyright 2005 Sabre Airline Solutions -* -* 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 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -* implied. See the License for the specific language governing -* permissions and limitations under the License. -* -**/ - -_OPENLAYERS_SFL_=true;OpenLayers=new Object();OpenLayers._scriptName=(typeof(_OPENLAYERS_SFL_)=="undefined"?"lib/OpenLayers.js":"OpenLayers.js");OpenLayers._getScriptLocation=function(){var scriptLocation="";var SCRIPT_NAME=OpenLayers._scriptName;var scripts=document.getElementsByTagName('script');for(var i=0;i-1)&&(index+SCRIPT_NAME.length==src.length)){scriptLocation=src.slice(0,-SCRIPT_NAME.length);break;}}} -return scriptLocation;} -if(typeof(_OPENLAYERS_SFL_)=="undefined"){(function(){var jsfiles=new Array("OpenLayers/BaseTypes.js","OpenLayers/Util.js","Rico/Corner.js","Rico/Color.js","OpenLayers/Ajax.js","OpenLayers/Events.js","OpenLayers/Map.js","OpenLayers/Layer.js","OpenLayers/Icon.js","OpenLayers/Marker.js","OpenLayers/Marker/Box.js","OpenLayers/Popup.js","OpenLayers/Tile.js","OpenLayers/Feature.js","OpenLayers/Feature/Vector.js","OpenLayers/Feature/WFS.js","OpenLayers/Tile/Image.js","OpenLayers/Tile/WFS.js","OpenLayers/Layer/Image.js","OpenLayers/Layer/EventPane.js","OpenLayers/Layer/FixedZoomLevels.js","OpenLayers/Layer/Google.js","OpenLayers/Layer/VirtualEarth.js","OpenLayers/Layer/Yahoo.js","OpenLayers/Layer/HTTPRequest.js","OpenLayers/Layer/Grid.js","OpenLayers/Layer/MapServer.js","OpenLayers/Layer/MapServer/Untiled.js","OpenLayers/Layer/KaMap.js","OpenLayers/Layer/MultiMap.js","OpenLayers/Layer/Markers.js","OpenLayers/Layer/Text.js","OpenLayers/Layer/WorldWind.js","OpenLayers/Layer/WMS.js","OpenLayers/Layer/WMS/Untiled.js","OpenLayers/Layer/GeoRSS.js","OpenLayers/Layer/Boxes.js","OpenLayers/Layer/Canvas.js","OpenLayers/Layer/TMS.js","OpenLayers/Popup/Anchored.js","OpenLayers/Popup/AnchoredBubble.js","OpenLayers/Handler.js","OpenLayers/Handler/Point.js","OpenLayers/Handler/Path.js","OpenLayers/Handler/Polygon.js","OpenLayers/Handler/Feature.js","OpenLayers/Handler/Drag.js","OpenLayers/Handler/Box.js","OpenLayers/Handler/MouseWheel.js","OpenLayers/Handler/Keyboard.js","OpenLayers/Control.js","OpenLayers/Control/ZoomBox.js","OpenLayers/Control/ZoomToMaxExtent.js","OpenLayers/Control/DragPan.js","OpenLayers/Control/Navigation.js","OpenLayers/Control/MouseDefaults.js","OpenLayers/Control/MousePosition.js","OpenLayers/Control/OverviewMap.js","OpenLayers/Control/KeyboardDefaults.js","OpenLayers/Control/PanZoom.js","OpenLayers/Control/PanZoomBar.js","OpenLayers/Control/ArgParser.js","OpenLayers/Control/Permalink.js","OpenLayers/Control/Scale.js","OpenLayers/Control/LayerSwitcher.js","OpenLayers/Control/DrawFeature.js","OpenLayers/Control/Panel.js","OpenLayers/Control/SelectFeature.js","OpenLayers/Geometry.js","OpenLayers/Geometry/Rectangle.js","OpenLayers/Geometry/Collection.js","OpenLayers/Geometry/Point.js","OpenLayers/Geometry/MultiPoint.js","OpenLayers/Geometry/Curve.js","OpenLayers/Geometry/LineString.js","OpenLayers/Geometry/LinearRing.js","OpenLayers/Geometry/Polygon.js","OpenLayers/Geometry/MultiLineString.js","OpenLayers/Geometry/MultiPolygon.js","OpenLayers/Geometry/Surface.js","OpenLayers/Renderer.js","OpenLayers/Renderer/Elements.js","OpenLayers/Renderer/SVG.js","OpenLayers/Renderer/VML.js","OpenLayers/Layer/Vector.js","OpenLayers/Layer/GML.js","OpenLayers/Format.js","OpenLayers/Format/GML.js","OpenLayers/Format/KML.js","OpenLayers/Format/GeoRSS.js","OpenLayers/Format/WFS.js","OpenLayers/Format/WKT.js","OpenLayers/Layer/WFS.js","OpenLayers/Control/MouseToolbar.js","OpenLayers/Control/NavToolbar.js","OpenLayers/Control/EditingToolbar.js");var allScriptTags="";var host=OpenLayers._getScriptLocation()+"lib/";for(var i=0;i";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);})();} -OpenLayers.VERSION_NUMBER="$Revision: 3198 $";OpenLayers.Class={isPrototype:function(){},create:function(){return function(){if(arguments&&arguments[0]!=OpenLayers.Class.isPrototype) -this.initialize.apply(this,arguments);}},inherit:function(){var superClass=arguments[0];var proto=new superClass(OpenLayers.Class.isPrototype);for(var i=1;ithis.right)?bounds.right:this.right;this.top=(bounds.top>this.top)?bounds.top:this.top;}}},containsLonLat:function(ll,inclusive){return this.contains(ll.lon,ll.lat,inclusive);},containsPixel:function(px,inclusive){return this.contains(px.x,px.y,inclusive);},contains:function(x,y,inclusive){if(inclusive==null){inclusive=true;} -var contains=false;if(inclusive){contains=((x>=this.left)&&(x<=this.right)&&(y>=this.bottom)&&(y<=this.top));}else{contains=((x>this.left)&&(xthis.bottom)&&(ythis.bottom)&&(bounds.bottombounds.bottom)&&(this.bottomthis.bottom)&&(bounds.topbounds.bottom)&&(this.topthis.left)&&(bounds.rightbounds.left)&&(this.rightthis.left)&&(bounds.leftbounds.left)&&(this.left=this.left)&&(bounds.left<=this.right);inTop=(bounds.top>=this.bottom)&&(bounds.top<=this.top);inRight=(bounds.right>=this.left)&&(bounds.right<=this.right);inBottom=(bounds.bottom>=this.bottom)&&(bounds.bottom<=this.top);}else{inLeft=(bounds.left>this.left)&&(bounds.leftthis.bottom)&&(bounds.topthis.left)&&(bounds.rightthis.bottom)&&(bounds.bottom0)?this.toString():0;if(sig=5.5)&&(version<7));} -OpenLayers.Util.modifyAlphaImageDiv=function(div,id,px,sz,imgURL,position,border,sizing,opacity){OpenLayers.Util.modifyDOMElement(div,id,px,sz);var img=div.childNodes[0];if(imgURL){img.src=imgURL;} -OpenLayers.Util.modifyDOMElement(img,div.id+"_innerImage",null,sz,"relative",border);if(opacity){div.style.opacity=opacity;div.style.filter='alpha(opacity='+(opacity*100)+')';} -if(OpenLayers.Util.alphaHack()){div.style.display="inline-block";if(sizing==null){sizing="scale";} -div.style.filter="progid:DXImageTransform.Microsoft"+".AlphaImageLoader(src='"+img.src+"', "+"sizingMethod='"+sizing+"')";if(div.style.opacity){div.style.filter+=" alpha(opacity="+div.style.opacity*100+")";} -img.style.filter="progid:DXImageTransform.Microsoft"+".Alpha(opacity=0)";}};OpenLayers.Util.createAlphaImageDiv=function(id,px,sz,imgURL,position,border,sizing,opacity,delayDisplay){var div=OpenLayers.Util.createDiv();var img=OpenLayers.Util.createImage(null,null,null,null,null,null,null,false);div.appendChild(img);if(delayDisplay){img.style.display="none";OpenLayers.Event.observe(img,"load",OpenLayers.Util.onImageLoad.bindAsEventListener(div));OpenLayers.Event.observe(img,"error",OpenLayers.Util.onImageLoadError.bindAsEventListener(div));} -OpenLayers.Util.modifyAlphaImageDiv(div,id,px,sz,imgURL,position,border,sizing,opacity);return div;};OpenLayers.Util.upperCaseObject=function(object){var uObject=new Object();for(var key in object){uObject[key.toUpperCase()]=object[key];} -return uObject;};OpenLayers.Util.applyDefaults=function(to,from){for(var key in from){if(to[key]==null){to[key]=from[key];}}};OpenLayers.Util.getParameterString=function(params){paramsArray=new Array();for(var key in params){var value=params[key];if((value!=null)&&(typeof value!='function')){var encodedValue;if(typeof value=='object'&&value.constructor==Array){var encodedItemArray=new Array();for(var itemIndex=0;itemIndex0)) -{if(!index){index=0;} -if(result[index].childNodes.length>1){return result.childNodes[1].nodeValue;} -else if(result[index].childNodes.length==1){return result[index].firstChild.nodeValue;}}else{return"";}};OpenLayers.Util.getXmlNodeValue=function(node){var val=null;OpenLayers.Util.Try(function(){val=node.text;if(!val) -val=node.textContent;if(!val) -val=node.firstChild.nodeValue;},function(){val=node.textContent;});return val;};OpenLayers.Util.mouseLeft=function(evt,div){var target=(evt.relatedTarget)?evt.relatedTarget:evt.toElement;while(target!=div&&target!=null){target=target.parentNode;} -return(target!=div);};OpenLayers.Util.rad=function(x){return x*Math.PI/180;};OpenLayers.Util.distVincenty=function(p1,p2){var a=6378137,b=6356752.3142,f=1/298.257223563;var L=OpenLayers.Util.rad(p2.lon-p1.lon);var U1=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p1.lat)));var U2=Math.atan((1-f)*Math.tan(OpenLayers.Util.rad(p2.lat)));var sinU1=Math.sin(U1),cosU1=Math.cos(U1);var sinU2=Math.sin(U2),cosU2=Math.cos(U2);var lambda=L,lambdaP=2*Math.PI;var iterLimit=20;while(Math.abs(lambda-lambdaP)>1e-12&&--iterLimit>0){var sinLambda=Math.sin(lambda),cosLambda=Math.cos(lambda);var sinSigma=Math.sqrt((cosU2*sinLambda)*(cosU2*sinLambda)+ -(cosU1*sinU2-sinU1*cosU2*cosLambda)*(cosU1*sinU2-sinU1*cosU2*cosLambda));if(sinSigma==0)return 0;var cosSigma=sinU1*sinU2+cosU1*cosU2*cosLambda;var sigma=Math.atan2(sinSigma,cosSigma);var alpha=Math.asin(cosU1*cosU2*sinLambda/sinSigma);var cosSqAlpha=Math.cos(alpha)*Math.cos(alpha);var cos2SigmaM=cosSigma-2*sinU1*sinU2/cosSqAlpha;var C=f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha));lambdaP=lambda;lambda=L+(1-C)*f*Math.sin(alpha)*(sigma+C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)));} -if(iterLimit==0)return NaN -var uSq=cosSqAlpha*(a*a-b*b)/(b*b);var A=1+uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq)));var B=uSq/1024*(256+uSq*(-128+uSq*(74-47*uSq)));var deltaSigma=B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)- -B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM)));var s=b*A*(sigma-deltaSigma);var d=s.toFixed(3)/1000;return d;};OpenLayers.Util.getArgs=function(url){if(url==null){url=window.location.href;} -var query=(url.indexOf('?')!=-1)?url.substring(url.indexOf('?')+1):'';var args=new Object();pairs=query.split(/[&;]/);for(var i=0;i1.0)?(1.0/scale):scale;return normScale;};OpenLayers.Util.getResolutionFromScale=function(scale,units){if(units==null){units="degrees";} -var normScale=OpenLayers.Util.normalizeScale(scale);var resolution=1/(normScale*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH);return resolution;};OpenLayers.Util.getScaleFromResolution=function(resolution,units){if(units==null){units="degrees";} -var scale=resolution*OpenLayers.INCHES_PER_UNIT[units]*OpenLayers.DOTS_PER_INCH;return scale;};OpenLayers.Util.safeStopPropagation=function(evt){OpenLayers.Event.stop(evt,true);};OpenLayers.Util.pagePosition=function(forElement){var valueT=0,valueL=0;var element=forElement;do{valueT+=element.offsetTop||0;valueL+=element.offsetLeft||0;if(element.offsetParent==document.body) -if(OpenLayers.Element.getStyle(element,'position')=='absolute')break;}while(element=element.offsetParent);element=forElement;do{valueT-=element.scrollTop||0;valueL-=element.scrollLeft||0;}while(element=element.parentNode);return[valueL,valueT];};OpenLayers.Util.isEquivalentUrl=function(url1,url2,options){options=options||new Object();OpenLayers.Util.applyDefaults(options,{ignoreCase:true,ignorePort80:true,ignoreHash:true});urlObj1=OpenLayers.Util.createUrlObject(url1,options);urlObj2=OpenLayers.Util.createUrlObject(url2,options);for(var key in urlObj1){if(options.test){alert(key+"\n1:"+urlObj1[key]+"\n2:"+urlObj2[key]);} -var val1=urlObj1[key];var val2=urlObj2[key];switch(key){case"args":break;case"host":case"port":case"protocol":if((val1=="")||(val2=="")){break;} -default:if((key!="args")&&(urlObj1[key]!=urlObj2[key])){return false;} -break;}} -for(var key in urlObj1.args){if(urlObj1.args[key]!=urlObj2.args[key]){return false;} -delete urlObj2.args[key];} -for(var key in urlObj2.args){return false;} -return true;};OpenLayers.Util.createUrlObject=function(url,options){options=options||new Object();var urlObject=new Object();if(options.ignoreCase){url=url.toLowerCase();} -var a=document.createElement('a');a.href=url;urlObject.host=a.host;var port=a.port;if(port.length<=0){var newHostLength=urlObject.host.length-(port.length);urlObject.host=urlObject.host.substring(0,newHostLength);} -urlObject.protocol=a.protocol;urlObject.port=((port=="80")&&(options.ignorePort80))?"":port;urlObject.hash=(options.ignoreHash)?"":a.hash;var queryString=a.search;if(!queryString){var qMark=url.indexOf("?");queryString=(qMark!=-1)?url.substr(qMark):"";} -urlObject.args=OpenLayers.Util.getArgs(queryString);if(((urlObject.protocol=="file:")&&(url.indexOf("file:")!=-1))||((urlObject.protocol!="file:")&&(urlObject.host!=""))){urlObject.pathname=a.pathname;var qIndex=urlObject.pathname.indexOf("?");if(qIndex!=-1){urlObject.pathname=urlObject.pathname.substring(0,qIndex);}}else{var relStr=OpenLayers.Util.removeTail(url);var backs=0;do{var index=relStr.indexOf("../");if(index==0){backs++ -relStr=relStr.substr(3);}else if(index>=0){var prevChunk=relStr.substr(0,index-1);var slash=prevChunk.indexOf("/");prevChunk=(slash!=-1)?prevChunk.substr(0,slash+1):"";var postChunk=relStr.substr(index+3);relStr=prevChunk+postChunk;}}while(index!=-1) -var windowAnchor=document.createElement("a");var windowUrl=window.location.href;if(options.ignoreCase){windowUrl=windowUrl.toLowerCase();} -windowAnchor.href=windowUrl;urlObject.protocol=windowAnchor.protocol;var splitter=(windowAnchor.pathname.indexOf("/")!=-1)?"/":"\\";var dirs=windowAnchor.pathname.split(splitter);dirs.pop();while((backs>0)&&(dirs.length>0)){dirs.pop();backs--;} -relStr=dirs.join("/")+"/"+relStr;urlObject.pathname=relStr;} -if((urlObject.protocol=="file:")||(urlObject.protocol=="")){urlObject.host="localhost";} -return urlObject;};OpenLayers.Util.removeTail=function(url){var head=null;var qMark=url.indexOf("?");var hashMark=url.indexOf("#");if(qMark==-1){head=(hashMark!=-1)?url.substr(0,hashMark):url;}else{head=(hashMark!=-1)?url.substr(0,Math.min(qMark,hashMark)):url.substr(0,qMark);} -return head;};OpenLayers.Rico=new Object();OpenLayers.Rico.Corner={round:function(e,options){e=OpenLayers.Util.getElement(e);this._setOptions(options);var color=this.options.color;if(this.options.color=="fromElement") -color=this._background(e);var bgColor=this.options.bgColor;if(this.options.bgColor=="fromParent") -bgColor=this._background(e.offsetParent);this._roundCornersImpl(e,color,bgColor);},changeColor:function(theDiv,newColor){theDiv.style.backgroundColor=newColor;var spanElements=theDiv.parentNode.getElementsByTagName("span");for(var currIdx=0;currIdx"+el.innerHTML+""},_roundTopCorners:function(el,color,bgColor){var corner=this._createCorner(bgColor);for(var i=0;i=0;i--) -corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom"));el.style.paddingBottom=0;el.appendChild(corner);},_createCorner:function(bgColor){var corner=document.createElement("div");corner.style.backgroundColor=(this._isTransparent()?"transparent":bgColor);return corner;},_createCornerSlice:function(color,bgColor,n,position){var slice=document.createElement("span");var inStyle=slice.style;inStyle.backgroundColor=color;inStyle.display="block";inStyle.height="1px";inStyle.overflow="hidden";inStyle.fontSize="1px";var borderColor=this._borderColor(color,bgColor);if(this.options.border&&n==0){inStyle.borderTopStyle="solid";inStyle.borderTopWidth="1px";inStyle.borderLeftWidth="0px";inStyle.borderRightWidth="0px";inStyle.borderBottomWidth="0px";inStyle.height="0px";inStyle.borderColor=borderColor;} -else if(borderColor){inStyle.borderColor=borderColor;inStyle.borderStyle="solid";inStyle.borderWidth="0px 1px";} -if(!this.options.compact&&(n==(this.options.numSlices-1))) -inStyle.height="2px";this._setMargin(slice,n,position);this._setBorder(slice,n,position);return slice;},_setOptions:function(options){this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false} -OpenLayers.Util.extend(this.options,options||{});this.options.numSlices=this.options.compact?2:4;if(this._isTransparent()) -this.options.blend=false;},_whichSideTop:function(){if(this._hasString(this.options.corners,"all","top")) -return"";if(this.options.corners.indexOf("tl")>=0&&this.options.corners.indexOf("tr")>=0) -return"";if(this.options.corners.indexOf("tl")>=0) -return"left";else if(this.options.corners.indexOf("tr")>=0) -return"right";return"";},_whichSideBottom:function(){if(this._hasString(this.options.corners,"all","bottom")) -return"";if(this.options.corners.indexOf("bl")>=0&&this.options.corners.indexOf("br")>=0) -return"";if(this.options.corners.indexOf("bl")>=0) -return"left";else if(this.options.corners.indexOf("br")>=0) -return"right";return"";},_borderColor:function(color,bgColor){if(color=="transparent") -return bgColor;else if(this.options.border) -return this.options.border;else if(this.options.blend) -return this._blend(bgColor,color);else -return"";},_setMargin:function(el,n,corners){var marginSize=this._marginSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.marginLeft=marginSize+"px";el.style.marginRight="0px";} -else if(whichSide=="right"){el.style.marginRight=marginSize+"px";el.style.marginLeft="0px";} -else{el.style.marginLeft=marginSize+"px";el.style.marginRight=marginSize+"px";}},_setBorder:function(el,n,corners){var borderSize=this._borderSize(n);var whichSide=corners=="top"?this._whichSideTop():this._whichSideBottom();if(whichSide=="left"){el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth="0px";} -else if(whichSide=="right"){el.style.borderRightWidth=borderSize+"px";el.style.borderLeftWidth="0px";} -else{el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";} -if(this.options.border!=false) -el.style.borderLeftWidth=borderSize+"px";el.style.borderRightWidth=borderSize+"px";},_marginSize:function(n){if(this._isTransparent()) -return 0;var marginSizes=[5,3,2,1];var blendedMarginSizes=[3,2,1,0];var compactMarginSizes=[2,1];var smBlendedMarginSizes=[1,0];if(this.options.compact&&this.options.blend) -return smBlendedMarginSizes[n];else if(this.options.compact) -return compactMarginSizes[n];else if(this.options.blend) -return blendedMarginSizes[n];else -return marginSizes[n];},_borderSize:function(n){var transparentBorderSizes=[5,3,2,1];var blendedBorderSizes=[2,1,1,1];var compactBorderSizes=[1,0];var actualBorderSizes=[0,2,0,0];if(this.options.compact&&(this.options.blend||this._isTransparent())) -return 1;else if(this.options.compact) -return compactBorderSizes[n];else if(this.options.blend) -return blendedBorderSizes[n];else if(this.options.border) -return actualBorderSizes[n];else if(this._isTransparent()) -return transparentBorderSizes[n];return 0;},_hasString:function(str){for(var i=1;i=0)return true;return false;},_blend:function(c1,c2){var cc1=OpenLayers.Rico.Color.createFromHex(c1);cc1.blend(OpenLayers.Rico.Color.createFromHex(c2));return cc1;},_background:function(el){try{return OpenLayers.Rico.Color.createColorFromBackground(el).asHex();}catch(err){return"#ffffff";}},_isTransparent:function(){return this.options.color=="transparent";},_isTopRounded:function(){return this._hasString(this.options.corners,"all","top","tl","tr");},_isBottomRounded:function(){return this._hasString(this.options.corners,"all","bottom","bl","br");},_hasSingleTextChild:function(el){return el.childNodes.length==1&&el.childNodes[0].nodeType==3;}} -OpenLayers.ProxyHost="";OpenLayers.nullHandler=function(request){alert("Unhandled request return "+request.statusText);};OpenLayers.loadURL=function(uri,params,caller,onComplete,onFailure){if(OpenLayers.ProxyHost&&uri.startsWith("http")){uri=OpenLayers.ProxyHost+escape(uri);} -var success=(onComplete)?onComplete.bind(caller):OpenLayers.nullHandler;var failure=(onFailure)?onFailure.bind(caller):OpenLayers.nullHandler;new OpenLayers.Ajax.Request(uri,{method:'get',parameters:params,onComplete:success,onFailure:failure});};OpenLayers.parseXMLString=function(text){var index=text.indexOf('<');if(index>0){text=text.substring(index);} -var ajaxResponse=OpenLayers.Util.Try(function(){var xmldom=new ActiveXObject('Microsoft.XMLDOM');xmldom.loadXML(text);return xmldom;},function(){return new DOMParser().parseFromString(text,'text/xml');},function(){var req=new XMLHttpRequest();req.open("GET","data:"+"text/xml"+";charset=utf-8,"+encodeURIComponent(text),false);if(req.overrideMimeType){req.overrideMimeType("text/xml");} -req.send(null);return req.responseXML;});return ajaxResponse;};OpenLayers.Ajax={emptyFunction:function(){},getTransport:function(){return OpenLayers.Util.Try(function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')},function(){return new XMLHttpRequest()})||false;},activeRequestCount:0};OpenLayers.Ajax.Responders={responders:[],register:function(responderToAdd){for(var i=0;i=200&&this.transport.status<300);},responseIsFailure:function(){return!this.responseIsSuccess();}} -OpenLayers.Ajax.Request=OpenLayers.Class.create();OpenLayers.Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];OpenLayers.Ajax.Request.prototype=OpenLayers.Class.inherit(OpenLayers.Ajax.Base,{initialize:function(url,options){this.transport=OpenLayers.Ajax.getTransport();this.setOptions(options);this.request(url);},request:function(url){var parameters=this.options.parameters||'';if(parameters.length>0)parameters+='&_=';try{this.url=url;if(this.options.method=='get'&¶meters.length>0) -this.url+=(this.url.match(/\?/)?'&':'?')+parameters;OpenLayers.Ajax.Responders.dispatch('onCreate',this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10);} -this.setRequestHeaders();var body=this.options.postBody?this.options.postBody:parameters;this.transport.send(this.options.method=='post'?body:null);}catch(e){this.dispatchException(e);}},setRequestHeaders:function(){var requestHeaders=['X-Requested-With','XMLHttpRequest','X-Prototype-Version','OpenLayers'];if(this.options.method=='post'&&!this.options.postBody){requestHeaders.push('Content-type','application/x-www-form-urlencoded');if(this.transport.overrideMimeType) -requestHeaders.push('Connection','close');} -if(this.options.requestHeaders) -requestHeaders.push.apply(requestHeaders,this.options.requestHeaders);for(var i=0;i0.5;},isDark:function(){return!this.isBright();},asRGB:function(){return"rgb("+this.rgb.r+","+this.rgb.g+","+this.rgb.b+")";},asHex:function(){return"#"+this.rgb.r.toColorPart()+this.rgb.g.toColorPart()+this.rgb.b.toColorPart();},asHSB:function(){return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r,this.rgb.g,this.rgb.b);},toString:function(){return this.asHex();}};OpenLayers.Rico.Color.createFromHex=function(hexCode){if(hexCode.length==4){var shortHexCode=hexCode;var hexCode='#';for(var i=1;i<4;i++)hexCode+=(shortHexCode.charAt(i)+ -shortHexCode.charAt(i));} -if(hexCode.indexOf('#')==0) -hexCode=hexCode.substring(1);var red=hexCode.substring(0,2);var green=hexCode.substring(2,4);var blue=hexCode.substring(4,6);return new OpenLayers.Rico.Color(parseInt(red,16),parseInt(green,16),parseInt(blue,16));} -OpenLayers.Rico.Color.createColorFromBackground=function(elem){var actualColor=RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem),"backgroundColor","background-color");if(actualColor=="transparent"&&elem.parentNode) -return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);if(actualColor==null) -return new OpenLayers.Rico.Color(255,255,255);if(actualColor.indexOf("rgb(")==0){var colors=actualColor.substring(4,actualColor.length-1);var colorArray=colors.split(",");return new OpenLayers.Rico.Color(parseInt(colorArray[0]),parseInt(colorArray[1]),parseInt(colorArray[2]));} -else if(actualColor.indexOf("#")==0){return OpenLayers.Rico.Color.createFromHex(actualColor);} -else -return new OpenLayers.Rico.Color(255,255,255);} -OpenLayers.Rico.Color.HSBtoRGB=function(hue,saturation,brightness){var red=0;var green=0;var blue=0;if(saturation==0){red=parseInt(brightness*255.0+0.5);green=red;blue=red;} -else{var h=(hue-Math.floor(hue))*6.0;var f=h-Math.floor(h);var p=brightness*(1.0-saturation);var q=brightness*(1.0-saturation*f);var t=brightness*(1.0-(saturation*(1.0-f)));switch(parseInt(h)){case 0:red=(brightness*255.0+0.5);green=(t*255.0+0.5);blue=(p*255.0+0.5);break;case 1:red=(q*255.0+0.5);green=(brightness*255.0+0.5);blue=(p*255.0+0.5);break;case 2:red=(p*255.0+0.5);green=(brightness*255.0+0.5);blue=(t*255.0+0.5);break;case 3:red=(p*255.0+0.5);green=(q*255.0+0.5);blue=(brightness*255.0+0.5);break;case 4:red=(t*255.0+0.5);green=(p*255.0+0.5);blue=(brightness*255.0+0.5);break;case 5:red=(brightness*255.0+0.5);green=(p*255.0+0.5);blue=(q*255.0+0.5);break;}} -return{r:parseInt(red),g:parseInt(green),b:parseInt(blue)};} -OpenLayers.Rico.Color.RGBtoHSB=function(r,g,b){var hue;var saturation;var brightness;var cmax=(r>g)?r:g;if(b>cmax) -cmax=b;var cmin=(rBase Layer";baseLbl.style.marginTop="3px";baseLbl.style.marginLeft="3px";baseLbl.style.marginBottom="3px";this.baseLayersDiv=document.createElement("div");this.baseLayersDiv.style.paddingLeft="10px";this.dataLbl=document.createElement("div");this.dataLbl.innerHTML="Overlays";this.dataLbl.style.marginTop="3px";this.dataLbl.style.marginLeft="3px";this.dataLbl.style.marginBottom="3px";this.dataLayersDiv=document.createElement("div");this.dataLayersDiv.style.paddingLeft="10px";if(this.ascending){this.layersDiv.appendChild(baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);}else{this.layersDiv.appendChild(this.dataLbl);this.layersDiv.appendChild(this.dataLayersDiv);this.layersDiv.appendChild(baseLbl);this.layersDiv.appendChild(this.baseLayersDiv);} -this.div.appendChild(this.layersDiv);OpenLayers.Rico.Corner.round(this.div,{corners:"tl bl",bgColor:"transparent",color:this.activeColor,blend:false});OpenLayers.Rico.Corner.changeOpacity(this.layersDiv,0.75);var imgLocation=OpenLayers.Util.getImagesLocation();var sz=new OpenLayers.Size(18,18);var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MaximizeDiv",null,sz,img,"absolute");this.maximizeDiv.style.top="5px";this.maximizeDiv.style.right="0px";this.maximizeDiv.style.left="";this.maximizeDiv.style.display="none";OpenLayers.Event.observe(this.maximizeDiv,"click",this.maximizeControl.bindAsEventListener(this));this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';var sz=new OpenLayers.Size(18,18);this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MinimizeDiv",null,sz,img,"absolute");this.minimizeDiv.style.top="5px";this.minimizeDiv.style.right="0px";this.minimizeDiv.style.left="";this.minimizeDiv.style.display="none";OpenLayers.Event.observe(this.minimizeDiv,"click",this.minimizeControl.bindAsEventListener(this));this.div.appendChild(this.minimizeDiv);},ignoreEvent:function(evt){OpenLayers.Event.stop(evt);},mouseDown:function(evt){this.mouseDown=true;this.ignoreEvent(evt);},mouseUp:function(evt){if(this.mouseDown){this.mouseDown=false;this.ignoreEvent(evt);}},CLASS_NAME:"OpenLayers.Control.LayerSwitcher"});OpenLayers.Control.MouseDefaults=OpenLayers.Class.create();OpenLayers.Control.MouseDefaults.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{performedDrag:false,wheelObserver:null,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();} -this.handler=null;this.map.events.unregister("click",this,this.defaultClick);this.map.events.unregister("dblclick",this,this.defaultDblClick);this.map.events.unregister("mousedown",this,this.defaultMouseDown);this.map.events.unregister("mouseup",this,this.defaultMouseUp);this.map.events.unregister("mousemove",this,this.defaultMouseMove);this.map.events.unregister("mouseout",this,this.defaultMouseOut);OpenLayers.Event.stopObserving(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.stopObserving(window,"mousewheel",this.wheelObserver);OpenLayers.Event.stopObserving(document,"mousewheel",this.wheelObserver);this.wheelObserver=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.map.events.register("click",this,this.defaultClick);this.map.events.register("dblclick",this,this.defaultDblClick);this.map.events.register("mousedown",this,this.defaultMouseDown);this.map.events.register("mouseup",this,this.defaultMouseUp);this.map.events.register("mousemove",this,this.defaultMouseMove);this.map.events.register("mouseout",this,this.defaultMouseOut);this.registerWheelEvents();},registerWheelEvents:function(){this.wheelObserver=this.onWheelEvent.bindAsEventListener(this);OpenLayers.Event.observe(window,"DOMMouseScroll",this.wheelObserver);OpenLayers.Event.observe(window,"mousewheel",this.wheelObserver);OpenLayers.Event.observe(document,"mousewheel",this.wheelObserver);},defaultClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;var notAfterDrag=!this.performedDrag;this.performedDrag=false;return notAfterDrag;},defaultDblClick:function(evt){var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.mouseDragStart=evt.xy.clone();this.performedDrag=false;if(evt.shiftKey){this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.viewPortDiv.appendChild(this.zoomBox);} -document.onselectstart=function(){return false;} -OpenLayers.Event.stop(evt);},defaultMouseMove:function(evt){this.mousePosition=evt.xy.clone();if(this.mouseDragStart!=null){if(this.zoomBox){var deltaX=Math.abs(this.mouseDragStart.x-evt.xy.x);var deltaY=Math.abs(this.mouseDragStart.y-evt.xy.y);this.zoomBox.style.width=Math.max(1,deltaX)+"px";this.zoomBox.style.height=Math.max(1,deltaY)+"px";if(evt.xy.x0){this.map.setCenter(this.map.getLonLatFromPixel(evt.xy),this.map.getZoom()-1);}},zoomBoxEnd:function(evt){if(this.mouseDragStart!=null){if(Math.abs(this.mouseDragStart.x-evt.xy.x)>5||Math.abs(this.mouseDragStart.y-evt.xy.y)>5){var start=this.map.getLonLatFromViewPortPx(this.mouseDragStart);var end=this.map.getLonLatFromViewPortPx(evt.xy);var top=Math.max(start.lat,end.lat);var bottom=Math.min(start.lat,end.lat);var left=Math.min(start.lon,end.lon);var right=Math.max(start.lon,end.lon);var bounds=new OpenLayers.Bounds(left,bottom,right,top);this.map.zoomToExtent(bounds);}else{var end=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(new OpenLayers.LonLat((end.lon),(end.lat)),this.map.getZoom()+1);} -this.removeZoomBox();}},removeZoomBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;},onWheelEvent:function(e){var inMap=false;var elem=OpenLayers.Event.element(e);while(elem!=null){if(this.map&&elem==this.map.div){inMap=true;break;} -elem=elem.parentNode;} -if(inMap){var delta=0;if(!e){e=window.event;} -if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera){delta=-delta;}}else if(e.detail){delta=-e.detail/3;} -if(delta){e.xy=this.mousePosition;if(delta<0){this.defaultWheelDown(e);}else{this.defaultWheelUp(e);}} -OpenLayers.Event.stop(e);}},CLASS_NAME:"OpenLayers.Control.MouseDefaults"});OpenLayers.Control.MousePosition=OpenLayers.Class.create();OpenLayers.Control.MousePosition.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{element:null,prefix:'',separator:', ',suffix:'',numdigits:5,granularity:10,lastXy:null,initialize:function(options){OpenLayers.Control.prototype.initialize.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);if(!this.element){this.div.left="";this.div.top="";this.div.className=this.displayClass;this.element=this.div;} -this.redraw();return this.div;},redraw:function(evt){var lonLat;if(evt==null){lonLat=new OpenLayers.LonLat(0,0);}else{if(this.lastXy==null||Math.abs(evt.xy.x-this.lastXy.x)>this.granularity||Math.abs(evt.xy.y-this.lastXy.y)>this.granularity) -{this.lastXy=evt.xy;return;} -lonLat=this.map.getLonLatFromPixel(evt.xy);this.lastXy=evt.xy;} -var digits=parseInt(this.numdigits);var newHtml=this.prefix+ -lonLat.lon.toFixed(digits)+ -this.separator+ -lonLat.lat.toFixed(digits)+ -this.suffix;if(newHtml!=this.element.innerHTML){this.element.innerHTML=newHtml;}},setMap:function(){OpenLayers.Control.prototype.setMap.apply(this,arguments);this.map.events.register('mousemove',this,this.redraw);},CLASS_NAME:"OpenLayers.Control.MousePosition"});OpenLayers.Control.PanZoom=OpenLayers.Class.create();OpenLayers.Control.PanZoom.X=4;OpenLayers.Control.PanZoom.Y=4;OpenLayers.Control.PanZoom.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{slideFactor:50,buttons:null,position:null,initialize:function(){this.position=new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X,OpenLayers.Control.PanZoom.Y);OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);while(this.buttons.length){var btn=this.buttons.shift();btn.map=null;OpenLayers.Event.stopObservingElement(btn);} -this.buttons=null;this.position=null;},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position;this.buttons=new Array();var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.y+sz.h;this._addButton("panleft","west-mini.png",px,sz);this._addButton("panright","east-mini.png",px.add(sz.w,0),sz);this._addButton("pandown","south-mini.png",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);this._addButton("zoomworld","zoom-world-mini.png",centered.add(0,sz.h*4+5),sz);this._addButton("zoomout","zoom-minus-mini.png",centered.add(0,sz.h*5+5),sz);return this.div;},_addButton:function(id,img,xy,sz){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_PanZoom_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);OpenLayers.Event.observe(btn,"mousedown",this.buttonDown.bindAsEventListener(btn));OpenLayers.Event.observe(btn,"mouseup",this.doubleClick.bindAsEventListener(btn));OpenLayers.Event.observe(btn,"dblclick",this.doubleClick.bindAsEventListener(btn));OpenLayers.Event.observe(btn,"click",this.doubleClick.bindAsEventListener(btn));btn.action=id;btn.map=this.map;btn.slideFactor=this.slideFactor;this.buttons.push(btn);return btn;},doubleClick:function(evt){OpenLayers.Event.stop(evt);return false;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;switch(this.action){case"panup":this.map.pan(0,-50);break;case"pandown":this.map.pan(0,50);break;case"panleft":this.map.pan(-50,0);break;case"panright":this.map.pan(50,0);break;case"zoomin":this.map.zoomIn();break;case"zoomout":this.map.zoomOut();break;case"zoomworld":this.map.zoomToMaxExtent();break;} -OpenLayers.Event.stop(evt);},CLASS_NAME:"OpenLayers.Control.PanZoom"});OpenLayers.Control.Panel=OpenLayers.Class.create();OpenLayers.Control.Panel.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{controls:null,defaultControl:null,initialize:function(element){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.controls=[];},destroy:function(){OpenLayers.Control.prototype.destroy.apply(this,arguments);for(var i=this.controls.length-1;i>=0;i--){OpenLayers.Event.stopObservingElement(this.controls[i].panel_div);this.controls[i].panel_div=null;}},activate:function(){if(OpenLayers.Control.prototype.activate.apply(this,arguments)){for(var i=0;i=9500&&scale<=950000){scale=Math.round(scale/1000)+"K";}else if(scale>=950000){scale=Math.round(scale/1000000)+"M";}else{scale=Math.round(scale);} -this.element.innerHTML="Scale = 1 : "+scale;},CLASS_NAME:"OpenLayers.Control.Scale"});OpenLayers.Control.ZoomToMaxExtent=OpenLayers.Class.create();OpenLayers.Control.ZoomToMaxExtent.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{type:OpenLayers.Control.TYPE_BUTTON,trigger:function(){if(this.map){this.map.zoomToMaxExtent();}},CLASS_NAME:"OpenLayers.Control.ZoomToMaxExtent"});OpenLayers.Event={observers:false,KEY_BACKSPACE:8,KEY_TAB:9,KEY_RETURN:13,KEY_ESC:27,KEY_LEFT:37,KEY_UP:38,KEY_RIGHT:39,KEY_DOWN:40,KEY_DELETE:46,element:function(event){return event.target||event.srcElement;},isLeftClick:function(event){return(((event.which)&&(event.which==1))||((event.button)&&(event.button==1)));},stop:function(event,allowDefault){if(!allowDefault){if(event.preventDefault){event.preventDefault();}else{event.returnValue=false;}} -if(event.stopPropagation){event.stopPropagation();}else{event.cancelBubble=true;}},findElement:function(event,tagName){var element=OpenLayers.Event.element(event);while(element.parentNode&&(!element.tagName||(element.tagName.toUpperCase()!=tagName.toUpperCase()))) -element=element.parentNode;return element;},observe:function(elementParam,name,observer,useCapture){var element=OpenLayers.Util.getElement(elementParam);useCapture=useCapture||false;if(name=='keypress'&&(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.attachEvent)){name='keydown';} -if(!this.observers){this.observers=new Object();} -if(!element._eventCacheID){var idPrefix="eventCacheID_";if(element.id){idPrefix=element.id+"_"+idPrefix;} -element._eventCacheID=OpenLayers.Util.createUniqueID(idPrefix);} -var cacheID=element._eventCacheID;if(!this.observers[cacheID]){this.observers[cacheID]=new Array();} -this.observers[cacheID].push({'element':element,'name':name,'observer':observer,'useCapture':useCapture});if(element.addEventListener){element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){element.attachEvent('on'+name,observer);}},stopObservingElement:function(elementParam){var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;this._removeElementObservers(OpenLayers.Event.observers[cacheID]);},_removeElementObservers:function(elementObservers){if(elementObservers){for(var i=elementObservers.length-1;i>=0;i--){var entry=elementObservers[i];var args=new Array(entry.element,entry.name,entry.observer,entry.useCapture);var removed=OpenLayers.Event.stopObserving.apply(this,args);}}},stopObserving:function(elementParam,name,observer,useCapture){useCapture=useCapture||false;var element=OpenLayers.Util.getElement(elementParam);var cacheID=element._eventCacheID;if(name=='keypress'){if(navigator.appVersion.match(/Konqueror|Safari|KHTML/)||element.detachEvent){name='keydown';}} -var foundEntry=false;var elementObservers=OpenLayers.Event.observers[cacheID];if(elementObservers){var i=0;while(!foundEntry&&i0)){for(var i=0;i5||Math.abs(this.dragHandler.start.y-end.y)>5){var start=this.dragHandler.start;var top=Math.min(start.y,end.y);var bottom=Math.max(start.y,end.y);var left=Math.min(start.x,end.x);var right=Math.max(start.x,end.x);result=new OpenLayers.Bounds(left,bottom,right,top);}else{result=this.dragHandler.start.clone();} -this.removeBox();this.map.div.style.cursor="";this.callback("done",[result]);},removeBox:function(){this.map.viewPortDiv.removeChild(this.zoomBox);this.zoomBox=null;},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.dragHandler.activate();return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.dragHandler.deactivate();return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.Box"});OpenLayers.Handler.Feature=OpenLayers.Class.create();OpenLayers.Handler.Feature.prototype=OpenLayers.Class.inherit(OpenLayers.Handler,{layerIndex:null,feature:null,initialize:function(control,layer,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,[control,callbacks,options]);this.layer=layer;},mousedown:function(evt){var selected=this.select('down',evt);return!selected;},mousemove:function(evt){this.select('move',evt);return true;},mouseup:function(evt){var selected=this.select('up',evt);return!selected;},dblclick:function(evt){var selected=this.select('dblclick',evt);return!selected;},select:function(type,evt){var feature=this.layer.getFeatureFromEvent(evt);if(feature){if(!this.feature){this.callback('over',[feature]);}else if(this.feature!=feature){this.callback('out',[this.feature]);this.callback('over',[feature]);} -this.feature=feature;this.callback(type,[feature]);return true;}else{if(this.feature){this.callback('out',[this.feature]);this.feature=null;} -return false;}},activate:function(){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){this.layerIndex=this.layer.div.style.zIndex;this.layer.div.style.zIndex=this.map.Z_INDEX_BASE['Popup']-1;return true;}else{return false;}},deactivate:function(){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){this.layer.div.style.zIndex=this.layerIndex;return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.Feature"});OpenLayers.Handler.MouseWheel=OpenLayers.Class.create();OpenLayers.Handler.MouseWheel.prototype=OpenLayers.Class.inherit(OpenLayers.Handler,{wheelListener:null,mousePosition:null,initialize:function(control,callbacks,options){OpenLayers.Handler.prototype.initialize.apply(this,arguments);this.wheelListener=this.onWheelEvent.bindAsEventListener(this);},destroy:function(){this.deactivate();this.wheelListener=null;OpenLayers.Handler.prototype.destroy.apply(this,arguments);},onWheelEvent:function(e){if(!this.checkModifiers(e))return;var inMap=false;var elem=OpenLayers.Event.element(e);while(elem!=null){if(this.map&&elem==this.map.div){inMap=true;break;} -elem=elem.parentNode;} -if(inMap){var delta=0;if(!e){e=window.event;} -if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera){delta=-delta;}}else if(e.detail){delta=-e.detail/3;} -if(delta){e.xy=this.mousePosition;if(delta<0){this.callback("down",[e,delta]);}else{this.callback("up",[e,delta]);}} -OpenLayers.Event.stop(e);}},mousemove:function(evt){this.mousePosition=evt.xy;},activate:function(evt){if(OpenLayers.Handler.prototype.activate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.observe(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.observe(window,"mousewheel",wheelListener);OpenLayers.Event.observe(document,"mousewheel",wheelListener);return true;}else{return false;}},deactivate:function(evt){if(OpenLayers.Handler.prototype.deactivate.apply(this,arguments)){var wheelListener=this.wheelListener;OpenLayers.Event.stopObserving(window,"DOMMouseScroll",wheelListener);OpenLayers.Event.stopObserving(window,"mousewheel",wheelListener);OpenLayers.Event.stopObserving(document,"mousewheel",wheelListener);return true;}else{return false;}},CLASS_NAME:"OpenLayers.Handler.MouseWheel"});OpenLayers.Popup.Anchored=OpenLayers.Class.create();OpenLayers.Popup.Anchored.prototype=OpenLayers.Class.inherit(OpenLayers.Popup,{relativePosition:null,anchor:null,initialize:function(id,lonlat,size,contentHTML,anchor,closeBox){var newArguments=new Array(id,lonlat,size,contentHTML,closeBox);OpenLayers.Popup.prototype.initialize.apply(this,newArguments);this.anchor=(anchor!=null)?anchor:{size:new OpenLayers.Size(0,0),offset:new OpenLayers.Pixel(0,0)};},draw:function(px){if(px==null){if((this.lonlat!=null)&&(this.map!=null)){px=this.map.getLayerPxFromLonLat(this.lonlat);}} -this.relativePosition=this.calculateRelativePosition(px);return OpenLayers.Popup.prototype.draw.apply(this,arguments);},calculateRelativePosition:function(px){var lonlat=this.map.getLonLatFromLayerPx(px);var extent=this.map.getExtent();var quadrant=extent.determineQuadrant(lonlat);return OpenLayers.Bounds.oppositeQuadrant(quadrant);},moveTo:function(px){var newPx=this.calculateNewPx(px);var newArguments=new Array(newPx);OpenLayers.Popup.prototype.moveTo.apply(this,newArguments);},setSize:function(size){OpenLayers.Popup.prototype.setSize.apply(this,arguments);if((this.lonlat)&&(this.map)){var px=this.map.getLayerPxFromLonLat(this.lonlat);this.moveTo(px);}},calculateNewPx:function(px){var newPx=px.offset(this.anchor.offset);var top=(this.relativePosition.charAt(0)=='t');newPx.y+=(top)?-this.size.h:this.anchor.size.h;var left=(this.relativePosition.charAt(1)=='l');newPx.x+=(left)?-this.size.w:this.anchor.size.w;return newPx;},CLASS_NAME:"OpenLayers.Popup.Anchored"});OpenLayers.Renderer.Elements=OpenLayers.Class.create();OpenLayers.Renderer.Elements.prototype=OpenLayers.Class.inherit(OpenLayers.Renderer,{rendererRoot:null,root:null,xmlns:null,initialize:function(containerID){OpenLayers.Renderer.prototype.initialize.apply(this,arguments);this.rendererRoot=this.createRenderRoot();this.root=this.createRoot();this.rendererRoot.appendChild(this.root);this.container.appendChild(this.rendererRoot);},destroy:function(){this.clear();this.rendererRoot=null;this.root=null;this.xmlns=null;OpenLayers.Renderer.prototype.destroy.apply(this,arguments);},clear:function(){if(this.root){while(this.root.childNodes.length>0){this.root.removeChild(this.root.firstChild);}}},getNodeType:function(geometry){},drawGeometry:function(geometry,style,featureId){if((geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPoint")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiLineString")||(geometry.CLASS_NAME=="OpenLayers.Geometry.MultiPolygon")){for(var i=0;ibottomRight.lon){if(topLeft.lon<0){topLeft.lon=-180-(topLeft.lon+180);}else{bottomRight.lon=180+bottomRight.lon+180;}} -bounds=new OpenLayers.Bounds(topLeft.lon,bottomRight.lat,bottomRight.lon,topLeft.lat);return bounds;},CLASS_NAME:"OpenLayers.Tile"};OpenLayers.Control.MouseToolbar=OpenLayers.Class.create();OpenLayers.Control.MouseToolbar.X=6;OpenLayers.Control.MouseToolbar.Y=300;OpenLayers.Control.MouseToolbar.prototype=OpenLayers.Class.inherit(OpenLayers.Control.MouseDefaults,{mode:null,buttons:null,direction:"vertical",buttonClicked:null,initialize:function(position,direction){OpenLayers.Control.prototype.initialize.apply(this,arguments);this.position=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,OpenLayers.Control.MouseToolbar.Y);if(position){this.position=position;} -if(direction){this.direction=direction;} -this.measureDivs=[];},destroy:function(){for(var btnId in this.buttons){var btn=this.buttons[btnId];btn.map=null;btn.events.destroy();} -OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this,arguments);},draw:function(){OpenLayers.Control.prototype.draw.apply(this,arguments);OpenLayers.Control.MouseDefaults.prototype.draw.apply(this,arguments);this.buttons=new Object();var sz=new OpenLayers.Size(28,28);var centered=new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0);this._addButton("zoombox","drag-rectangle-off.png","drag-rectangle-on.png",centered,sz,"Shift->Drag to zoom to area");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this._addButton("pan","panning-hand-off.png","panning-hand-on.png",centered,sz,"Drag the map to pan.");centered=centered.add((this.direction=="vertical"?0:sz.w),(this.direction=="vertical"?sz.h:0));this.switchModeTo("pan");return this.div;},_addButton:function(id,img,activeImg,xy,sz,title){var imgLocation=OpenLayers.Util.getImagesLocation()+img;var activeImgLocation=OpenLayers.Util.getImagesLocation()+activeImg;var btn=OpenLayers.Util.createAlphaImageDiv("OpenLayers_Control_MouseToolbar_"+id,xy,sz,imgLocation,"absolute");this.div.appendChild(btn);btn.imgLocation=imgLocation;btn.activeImgLocation=activeImgLocation;btn.events=new OpenLayers.Events(this,btn,null,true);btn.events.register("mousedown",this,this.buttonDown);btn.events.register("mouseup",this,this.buttonUp);btn.events.register("dblclick",this,OpenLayers.Event.stop);btn.action=id;btn.title=title;btn.alt=title;btn.map=this.map;this.buttons[id]=btn;return btn;},buttonDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.buttonClicked=evt.element.action;OpenLayers.Event.stop(evt);},buttonUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.buttonClicked!=null){if(this.buttonClicked==evt.element.action){this.switchModeTo(evt.element.action);} -OpenLayers.Event.stop(evt);this.buttonClicked=null;}},defaultDblClick:function(evt){this.switchModeTo("pan");this.performedDrag=false;var newCenter=this.map.getLonLatFromViewPortPx(evt.xy);this.map.setCenter(newCenter,this.map.zoom+1);OpenLayers.Event.stop(evt);return false;},defaultMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.mouseDragStart=evt.xy.clone();this.performedDrag=false;this.startViaKeyboard=false;if(evt.shiftKey&&this.mode!="zoombox"){this.switchModeTo("zoombox");this.startViaKeyboard=true;}else if(evt.altKey&&this.mode!="measure"){this.switchModeTo("measure");}else if(!this.mode){this.switchModeTo("pan");} -switch(this.mode){case"zoombox":this.map.div.style.cursor="crosshair";this.zoomBox=OpenLayers.Util.createDiv('zoomBox',this.mouseDragStart,null,null,"absolute","2px solid red");this.zoomBox.style.backgroundColor="white";this.zoomBox.style.filter="alpha(opacity=50)";this.zoomBox.style.opacity="0.50";this.zoomBox.style.fontSize="1px";this.zoomBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.viewPortDiv.appendChild(this.zoomBox);this.performedDrag=true;break;case"measure":var distance="";if(this.measureStart){measureEnd=this.map.getLonLatFromViewPortPx(this.mouseDragStart);distance=OpenLayers.Util.distVincenty(this.measureStart,measureEnd);distance=Math.round(distance*100)/100;distance=distance+"km";this.measureStartBox=this.measureBox;} -this.measureStart=this.map.getLonLatFromViewPortPx(this.mouseDragStart);;this.measureBox=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),-2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBox.style.width="4px";this.measureBox.style.height="4px";this.measureBox.style.fontSize="1px";this.measureBox.style.backgroundColor="red";this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);if(distance){this.measureBoxDistance=OpenLayers.Util.createDiv(null,this.mouseDragStart.add(-2-parseInt(this.map.layerContainerDiv.style.left),2-parseInt(this.map.layerContainerDiv.style.top)),null,null,"absolute");this.measureBoxDistance.innerHTML=distance;this.measureBoxDistance.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBoxDistance);this.measureDivs.push(this.measureBoxDistance);} -this.measureBox.style.zIndex=this.map.Z_INDEX_BASE["Popup"]-1;this.map.layerContainerDiv.appendChild(this.measureBox);this.measureDivs.push(this.measureBox);break;default:this.map.div.style.cursor="move";break;} -document.onselectstart=function(){return false;} -OpenLayers.Event.stop(evt);},switchModeTo:function(mode){if(mode!=this.mode){if(this.mode&&this.buttons[this.mode]){OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode],null,null,null,this.buttons[this.mode].imgLocation);} -if(this.mode=="measure"&&mode!="measure"){for(var i=0;i0)){if(this.map.baseLayer){var layer=this.map.baseLayer.clone();this.layers=[layer];}else{this.map.events.register("changebaselayer",this,this.baseLayerDraw);return this.div;}} -this.element=document.createElement('div');this.element.className=this.displayClass+'Element';this.element.style.display='none';this.mapDiv=document.createElement('div');this.mapDiv.style.width=this.size.w+'px';this.mapDiv.style.height=this.size.h+'px';this.mapDiv.style.position='relative';this.mapDiv.style.overflow='hidden';this.mapDiv.id=OpenLayers.Util.createUniqueID('overviewMap');this.extentRectangle=document.createElement('div');this.extentRectangle.style.position='absolute';this.extentRectangle.style.zIndex=1000;this.extentRectangle.style.overflow='hidden';this.extentRectangle.style.backgroundImage='url('+ -OpenLayers.Util.getImagesLocation()+'blank.gif)';this.extentRectangle.className=this.displayClass+'ExtentRectangle';this.mapDiv.appendChild(this.extentRectangle);this.element.appendChild(this.mapDiv);this.div.appendChild(this.element);this.map.events.register('moveend',this,this.update);this.elementEvents=new OpenLayers.Events(this,this.element);this.elementEvents.register('mousedown',this,function(e){OpenLayers.Event.stop(e);});this.elementEvents.register('click',this,function(e){OpenLayers.Event.stop(e);});this.elementEvents.register('dblclick',this,function(e){OpenLayers.Event.stop(e);});this.rectEvents=new OpenLayers.Events(this,this.extentRectangle,null,true);this.rectEvents.register('mouseout',this,this.rectMouseOut);this.rectEvents.register('mousedown',this,this.rectMouseDown);this.rectEvents.register('mousemove',this,this.rectMouseMove);this.rectEvents.register('mouseup',this,this.rectMouseUp);this.rectEvents.register('click',this,function(e){OpenLayers.Event.stop(e);});this.rectEvents.register('dblclick',this,this.rectDblClick);this.mapDivEvents=new OpenLayers.Events(this,this.mapDiv);this.mapDivEvents.register('click',this,this.mapDivClick);if(!this.outsideViewport){this.div.className=this.displayClass+'Container';var imgLocation=OpenLayers.Util.getImagesLocation();var img=imgLocation+'layer-switcher-maximize.png';this.maximizeDiv=OpenLayers.Util.createAlphaImageDiv(this.displayClass+'MaximizeButton',null,new OpenLayers.Size(18,18),img,'absolute');this.maximizeDiv.style.display='none';this.maximizeDiv.className=this.displayClass+'MaximizeButton';OpenLayers.Event.observe(this.maximizeDiv,'click',this.maximizeControl.bindAsEventListener(this));OpenLayers.Event.observe(this.maximizeDiv,'dblclick',function(e){OpenLayers.Event.stop(e);});this.div.appendChild(this.maximizeDiv);var img=imgLocation+'layer-switcher-minimize.png';this.minimizeDiv=OpenLayers.Util.createAlphaImageDiv('OpenLayers_Control_minimizeDiv',null,new OpenLayers.Size(18,18),img,'absolute');this.minimizeDiv.style.display='none';this.minimizeDiv.className=this.displayClass+'MinimizeButton';OpenLayers.Event.observe(this.minimizeDiv,'click',this.minimizeControl.bindAsEventListener(this));OpenLayers.Event.observe(this.minimizeDiv,'dblclick',function(e){OpenLayers.Event.stop(e);});this.div.appendChild(this.minimizeDiv);this.minimizeControl();}else{this.element.style.display='';} -if(this.map.getExtent()){this.update();} -return this.div;},baseLayerDraw:function(){this.draw();this.map.events.unregister("changebaselayer",this,this.baseLayerDraw);},rectMouseOut:function(evt){if(this.rectDragStart!=null){if(this.performedRectDrag){this.rectMouseMove(evt);var rectPxBounds=this.getRectPxBounds();if((rectPxBounds.top<=0)||(rectPxBounds.left<=0)||(rectPxBounds.bottom>=this.size.h-this.hComp)||(rectPxBounds.right>=this.size.w-this.wComp)){this.updateMapToRect();}else{return;}} -document.onselectstart=null;this.rectDragStart=null;}},rectMouseDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.rectDragStart=evt.xy.clone();this.performedRectDrag=false;OpenLayers.Event.stop(evt);},rectMouseMove:function(evt){if(this.rectDragStart!=null){var deltaX=this.rectDragStart.x-evt.xy.x;var deltaY=this.rectDragStart.y-evt.xy.y;var rectPxBounds=this.getRectPxBounds();var rectTop=rectPxBounds.top;var rectLeft=rectPxBounds.left;var rectHeight=Math.abs(rectPxBounds.getHeight());var rectWidth=rectPxBounds.getWidth();var newTop=Math.max(0,(rectTop-deltaY));newTop=Math.min(newTop,this.ovmap.size.h-this.hComp-rectHeight);var newLeft=Math.max(0,(rectLeft-deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-this.wComp-rectWidth);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+rectHeight,newLeft+rectWidth,newTop));this.rectDragStart=evt.xy.clone();this.performedRectDrag=true;OpenLayers.Event.stop(evt);}},rectMouseUp:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;if(this.performedRectDrag){this.updateMapToRect();OpenLayers.Event.stop(evt);} -document.onselectstart=null;this.rectDragStart=null;},rectDblClick:function(evt){this.performedRectDrag=false;OpenLayers.Event.stop(evt);this.updateOverview();},mapDivClick:function(evt){var pxBounds=this.getRectPxBounds();var pxCenter=pxBounds.getCenterPixel();var deltaX=evt.xy.x-pxCenter.x;var deltaY=evt.xy.y-pxCenter.y;var top=pxBounds.top;var left=pxBounds.left;var height=Math.abs(pxBounds.getHeight());var width=pxBounds.getWidth();var newTop=Math.max(0,(top+deltaY));newTop=Math.min(newTop,this.ovmap.size.h-height);var newLeft=Math.max(0,(left+deltaX));newLeft=Math.min(newLeft,this.ovmap.size.w-width);this.setRectPxBounds(new OpenLayers.Bounds(newLeft,newTop+height,newLeft+width,newTop));this.updateMapToRect();OpenLayers.Event.stop(evt);},maximizeControl:function(e){this.element.style.display='';this.showToggle(false);if(e!=null){OpenLayers.Event.stop(e);}},minimizeControl:function(e){this.element.style.display='none';this.showToggle(true);if(e!=null){OpenLayers.Event.stop(e);}},showToggle:function(minimize){this.maximizeDiv.style.display=minimize?'':'none';this.minimizeDiv.style.display=minimize?'none':'';},update:function(){if(this.ovmap==null){this.createMap();} -if(!this.isSuitableOverview()){this.updateOverview();} -this.updateRectToMap();},isSuitableOverview:function(){var mapExtent=this.map.getExtent();var maxExtent=this.map.maxExtent;var testExtent=new OpenLayers.Bounds(Math.max(mapExtent.left,maxExtent.left),Math.max(mapExtent.bottom,maxExtent.bottom),Math.min(mapExtent.right,maxExtent.right),Math.min(mapExtent.top,maxExtent.top));var resRatio=this.ovmap.getResolution()/this.map.getResolution();return((resRatio>this.minRatio)&&(resRatio<=this.maxRatio)&&(this.ovmap.getExtent().containsBounds(testExtent)));},updateOverview:function(){var mapRes=this.map.getResolution();var targetRes=this.ovmap.getResolution();var resRatio=targetRes/mapRes;if(resRatio>this.maxRatio){targetRes=this.minRatio*mapRes;}else if(resRatio<=this.minRatio){targetRes=this.maxRatio*mapRes;} -this.ovmap.setCenter(this.map.center,this.ovmap.getZoomForResolution(targetRes));this.updateRectToMap();},createMap:function(){var options=OpenLayers.Util.extend({controls:[],maxResolution:'auto'},this.mapOptions);this.ovmap=new OpenLayers.Map(this.mapDiv.id,options);this.ovmap.addLayers(this.layers);this.ovmap.zoomToMaxExtent();this.wComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-left-width'))+ -parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-right-width'));this.wComp=(this.wComp)?this.wComp:2;this.hComp=parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-top-width'))+ -parseInt(OpenLayers.Element.getStyle(this.extentRectangle,'border-bottom-width'));this.hComp=(this.hComp)?this.hComp:2;},updateRectToMap:function(){if(this.map.units!='degrees'){if(this.ovmap.getProjection()&&(this.map.getProjection()!=this.ovmap.getProjection())){alert('The overview map only works when it is in the same projection as the main map');}} -var pxBounds=this.getRectBoundsFromMapBounds(this.map.getExtent());if(pxBounds){this.setRectPxBounds(pxBounds);}},updateMapToRect:function(){var pxBounds=this.getRectPxBounds();var lonLatBounds=this.getMapBoundsFromRectBounds(pxBounds);this.map.setCenter(lonLatBounds.getCenterLonLat(),this.map.zoom);},getRectPxBounds:function(){var top=parseInt(this.extentRectangle.style.top);var left=parseInt(this.extentRectangle.style.left);var height=parseInt(this.extentRectangle.style.height);var width=parseInt(this.extentRectangle.style.width);return new OpenLayers.Bounds(left,top+height,left+width,top);},setRectPxBounds:function(pxBounds){var top=Math.max(pxBounds.top,0);var left=Math.max(pxBounds.left,0);var bottom=Math.min(pxBounds.top+Math.abs(pxBounds.getHeight()),this.ovmap.size.h-this.hComp);var right=Math.min(pxBounds.left+pxBounds.getWidth(),this.ovmap.size.w-this.wComp);this.extentRectangle.style.top=parseInt(top)+'px';this.extentRectangle.style.left=parseInt(left)+'px';this.extentRectangle.style.height=parseInt(Math.max(bottom-top,0))+'px';this.extentRectangle.style.width=parseInt(Math.max(right-left,0))+'px';},getRectBoundsFromMapBounds:function(lonLatBounds){var leftBottomLonLat=new OpenLayers.LonLat(lonLatBounds.left,lonLatBounds.bottom);var rightTopLonLat=new OpenLayers.LonLat(lonLatBounds.right,lonLatBounds.top);var leftBottomPx=this.getOverviewPxFromLonLat(leftBottomLonLat);var rightTopPx=this.getOverviewPxFromLonLat(rightTopLonLat);var bounds=null;if(leftBottomPx&&rightTopPx){bounds=new OpenLayers.Bounds(leftBottomPx.x,leftBottomPx.y,rightTopPx.x,rightTopPx.y);} -return bounds;},getMapBoundsFromRectBounds:function(pxBounds){var leftBottomPx=new OpenLayers.Pixel(pxBounds.left,pxBounds.bottom);var rightTopPx=new OpenLayers.Pixel(pxBounds.right,pxBounds.top);var leftBottomLonLat=this.getLonLatFromOverviewPx(leftBottomPx);var rightTopLonLat=this.getLonLatFromOverviewPx(rightTopPx);return new OpenLayers.Bounds(leftBottomLonLat.lon,leftBottomLonLat.lat,rightTopLonLat.lon,rightTopLonLat.lat);},getLonLatFromOverviewPx:function(overviewMapPx){var size=this.ovmap.size;var res=this.ovmap.getResolution();var center=this.ovmap.getExtent().getCenterLonLat();var delta_x=overviewMapPx.x-(size.w/2);var delta_y=overviewMapPx.y-(size.h/2);return new OpenLayers.LonLat(center.lon+delta_x*res,center.lat-delta_y*res);},getOverviewPxFromLonLat:function(lonlat){var res=this.ovmap.getResolution();var extent=this.ovmap.getExtent();var px=null;if(extent){px=new OpenLayers.Pixel(Math.round(1/res*(lonlat.lon-extent.left)),Math.round(1/res*(extent.top-lonlat.lat)));} -return px;},CLASS_NAME:'OpenLayers.Control.OverviewMap'});OpenLayers.Control.PanZoomBar=OpenLayers.Class.create();OpenLayers.Control.PanZoomBar.prototype=OpenLayers.Class.inherit(OpenLayers.Control.PanZoom,{zoomStopWidth:18,zoomStopHeight:11,slider:null,sliderEvents:null,zoomBarDiv:null,divEvents:null,initialize:function(){OpenLayers.Control.PanZoom.prototype.initialize.apply(this,arguments);},destroy:function(){this.div.removeChild(this.slider);this.slider=null;this.sliderEvents.destroy();this.sliderEvents=null;this.div.removeChild(this.zoombarDiv);this.zoomBarDiv=null;this.divEvents.destroy();this.divEvents=null;this.map.events.unregister("zoomend",this,this.moveZoomBar);this.map.events.unregister("changebaselayer",this,this.redraw) -OpenLayers.Control.PanZoom.prototype.destroy.apply(this,arguments);},setMap:function(map){OpenLayers.Control.PanZoom.prototype.setMap.apply(this,arguments);this.map.events.register("changebaselayer",this,this.redraw);},redraw:function(){if(this.div!=null){this.div.innerHTML="";} -this.draw();},draw:function(px){OpenLayers.Control.prototype.draw.apply(this,arguments);px=this.position.clone();this.buttons=new Array();var sz=new OpenLayers.Size(18,18);var centered=new OpenLayers.Pixel(px.x+sz.w/2,px.y);this._addButton("panup","north-mini.png",centered,sz);px.y=centered.y+sz.h;this._addButton("panleft","west-mini.png",px,sz);this._addButton("panright","east-mini.png",px.add(sz.w,0),sz);this._addButton("pandown","south-mini.png",centered.add(0,sz.h*2),sz);this._addButton("zoomin","zoom-plus-mini.png",centered.add(0,sz.h*3+5),sz);centered=this._addZoomBar(centered.add(0,sz.h*4+5));this._addButton("zoomout","zoom-minus-mini.png",centered,sz);return this.div;},_addZoomBar:function(centered){var imgLocation=OpenLayers.Util.getImagesLocation();var id="OpenLayers_Control_PanZoomBar_Slider"+this.map.id;var zoomsToEnd=this.map.getNumZoomLevels()-1-this.map.getZoom();var slider=OpenLayers.Util.createAlphaImageDiv(id,centered.add(-1,zoomsToEnd*this.zoomStopHeight),new OpenLayers.Size(20,9),imgLocation+"slider.png","absolute");this.slider=slider;this.sliderEvents=new OpenLayers.Events(this,slider,null,true);this.sliderEvents.register("mousedown",this,this.zoomBarDown);this.sliderEvents.register("mousemove",this,this.zoomBarDrag);this.sliderEvents.register("mouseup",this,this.zoomBarUp);this.sliderEvents.register("dblclick",this,this.doubleClick);this.sliderEvents.register("click",this,this.doubleClick);sz=new OpenLayers.Size();sz.h=this.zoomStopHeight*this.map.getNumZoomLevels();sz.w=this.zoomStopWidth;var div=null -if(OpenLayers.Util.alphaHack()){var id="OpenLayers_Control_PanZoomBar"+this.map.id;div=OpenLayers.Util.createAlphaImageDiv(id,centered,new OpenLayers.Size(sz.w,this.zoomStopHeight),imgLocation+"zoombar.png","absolute",null,"crop");div.style.height=sz.h;}else{div=OpenLayers.Util.createDiv('OpenLayers_Control_PanZoomBar_Zoombar'+this.map.id,centered,sz,imgLocation+"zoombar.png");} -this.zoombarDiv=div;this.divEvents=new OpenLayers.Events(this,div,null,true);this.divEvents.register("mousedown",this,this.divClick);this.divEvents.register("mousemove",this,this.passEventToSlider);this.divEvents.register("dblclick",this,this.doubleClick);this.divEvents.register("click",this,this.doubleClick);this.div.appendChild(div);this.startTop=parseInt(div.style.top);this.div.appendChild(slider);this.map.events.register("zoomend",this,this.moveZoomBar);centered=centered.add(0,this.zoomStopHeight*this.map.getNumZoomLevels());return centered;},passEventToSlider:function(evt){this.sliderEvents.handleBrowserEvent(evt);},divClick:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;var y=evt.xy.y;var top=OpenLayers.Util.pagePosition(evt.object)[1];var levels=Math.floor((y-top)/this.zoomStopHeight);this.map.zoomTo((this.map.getNumZoomLevels()-1)-levels);OpenLayers.Event.stop(evt);},zoomBarDown:function(evt){if(!OpenLayers.Event.isLeftClick(evt))return;this.map.events.register("mousemove",this,this.passEventToSlider);this.map.events.register("mouseup",this,this.passEventToSlider);this.mouseDragStart=evt.xy.clone();this.zoomStart=evt.xy.clone();this.div.style.cursor="move";this.zoombarDiv.offsets=null;OpenLayers.Event.stop(evt);},zoomBarDrag:function(evt){if(this.mouseDragStart!=null){var deltaY=this.mouseDragStart.y-evt.xy.y -var offsets=OpenLayers.Util.pagePosition(this.zoombarDiv);if((evt.clientY-offsets[1])>0&&(evt.clientY-offsets[1])0){pieces.push(',');} -geometry=collection[i].geometry;type=geometry.CLASS_NAME.split('.')[2].toLowerCase();if(!this.extract[type]){return null;} -data=this.extract[type].apply(this,[geometry]);pieces.push(type.toUpperCase()+'('+data+')');} -if(isCollection){pieces.push(')');} -return pieces.join('');},extract:{'point':function(point){return point.x+' '+point.y;},'multipoint':function(multipoint){var array=[];for(var i=0;i=0;--i){this.layers[i].destroy(false);} -this.layers=null;} -if(this.controls!=null){for(var i=this.controls.length-1;i>=0;--i){this.controls[i].destroy();} -this.controls=null;} -if(this.viewPortDiv){this.div.removeChild(this.viewPortDiv);} -this.viewPortDiv=null;this.events.destroy();this.events=null;},setOptions:function(options){this.tileSize=new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH,OpenLayers.Map.TILE_HEIGHT);this.maxExtent=new OpenLayers.Bounds(-180,-90,180,90);this.theme=OpenLayers._getScriptLocation()+'theme/default/style.css';OpenLayers.Util.extend(this,options);},getTileSize:function(){return this.tileSize;},getLayer:function(id){var foundLayer=null;for(var i=0;ithis.layers.length) -idx=this.layers.length;if(base!=idx){this.layers.splice(base,1);this.layers.splice(idx,0,layer);for(var i=0;i=0)&&(zoomLevelthis.maxPixel){draw=false;} -if(y<-this.maxPixel||y>this.maxPixel){draw=false;} -if(draw){node.setAttributeNS(null,"cx",x);node.setAttributeNS(null,"cy",y);node.setAttributeNS(null,"r",radius);}else{this.root.removeChild(node);}},drawLineString:function(node,geometry){node.setAttributeNS(null,"points",this.getComponentsString(geometry.components));},drawLinearRing:function(node,geometry){node.setAttributeNS(null,"points",this.getComponentsString(geometry.components));},drawPolygon:function(node,geometry){var d="";var draw=true;for(var j=0;jthis.maxPixel){draw=false;} -if(y<-this.maxPixel||y>this.maxPixel){draw=false;} -if(draw){node.setAttributeNS(null,"x",x);node.setAttributeNS(null,"y",y);node.setAttributeNS(null,"width",geometry.width);node.setAttributeNS(null,"height",geometry.height);}else{node.setAttributeNS(null,"x","");node.setAttributeNS(null,"y","");node.setAttributeNS(null,"width",0);node.setAttributeNS(null,"height",0);}},drawCurve:function(node,geometry){var d=null;var draw=true;for(var i=0;ithis.maxPixel){return false;} -if(y<-this.maxPixel||y>this.maxPixel){return false;} -var string=x+","+y;return string;},CLASS_NAME:"OpenLayers.Renderer.SVG"});OpenLayers.Renderer.VML=OpenLayers.Class.create();OpenLayers.Renderer.VML.prototype=OpenLayers.Class.inherit(OpenLayers.Renderer.Elements,{xmlns:"urn:schemas-microsoft-com:vml",initialize:function(containerID){if(!this.supported()){return;} -document.namespaces.add("v","urn:schemas-microsoft-com:vml");var style=document.createStyleSheet();style.addRule('v\\:*',"behavior: url(#default#VML); "+"position: relative; display: inline-block;");OpenLayers.Renderer.Elements.prototype.initialize.apply(this,arguments);},destroy:function(){OpenLayers.Renderer.Elements.prototype.destroy.apply(this,arguments);},supported:function(){var supported=document.namespaces;return supported;},setExtent:function(extent){OpenLayers.Renderer.Elements.prototype.setExtent.apply(this,arguments);var resolution=this.getResolution();var org=extent.left/resolution+" "+ -extent.top/resolution;this.root.setAttribute("coordorigin",org);var size=extent.getWidth()/resolution+" "+ --extent.getHeight()/resolution;this.root.setAttribute("coordsize",size);},setSize:function(size){OpenLayers.Renderer.prototype.setSize.apply(this,arguments);this.rendererRoot.style.width=this.size.w;this.rendererRoot.style.height=this.size.h;this.root.style.width="100%";this.root.style.height="100%";},getNodeType:function(geometry){var nodeType=null;switch(geometry.CLASS_NAME){case"OpenLayers.Geometry.Point":nodeType="v:oval";break;case"OpenLayers.Geometry.Rectangle":nodeType="v:rect";break;case"OpenLayers.Geometry.LineString":case"OpenLayers.Geometry.LinearRing":case"OpenLayers.Geometry.Polygon":case"OpenLayers.Geometry.Curve":case"OpenLayers.Geometry.Surface":nodeType="v:shape";break;default:break;} -return nodeType;},setStyle:function(node,style,options,geometry){style=style||node._style;options=options||node._options;if(node._geometryClass=="OpenLayers.Geometry.Point"){this.drawCircle(node,geometry,style.pointRadius);} -var fillColor=(options.isFilled)?style.fillColor:"none";node.setAttribute("fillcolor",fillColor);var fills=node.getElementsByTagName("fill");var fill=(fills.length==0)?null:fills[0];if(!options.isFilled){if(fill){node.removeChild(fill);}}else{if(!fill){fill=this.createNode('v:fill',node.id+"_fill");node.appendChild(fill);} -fill.setAttribute("opacity",style.fillOpacity);} -var strokeColor=(options.isStroked)?style.strokeColor:"none";node.setAttribute("strokecolor",strokeColor);node.setAttribute("strokeweight",style.strokeWidth);var strokes=node.getElementsByTagName("stroke");var stroke=(strokes.length==0)?null:strokes[0];if(!options.isStroked){if(stroke){node.removeChild(stroke);}}else{if(!stroke){stroke=this.createNode('v:stroke',node.id+"_stroke");node.appendChild(stroke);} -stroke.setAttribute("opacity",style.strokeOpacity);} -if(style.cursor){node.style.cursor=style.cursor;}},setNodeDimension:function(node,geometry){var bbox=geometry.getBounds();var resolution=this.getResolution();var scaledBox=new OpenLayers.Bounds((bbox.left/resolution).toFixed(),(bbox.bottom/resolution).toFixed(),(bbox.right/resolution).toFixed(),(bbox.top/resolution).toFixed());node.style.left=scaledBox.left;node.style.top=scaledBox.top;node.style.width=scaledBox.getWidth();node.style.height=scaledBox.getHeight();node.coordorigin=scaledBox.left+" "+scaledBox.top;node.coordsize=scaledBox.getWidth()+" "+scaledBox.getHeight();},createNode:function(type,id){var node=document.createElement(type);if(id){node.setAttribute('id',id);} -return node;},nodeTypeCompare:function(node,type){var subType=type;var splitIndex=subType.indexOf(":");if(splitIndex!=-1){subType=subType.substr(splitIndex+1);} -var nodeName=node.nodeName;splitIndex=nodeName.indexOf(":");if(splitIndex!=-1){nodeName=nodeName.substr(splitIndex+1);} -return(subType==nodeName);},createRenderRoot:function(){var id=this.container.id+"_vmlRoot";var rendererRoot=this.nodeFactory(id,"div");return rendererRoot;},createRoot:function(){var id=this.container.id+"_root";var root=this.nodeFactory(id,"v:group");return root;},drawPoint:function(node,geometry){this.drawCircle(node,geometry,1);},drawCircle:function(node,geometry,radius){var resolution=this.getResolution();node.style.left=(geometry.x/resolution).toFixed()-radius;node.style.top=(geometry.y/resolution).toFixed()-radius;var diameter=radius*2;node.style.width=diameter;node.style.height=diameter;},drawLineString:function(node,geometry){this.drawLine(node,geometry,false);},drawLinearRing:function(node,geometry){this.drawLine(node,geometry,true);},drawLine:function(node,geometry,closeLine){this.setNodeDimension(node,geometry);var resolution=this.getResolution();var path="m";for(var i=0;i0){var feature=this.features.shift();feature.destroy();}},CLASS_NAME:"OpenLayers.Tile.WFS"});OpenLayers.Control.DragPan=OpenLayers.Class.create();OpenLayers.Control.DragPan.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{type:OpenLayers.Control.TYPE_TOOL,draw:function(){this.handler=new OpenLayers.Handler.Drag(this,{"move":this.panMap,"up":this.panMapDone});},panMap:function(xy){var deltaX=this.handler.start.x-xy.x;var deltaY=this.handler.start.y-xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,true);this.handler.start=xy;},panMapDone:function(xy){var deltaX=this.handler.start.x-xy.x;var deltaY=this.handler.start.y-xy.y;var size=this.map.getSize();var newXY=new OpenLayers.Pixel(size.w/2+deltaX,size.h/2+deltaY);var newCenter=this.map.getLonLatFromViewPortPx(newXY);this.map.setCenter(newCenter,null,false);this.handler.start=xy;},CLASS_NAME:"OpenLayers.Control.DragPan"});OpenLayers.Control.KeyboardDefaults=OpenLayers.Class.create();OpenLayers.Control.KeyboardDefaults.prototype=OpenLayers.Class.inherit(OpenLayers.Control,{slideFactor:75,initialize:function(){OpenLayers.Control.prototype.initialize.apply(this,arguments);},destroy:function(){if(this.handler){this.handler.destroy();} -this.handler=null;OpenLayers.Control.prototype.destroy.apply(this,arguments);},draw:function(){this.handler=new OpenLayers.Handler.Keyboard(this,{"keypress":this.defaultKeyPress});this.activate();},defaultKeyPress:function(code){switch(code){case OpenLayers.Event.KEY_LEFT:this.map.pan(-this.slideFactor,0);break;case OpenLayers.Event.KEY_RIGHT:this.map.pan(this.slideFactor,0);break;case OpenLayers.Event.KEY_UP:this.map.pan(0,-this.slideFactor);break;case OpenLayers.Event.KEY_DOWN:this.map.pan(0,this.slideFactor);break;case 33:var size=this.map.getSize();this.map.pan(0,-0.75*size.h);break;case 34:var size=this.map.getSize();this.map.pan(0,0.75*size.h);break;case 35:var size=this.map.getSize();this.map.pan(0.75*size.w,0);break;case 36:var size=this.map.getSize();this.map.pan(-0.75*size.w,0);break;case 43:this.map.zoomIn();break;case 45:this.map.zoomOut();break;case 107:this.map.zoomIn();break;case 109:this.map.zoomOut();break;}},CLASS_NAME:"OpenLayers.Control.KeyboardDefaults"});OpenLayers.Feature=OpenLayers.Class.create();OpenLayers.Feature.prototype={events:null,layer:null,id:null,lonlat:null,data:null,marker:null,popup:null,initialize:function(layer,lonlat,data){this.layer=layer;this.lonlat=lonlat;this.data=(data!=null)?data:new Object();this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");},destroy:function(){if((this.layer!=null)&&(this.layer.map!=null)){if(this.popup!=null){this.layer.map.removePopup(this.popup);}} -if(this.events){this.events.destroy();} -this.events=null;this.layer=null;this.id=null;this.lonlat=null;this.data=null;if(this.marker!=null){this.destroyMarker(this.marker);this.marker=null;} -if(this.popup!=null){this.destroyPopup(this.popup);this.popup=null;}},onScreen:function(){var onScreen=false;if((this.layer!=null)&&(this.layer.map!=null)){var screenBounds=this.layer.map.getExtent();onScreen=screenBounds.containsLonLat(this.lonlat);} -return onScreen;},createMarker:function(){var marker=null;if(this.lonlat!=null){this.marker=new OpenLayers.Marker(this.lonlat,this.data.icon);} -return this.marker;},destroyMarker:function(){this.marker.destroy();},createPopup:function(closeBox){if(this.lonlat!=null){var id=this.id+"_popup";var anchor=(this.marker)?this.marker.icon:null;this.popup=new OpenLayers.Popup.AnchoredBubble(id,this.lonlat,this.data.popupSize,this.data.popupContentHTML,anchor,closeBox);} -return this.popup;},destroyPopup:function(){this.popup.destroy()},CLASS_NAME:"OpenLayers.Feature"};OpenLayers.Layer=OpenLayers.Class.create();OpenLayers.Layer.prototype={id:null,name:null,div:null,EVENT_TYPES:["loadstart","loadend","loadcancel"],events:null,map:null,isBaseLayer:false,alpha:false,displayInLayerSwitcher:true,visibility:true,inRange:false,imageSize:null,imageOffset:null,options:null,gutter:0,projection:null,units:null,scales:null,resolutions:null,maxExtent:null,minExtent:null,maxResolution:null,minResolution:null,numZoomLevels:null,minScale:null,maxScale:null,displayOutsideMaxExtent:false,initialize:function(name,options){this.addOptions(options);this.name=name;if(this.id==null){this.id=OpenLayers.Util.createUniqueID(this.CLASS_NAME+"_");this.div=OpenLayers.Util.createDiv();this.div.style.width="100%";this.div.style.height="100%";this.div.id=this.id;this.events=new OpenLayers.Events(this,this.div,this.EVENT_TYPES);}},destroy:function(setNewBaseLayer){if(setNewBaseLayer==null){setNewBaseLayer=true;} -if(this.map!=null){this.map.removeLayer(this,setNewBaseLayer);} -this.map=null;this.name=null;this.div=null;this.options=null;if(this.events){this.events.destroy();} -this.events=null;},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer(this.name,this.options);} -OpenLayers.Util.applyDefaults(obj,this);obj.map=null;return obj;},setName:function(newName){if(newName!=this.name){this.name=newName;if(this.map!=null){this.map.events.triggerEvent("changelayer");}}},addOptions:function(newOptions){if(this.options==null){this.options=new Object();} -OpenLayers.Util.extend(this.options,newOptions);OpenLayers.Util.extend(this,newOptions);},onMapResize:function(){},moveTo:function(bounds,zoomChanged,dragging){var display=this.visibility;if(!this.isBaseLayer){display=display&&this.inRange;} -this.display(display);},setMap:function(map){if(this.map==null){this.map=map;this.maxExtent=this.maxExtent||this.map.maxExtent;this.projection=this.projection||this.map.projection;this.units=this.units||this.map.units;this.initResolutions();if(!this.isBaseLayer){this.inRange=this.calculateInRange();var show=((this.visibility)&&(this.inRange));this.div.style.display=show?"":"none";} -this.setTileSize();}},setTileSize:function(size){var tileSize=(size)?size:((this.tileSize)?this.tileSize:this.map.getTileSize());this.tileSize=tileSize;if(this.gutter){this.imageOffset=new OpenLayers.Pixel(-this.gutter,-this.gutter);this.imageSize=new OpenLayers.Size(tileSize.w+(2*this.gutter),tileSize.h+(2*this.gutter));}else{this.imageSize=tileSize;this.imageOffset=new OpenLayers.Pixel(0,0);}},getVisibility:function(){return this.visibility;},setVisibility:function(visibility,noEvent){if(visibility!=this.visibility){this.visibility=visibility;this.display(visibility);if(visibility&&this.map!=null){var extent=this.map.getExtent();if(extent!=null){this.moveTo(extent,true);}} -if((this.map!=null)&&((noEvent==null)||(noEvent==false))){this.map.events.triggerEvent("changelayer");}}},display:function(display){if(display!=(this.div.style.display!="none")){this.div.style.display=(display)?"block":"none";}},calculateInRange:function(){var inRange=false;if(this.map){var resolution=this.map.getResolution();inRange=((resolution>=this.minResolution)&&(resolution<=this.maxResolution));} -return inRange;},setIsBaseLayer:function(isBaseLayer){if(isBaseLayer!=this.isBaseLayer){this.isBaseLayer=isBaseLayer;if(this.map!=null){this.map.events.triggerEvent("changelayer");}}},initResolutions:function(){var props=new Array('projection','units','scales','resolutions','maxScale','minScale','maxResolution','minResolution','minExtent','maxExtent','numZoomLevels','maxZoomLevel');var confProps=new Object();for(var i=0;i0){this.removeMarker(this.markers[0]);}}},redraw:function(){for(i=0;i-1){this.unselect(feature);}else{this.select(feature);}}else{if(OpenLayers.Util.indexOf(this.layer.selectedFeatures,feature)>-1){this.unselect(feature);}else{if(this.layer.selectedFeatures){for(var i=0;i-1)){this.select(feature);}},outFeature:function(feature){if(!this.hover){return;} -this.unselect(feature);},select:function(feature){if(feature.originalStyle==null){feature.originalStyle=feature.style;} -this.layer.selectedFeatures.push(feature);this.layer.drawFeature(feature,this.selectStyle);this.onSelect(feature);},unselect:function(feature){if(feature.originalStyle==null){feature.originalStyle=feature.style;} -this.layer.drawFeature(feature,feature.originalStyle);OpenLayers.Util.removeItem(this.layer.selectedFeatures,feature);this.onUnselect(feature);},setMap:function(map){this.handler.setMap(map);OpenLayers.Control.prototype.setMap.apply(this,arguments);},CLASS_NAME:"OpenLayers.Control.SelectFeature"});OpenLayers.Format.KML=OpenLayers.Class.create();OpenLayers.Format.KML.prototype=OpenLayers.Class.inherit(OpenLayers.Format,{featureNS:"http://mapserver.gis.umn.edu/mapserver",collectionName:"FeatureCollection",kmlns:"http://earth.google.com/kml/2.0",read:function(data){if(typeof data=="string"){data=OpenLayers.parseXMLString(data);} -var featureNodes=OpenLayers.Ajax.getElementsByTagNameNS(data,this.kmlns,"","Placemark");var features=[];for(var i=0;i0){var location=point[0].firstChild.nodeValue.split(" ");if(location.length!=2){var location=point[0].firstChild.nodeValue.split(",");}}else if(lat.length>0&&lon.length>0){var location=[parseFloat(lat[0].firstChild.nodeValue),parseFloat(lon[0].firstChild.nodeValue)];}else{continue;} -location=new OpenLayers.LonLat(parseFloat(location[1]),parseFloat(location[0]));var title="Untitled";try{title=OpenLayers.Util.getNodes(itemlist[i],"title")[0].firstChild.nodeValue;} -catch(e){title="Untitled";} -var descr_nodes=null;try{descr_nodes=itemlist[i].getElementsByTagNameNS("*","description");} -catch(e){descr_nodes=itemlist[i].getElementsByTagName("description");} -if(descr_nodes.length==0){try{descr_nodes=itemlist[i].getElementsByTagNameNS("*","summary");} -catch(e){descr_nodes=itemlist[i].getElementsByTagName("summary");}} -var description="No description.";try{description=descr_nodes[0].firstChild.nodeValue;} -catch(e){description="No description.";} -try{var link=OpenLayers.Util.getNodes(itemlist[i],"link")[0].firstChild.nodeValue;} -catch(e){try{var link=OpenLayers.Util.getNodes(itemlist[i],"link")[0].getAttribute("href");} -catch(e){}} -data.icon=OpenLayers.Marker.defaultIcon();data.popupSize=new OpenLayers.Size(250,120);if((title!=null)&&(description!=null)){contentHTML='
[x]
';contentHTML+='
';contentHTML+='
';contentHTML+=description;contentHTML+='
';data['popupContentHTML']=contentHTML;} -var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();marker.events.register('click',feature,this.markerClick);this.addMarker(marker);}},markerClick:function(evt){sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0;i0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.GeoRSS"});OpenLayers.Layer.Google=OpenLayers.Class.create();OpenLayers.Layer.Google.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.EventPane,OpenLayers.Layer.FixedZoomLevels,{MIN_ZOOM_LEVEL:0,MAX_ZOOM_LEVEL:19,RESOLUTIONS:[1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,.00002145767211914062,.00001072883605957031,.00000536441802978515,.00000268220901489257],type:null,initialize:function(name,options){OpenLayers.Layer.EventPane.prototype.initialize.apply(this,arguments);OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this,arguments);this.addContainerPxFunction();},loadMapObject:function(){try{this.mapObject=new GMap2(this.div);var poweredBy=this.div.lastChild;this.div.removeChild(poweredBy);this.pane.appendChild(poweredBy);poweredBy.className="olLayerGooglePoweredBy gmnoprint";poweredBy.style.left="";poweredBy.style.bottom="";var termsOfUse=this.div.lastChild;this.div.removeChild(termsOfUse);this.pane.appendChild(termsOfUse);termsOfUse.className="olLayerGoogleCopyright";termsOfUse.style.right="";termsOfUse.style.bottom="";}catch(e){}},setMap:function(map){OpenLayers.Layer.EventPane.prototype.setMap.apply(this,arguments);if(this.type!=null){this.map.events.register("moveend",this,this.setMapType);}},setMapType:function(){if(this.mapObject.getCenter()!=null){this.mapObject.setMapType(this.type);this.map.events.unregister("moveend",this,this.setMapType);}},onMapResize:function(){this.mapObject.checkResize();},getOLBoundsFromMapObjectBounds:function(moBounds){var olBounds=null;if(moBounds!=null){var sw=moBounds.getSouthWest();var ne=moBounds.getNorthEast();olBounds=new OpenLayers.Bounds(sw.lng(),sw.lat(),ne.lng(),ne.lat());} -return olBounds;},getMapObjectBoundsFromOLBounds:function(olBounds){var moBounds=null;if(olBounds!=null){var sw=new GLatLng(olBounds.bottom,olBounds.left);var ne=new GLatLng(olBounds.top,olBounds.right);moBounds=new GLatLngBounds(sw,ne);} -return moBounds;},addContainerPxFunction:function(){if(typeof GMap2!="undefined"&&!GMap2.fromLatLngToContainerPixel){GMap2.prototype.fromLatLngToContainerPixel=function(gLatLng){var gPoint=this.fromLatLngToDivPixel(gLatLng);var div=this.b.firstChild.firstChild;gPoint.x+=div.offsetLeft;gPoint.y+=div.offsetTop;return gPoint;};}},getWarningHTML:function(){var html="";html+="The Google Layer was unable to load correctly.
";html+="
";html+="To get rid of this message, select a new BaseLayer " -html+="in the layer switcher in the upper-right corner.
";html+="
";html+="Most likely, this is because the Google Maps library";html+=" script was either not included, or does not contain the";html+=" correct API key for your site.
";html+="
";html+="Developers: For help getting this working correctly, ";html+="-this.tileSize.w*(buffer-1)){this.shiftColumn(true);}else if(tlViewPort.x<-this.tileSize.w*buffer){this.shiftColumn(false);}else if(tlViewPort.y>-this.tileSize.h*(buffer-1)){this.shiftRow(true);}else if(tlViewPort.y<-this.tileSize.h*buffer){this.shiftRow(false);}else{break;}};if(this.buffer==0){for(var r=0,rl=this.grid.length;r=bounds.bottom-tilelat*this.buffer)||rowidxrowidx){var row=this.grid.pop();for(var i=0,l=row.length;icolidx){for(var i=0,l=this.grid.length;i=0)&&(testCell=0)){tile=this.grid[testRow][testCell];} -if((tile!=null)&&(!tile.queued)){tileQueue.unshift(tile);tile.queued=true;directionsTried=0;iRow=testRow;iCell=testCell;}else{direction=(direction+1)%4;directionsTried++;}} -for(var i=0;i'+title+'

'+description+'

';} -var feature=new OpenLayers.Feature(this,location,data);this.features.push(feature);var marker=feature.createMarker();if((title!=null)&&(description!=null)){marker.events.register('click',feature,this.markerClick);} -this.addMarker(marker);}}}}},markerClick:function(evt){sameMarkerClicked=(this==this.layer.selectedFeature);this.layer.selectedFeature=(!sameMarkerClicked)?this:null;for(var i=0;i0){var feature=this.features[0];OpenLayers.Util.removeItem(this.features,feature);feature.destroy();}}},CLASS_NAME:"OpenLayers.Layer.Text"});OpenLayers.Layer.Vector=OpenLayers.Class.create();OpenLayers.Layer.Vector.prototype=OpenLayers.Class.inherit(OpenLayers.Layer,{isBaseLayer:false,isFixed:false,isVector:true,features:null,selectedFeatures:null,reportError:true,style:null,renderers:['SVG','VML'],renderer:null,geometryType:null,drawn:false,initialize:function(name,options){var defaultStyle=OpenLayers.Feature.Vector.style['default'];this.style=OpenLayers.Util.extend({},defaultStyle);OpenLayers.Layer.prototype.initialize.apply(this,arguments);if(!this.renderer||!this.renderer.supported()){this.assignRenderer();} -if(!this.renderer||!this.renderer.supported()){this.renderer=null;this.displayError();} -this.features=new Array();this.selectedFeatures=new Array();},destroy:function(){OpenLayers.Layer.prototype.destroy.apply(this,arguments);this.destroyFeatures();this.features=null;this.selectedFeatures=null;if(this.renderer){this.renderer.destroy();} -this.renderer=null;this.geometryType=null;this.drawn=null;},assignRenderer:function(){for(var i=0;i=0;i--){var feature=features[i];this.features=OpenLayers.Util.removeItem(this.features,feature);if(feature.geometry){this.renderer.eraseGeometry(feature.geometry);} -if(OpenLayers.Util.indexOf(this.selectedFeatures,feature)!=-1){OpenLayers.Util.removeItem(this.selectedFeatures,feature);}}},destroyFeatures:function(){this.selectedFeatures=new Array();for(var i=this.features.length-1;i>=0;i--){this.features[i].destroy();}},drawFeature:function(feature,style){if(style==null){if(feature.style){style=feature.style;}else{style=this.style;}} -this.renderer.drawFeature(feature,style);},eraseFeatures:function(features){this.renderer.eraseFeatures(features);},getFeatureFromEvent:function(evt){var featureId=this.renderer.getFeatureIdFromEvent(evt);return this.getFeatureById(featureId);},getFeatureById:function(featureId){var feature=null;for(var i=0;i0){dim=coordNodes[0].getAttribute("srsDimension");} -this.dim=(dim=="3"||dim==3)?3:2;var features=[];for(var i=0;i0)){this.setBounds(this.components[0].getBounds());for(var i=1;i-1)){if(index!=null&&(index=bounds.bottom-tilelat*this.buffer) -this.spiralTileLoad();},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.KaMap(this.name,this.url,this.params,this.options);} -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);if(this.tileSize!=null){obj.tileSize=this.tileSize.clone();} -obj.grid=new Array();return obj;},CLASS_NAME:"OpenLayers.Layer.KaMap"});OpenLayers.Layer.MapServer=OpenLayers.Class.create();OpenLayers.Layer.MapServer.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Grid,{DEFAULT_PARAMS:{mode:"map",map_imagetype:"png"},initialize:function(name,url,params,options){var newArguments=new Array();newArguments.push(name,url,params,options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);if(arguments.length>0){OpenLayers.Util.applyDefaults(this.params,this.DEFAULT_PARAMS);} -if(options==null||options.isBaseLayer==null){this.isBaseLayer=((this.params.transparent!="true")&&(this.params.transparent!=true));}},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.MapServer(this.name,this.url,this.params,this.options);} -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},getURL:function(bounds){if(this.gutter){bounds=this.adjustBoundsByGutter(bounds);} -var extent=[bounds.left,bounds.bottom,bounds.right,bounds.top];var url=this.getFullRequestString({mapext:extent,imgext:extent,map_size:[this.imageSize.w,this.imageSize.h],imgx:this.imageSize.w/2,imgy:this.imageSize.h/2,imgxy:[this.imageSize.w,this.imageSize.h]});return url;},getFullRequestString:function(newParams,altUrl){var url=(altUrl==null)?this.url:altUrl;if(typeof url=="object"){url=url[Math.floor(Math.random()*url.length)];} -var requestString=url;var allParams=OpenLayers.Util.extend(new Object(),this.params);allParams=OpenLayers.Util.extend(allParams,newParams);var urlParams=OpenLayers.Util.upperCaseObject(OpenLayers.Util.getArgs(url));for(var key in allParams){if(key.toUpperCase()in urlParams){delete allParams[key];}} -var paramsString=OpenLayers.Util.getParameterString(allParams);paramsString=paramsString.replace(/,/g,"+");if(paramsString!=""){var lastServerChar=url.charAt(url.length-1);if((lastServerChar=="&")||(lastServerChar=="?")){requestString+=paramsString;}else{if(url.indexOf('?')==-1){requestString+='?'+paramsString;}else{requestString+='&'+paramsString;}}} -return requestString;},CLASS_NAME:"OpenLayers.Layer.MapServer"});OpenLayers.Layer.TMS=OpenLayers.Class.create();OpenLayers.Layer.TMS.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Grid,{reproject:false,isBaseLayer:true,tileOrigin:null,initialize:function(name,url,options){var newArguments=new Array();newArguments.push(name,url,{},options);OpenLayers.Layer.Grid.prototype.initialize.apply(this,newArguments);},destroy:function(){OpenLayers.Layer.Grid.prototype.destroy.apply(this,arguments);},clone:function(obj){if(obj==null){obj=new OpenLayers.Layer.TMS(this.name,this.url,this.options);} -obj=OpenLayers.Layer.Grid.prototype.clone.apply(this,[obj]);return obj;},getURL:function(bounds){var res=this.map.getResolution();var x=(bounds.left-this.tileOrigin.lon)/(res*this.tileSize.w);var y=(bounds.bottom-this.tileOrigin.lat)/(res*this.tileSize.h);var z=this.map.getZoom();var path="1.0.0"+"/"+this.layername+"/"+z+"/"+x+"/"+y+"."+this.type;var url=this.url;if(url instanceof Array){url=this.selectUrl(path,url);} -return url+path;},addTile:function(bounds,position){var url=this.getURL(bounds);return new OpenLayers.Tile.Image(this,position,bounds,url,this.tileSize);},setMap:function(map){OpenLayers.Layer.Grid.prototype.setMap.apply(this,arguments);if(!this.tileOrigin){this.tileOrigin=new OpenLayers.LonLat(this.map.maxExtent.left,this.map.maxExtent.bottom);}},CLASS_NAME:"OpenLayers.Layer.TMS"});OpenLayers.Layer.WFS=OpenLayers.Class.create();OpenLayers.Layer.WFS.prototype=OpenLayers.Class.inherit(OpenLayers.Layer.Vector,OpenLayers.Layer.Markers,{isBaseLayer:false,ratio:2,DEFAULT_PARAMS:{service:"WFS",version:"1.0.0",request:"GetFeature"},featureClass:null,vectorMode:true,initialize:function(name,url,params,options){if(options==undefined){options={};} -if(options.featureClass||!OpenLayers.Layer.Vector||!OpenLayers.Feature.Vector){this.vectorMode=false;} -OpenLayers.Util.extend(options,{'reportError':false});var newArguments=new Array() -newArguments.push(name,options);OpenLayers.Layer.Vector.prototype.initialize.apply(this,newArguments);if(!this.renderer||!this.vectorMode){this.vectorMode=false;if(!options.featureClass){options.featureClass=OpenLayers.Feature.WFS;} -OpenLayers.Layer.Markers.prototype.initialize.apply(this,newArguments);} -if(this.params&&this.params.typename&&!this.options.typename){this.options.typename=this.params.typename;} -if(!this.options.geometry_column){this.options.geometry_column="the_geom";} -this.params=params;OpenLayers.Util.applyDefaults(this.params,OpenLayers.Util.upperCaseObject(this.DEFAULT_PARAMS));this.url=url;},destroy:function(){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.destroy.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.destroy.apply(this,arguments);}},setMap:function(map){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.setMap.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.setMap.apply(this,arguments);}},moveTo:function(bounds,zoomChanged,dragging){if(this.vectorMode){OpenLayers.Layer.Vector.prototype.moveTo.apply(this,arguments);}else{OpenLayers.Layer.Markers.prototype.moveTo.apply(this,arguments);} -if(dragging){return false;} -if(zoomChanged){if(this.vectorMode){this.renderer.clear();}} -if(this.options.minZoomLevel&&this.map.getZoom()0)){area+=Math.abs(this.components[0].getArea());for(var i=1;i1)){for(var i=1;i2)){OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);}},CLASS_NAME:"OpenLayers.Geometry.LineString"});OpenLayers.Geometry.LinearRing=OpenLayers.Class.create();OpenLayers.Geometry.LinearRing.prototype=OpenLayers.Class.inherit(OpenLayers.Geometry.LineString,{componentTypes:["OpenLayers.Geometry.Point"],initialize:function(points){OpenLayers.Geometry.LineString.prototype.initialize.apply(this,arguments);},addComponent:function(point,index){var added=false;var lastPoint=this.components[this.components.length-1];OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,[lastPoint]);if(index!=null||!point.equals(lastPoint)){added=OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,arguments);} -var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint.clone()]);return added;},removeComponent:function(point){if(this.components.length>4){var lastPoint=this.components[this.components.length-1];OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,[lastPoint]);OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this,arguments);var firstPoint=this.components[0];OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,[firstPoint.clone()]);}},getArea:function(){var area=0.0;if(this.components&&(this.components.length>2)){var sum=0.0;for(var i=0;i 1: - configFilename = sys.argv[1] + ".cfg" -if len(sys.argv) > 2: - outputFilename = sys.argv[2] - -print "Merging libraries." -merged = mergejs.run(sourceDirectory, None, configFilename) -print "Compressing." -minimized = jsmin.jsmin(merged) -print "Adding license file." -minimized = file("license.txt").read() + minimized - -print "Writing to %s." % outputFilename -file(outputFilename, "w").write(minimized) - -print "Done." diff --git a/pacotes/openlayers/build/build.sh b/pacotes/openlayers/build/build.sh deleted file mode 100644 index 38eaf02..0000000 --- a/pacotes/openlayers/build/build.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -# -# Script to build compressed single file version of OpenLayers library -# - -OUTPUT_FILENAME=OpenLayers.js -TMP_OUTPUT_FILENAME=tmp.${OUTPUT_FILENAME} - -TOOLS_DIR=../tools - -CFG_FILENAME=library.cfg - -SRC_DIR=../lib - -CMD_MERGE_JS=${TOOLS_DIR}/mergejs.py - -CMD_SHRINKSAFE=${TOOLS_DIR}/shrinksafe.py -CMD_JSMIN=${TOOLS_DIR}/jsmin.py - -LICENSE_HEADER_FILENAME=license.txt - - -## Generate "fat" single file library version -${CMD_MERGE_JS} -c ${CFG_FILENAME} ${TMP_OUTPUT_FILENAME} ${SRC_DIR} - - -## Compress ("shrink") the single file library version - -echo -echo Shrinking and post-processing... -# (We also append the license header here.) -cat ${LICENSE_HEADER_FILENAME} > ${OUTPUT_FILENAME} -${CMD_JSMIN} <${TMP_OUTPUT_FILENAME} >> ${OUTPUT_FILENAME} - -echo Cleaning up... -rm $TMP_OUTPUT_FILENAME - -echo -echo Done. diff --git a/pacotes/openlayers/build/buildUncompressed.py b/pacotes/openlayers/build/buildUncompressed.py deleted file mode 100644 index 7f96316..0000000 --- a/pacotes/openlayers/build/buildUncompressed.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python - -import sys -sys.path.append("../tools") - -import jsmin, mergejs - -sourceDirectory = "../lib" -configFilename = "library.cfg" -outputFilename = "OpenLayers.js" - -if len(sys.argv) > 1: - configFilename = sys.argv[1] + ".cfg" -if len(sys.argv) > 2: - outputFilename = sys.argv[2] - -print "Merging libraries." -merged = mergejs.run(sourceDirectory, None, configFilename) -print "Adding license file." -merged = file("license.txt").read() + merged - -print "Writing to %s." % outputFilename -file(outputFilename, "w").write(merged) - -print "Done." diff --git a/pacotes/openlayers/build/docs.sh b/pacotes/openlayers/build/docs.sh deleted file mode 100644 index 79df71c..0000000 --- a/pacotes/openlayers/build/docs.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -rm ../doc/reference.html -CLASSES="Map Layer Layer.Image Layer.HTTPRequest Layer.Grid Layer.WMS Layer.KaMap Layer.EventPane Layer.Google Layer.VirtualEarth Layer.Markers Layer.Text Layer.GeoRSS Layer.Boxes Layer.TMS Icon Marker Marker.Box Tile Tile.Image Tile.WFS Control Control.LayerSwitcher Control.MouseDefaults Control.MousePosition Control.MouseToolbar Control.OverviewMap Control.PanZoom Control.PanZoomBar Control.Permalink Control.Scale LonLat Size Pixel Bounds Util Ajax" -echo " - - OpenLayers Class Reference Documentation - - - " >> ../doc/reference.html - -for i in $CLASSES; do -echo "
" >> ../doc/reference.html -done - -echo "
" >> ../doc/reference.html - -for i in $CLASSES; do -cat ../doc/$i.txt | \ -perl -pe 's!^(.*?) -- (.*?) -- (.*?)$! $1$2$3!g; - s!^( \* )?(.*?) -- (.*?)$! $2$3!g; - s!^ \* (.*)$! \n\n

$1

\n !; - s!{OpenLayers.(.*?)\|(.*?)}!\2!g; - s!{OpenLayers.(.*?)}!OpenLayers.$1!; - s!{([A-Za-z]+?)\|(.+?)}!\2<\/span>!g; - s!{([A-Za-z]+?)}!$1<\/span>!g; - s!^\* (.*)$!
\n

$1

\n!; - s!^OpenLayers\.(.*)$!

OpenLayers.$1

!' \ ->> ../doc/reference.html -echo '
' >> ../doc/reference.html -done -echo " -" >> ../doc/reference.html diff --git a/pacotes/openlayers/build/full.cfg b/pacotes/openlayers/build/full.cfg deleted file mode 100644 index 305d4b4..0000000 --- a/pacotes/openlayers/build/full.cfg +++ /dev/null @@ -1,12 +0,0 @@ -[first] -OpenLayers/SingleFile.js -OpenLayers.js -OpenLayers/BaseTypes.js -OpenLayers/Util.js -Rico/Corner.js - -[last] - -[include] - -[exclude] diff --git a/pacotes/openlayers/build/library.cfg b/pacotes/openlayers/build/library.cfg deleted file mode 100644 index 5397cff..0000000 --- a/pacotes/openlayers/build/library.cfg +++ /dev/null @@ -1,47 +0,0 @@ -[first] -OpenLayers/SingleFile.js -OpenLayers.js -OpenLayers/BaseTypes.js -OpenLayers/Util.js -Rico/Corner.js - -[last] - -[include] - -[exclude] -OpenLayers/Format/GeoRSS.js -OpenLayers/Format/GML.js -OpenLayers/Format/WKT.js -OpenLayers/Format/KML.js -OpenLayers/Format/WFS.js -OpenLayers/Format.js -OpenLayers/Handler/Path.js -OpenLayers/Handler/Point.js -OpenLayers/Handler/Polygon.js -OpenLayers/Handler/Select.js -OpenLayers/Geometry/Collection.js -OpenLayers/Geometry/Curve.js -OpenLayers/Geometry/LinearRing.js -OpenLayers/Geometry/LineString.js -OpenLayers/Geometry/MultiLineString.js -OpenLayers/Geometry/MultiPoint.js -OpenLayers/Geometry/MultiPolygon.js -OpenLayers/Geometry/Point.js -OpenLayers/Geometry/Polygon.js -OpenLayers/Geometry/Rectangle.js -OpenLayers/Geometry/Surface.js -OpenLayers/Geometry.js -OpenLayers/Layer/GML.js -OpenLayers/Layer/Vector.js -OpenLayers/Control/DrawFeature.js -OpenLayers/Control/EditingToolbar.js -OpenLayers/Control/SelectFeature.js -OpenLayers/Feature/Vector.js -OpenLayers/Renderer -OpenLayers/Renderer/Elements.js -OpenLayers/Renderer/SVG.js -OpenLayers/Renderer/VML.js -OpenLayers/Renderer.js - - diff --git a/pacotes/openlayers/build/license.txt b/pacotes/openlayers/build/license.txt deleted file mode 100644 index e25b7a0..0000000 --- a/pacotes/openlayers/build/license.txt +++ /dev/null @@ -1,45 +0,0 @@ -/* - - OpenLayers.js -- OpenLayers Map Viewer Library - - Copyright 2005-2006 MetaCarta, Inc., released under the BSD license. - Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt - for the full text of the license. - - Includes compressed code under the following licenses: - - (For uncompressed versions of the code used please see the - OpenLayers SVN repository: ) - -*/ - -/* Contains portions of Prototype.js: - * - * Prototype JavaScript framework, version 1.4.0 - * (c) 2005 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -/** -* -* Contains portions of Rico -* -* Copyright 2005 Sabre Airline Solutions -* -* 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 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -* implied. See the License for the specific language governing -* permissions and limitations under the License. -* -**/ - diff --git a/pacotes/openlayers/build/lite.cfg b/pacotes/openlayers/build/lite.cfg deleted file mode 100644 index 4518c47..0000000 --- a/pacotes/openlayers/build/lite.cfg +++ /dev/null @@ -1,20 +0,0 @@ -[first] -OpenLayers/SingleFile.js -OpenLayers.js -OpenLayers/BaseTypes.js -OpenLayers/Util.js - -[last] - -[include] -OpenLayers/Events.js -OpenLayers/Map.js -OpenLayers/Layer.js -OpenLayers/Layer/Grid.js -OpenLayers/Layer/HTTPRequest.js -OpenLayers/Layer/WMS.js -OpenLayers/Layer/WMS/Untiled.js -OpenLayers/Tile.js -OpenLayers/Tile/Image.js - -[exclude] diff --git a/pacotes/openlayers/doc/Ajax.txt b/pacotes/openlayers/doc/Ajax.txt deleted file mode 100644 index 18fdf60..0000000 --- a/pacotes/openlayers/doc/Ajax.txt +++ /dev/null @@ -1,9 +0,0 @@ -OpenLayers contains a number of helper functions for working with AJAX. - -* Methods - OpenLayers.loadURL({String|uri}, {String|params}, {Object|caller}, {function|onComplete}, {function|onFailure}) -- none -- This function sends an XMLHTTPRequest to a remote site, specified by URI, with the params string given as the params argument. Caller is bound as 'this' to the function specified by either onComplete or onFailure. - OpenLayers.parseXMLString({String|text}) -- {AJAXResponse} -- Accepts a block of text, and creates a DOM response document from the text. - -* Parameters - OpenLayers.ProxyHost -- When initiating an AJAX request, any URL that is absolute is prefixed with OpenLayers.ProxyHost. The ProxyHost is designed to accept a URL and return the content, in an effort to work around cross-browser security restrictions. This defaults to null, but if you wish to access content from another domain that Javascript would restrict access to, you must set this to be the URL which will accept a URL encoded version of the passed URL and return the content at that URL. An example is available as proxy.txt in the examples/ directory. - diff --git a/pacotes/openlayers/doc/Bounds.txt b/pacotes/openlayers/doc/Bounds.txt deleted file mode 100644 index 3cac821..0000000 --- a/pacotes/openlayers/doc/Bounds.txt +++ /dev/null @@ -1,21 +0,0 @@ -OpenLayers.Bounds - -This class represents a bounding box. Data stores as left, bottom, right, top floats. - -* Constructor - OpenLayers.Bounds(left, bottom, right, top) -- Create new Bounds. - -* Methods - clone() -- {OpenLayers.Bounds} -- Return copy of the current bounds. - toString() -- {String} -- Return bounds as string. - toBBOX() -- {String} -- Return bounds as simple string, usable for WMS. - getWidth() -- {float} -- Return width of bounds. - getHeight() -- {float} -- Return height of bounds. - getSize() -- {OpenLayers.Size} -- Return size of bounds. - getCenterPixel() -- {OpenLayers.Pixel} -- Return center of bounds as pixel. - getCenterLonLat() -- {OpenLayers.LonLat} -- Return center of bounds as LonLat. - equals({OpenLayers.Bounds|bounds}) -- {Boolean} -- whether or not the bounds are equivilant. - add({float|x}, {float|y}) -- {OpenLayers.Bounds} -- Shift bounds by x and y. - contains({float|x}, {float|y}, {Boolean|inclusive}) -- {Boolean} -- Return Whether or not the passed-in coordinates are within this bounds - containsBounds({OpenLayers.Bounds|bounds}, {Boolean|partial}, {Boolean|inclusive}) -- {Boolean} -- Returns whether or not the passed-in OpenLayers.Bounds object is contained within this bounds. partial indicates whether bounds must be contained or only overlap. Inclusive determines whether border is included. - determineQuadrant({OpenLayers.LonLat|lonlat}) -- {String} -- Determine which quadrant the LonLat is in. Returns combination of "b" or "t" and "l" or "r". diff --git a/pacotes/openlayers/doc/Control.LayerSwitcher.txt b/pacotes/openlayers/doc/Control.LayerSwitcher.txt deleted file mode 100644 index b598888..0000000 --- a/pacotes/openlayers/doc/Control.LayerSwitcher.txt +++ /dev/null @@ -1,14 +0,0 @@ -OpenLayers.Control.LayerSwitcher - -This control will by default display a small image in the upper right corner of the map. When clicked, this image expands into a control which allows one to select between multiple types of layers, seperated into two types: Base Layers and Overlays. Only one base layer can be selected at a time, and is enforced by a radio button control being used. Multiple overlays can be selected at once, and a checkbox control is visible for this functionality. -* Constructor - OpenLayers.Control.LayerSwitcher({Object|options}?) -- Creates a new control. - -* Methods - maximizeControl() -- none -- Expand the layer switcher control. - minimizeControl() -- none -- Close the layer switcher control. - -* Parameters - position -- (inherited from {OpenLayers.Control}) {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area. - activeColor -- The color to use for the background of the layer switcher div. - ascending -- Ascending determines whether layers are added to the layer switcher in ascending or descending order. If ascending is true, the lowest layer is appended to the list first. If ascending is false, the lowest layer is at the very bottom of the LayerSwitcher. Default is true. diff --git a/pacotes/openlayers/doc/Control.MouseDefaults.txt b/pacotes/openlayers/doc/Control.MouseDefaults.txt deleted file mode 100644 index 8a184c1..0000000 --- a/pacotes/openlayers/doc/Control.MouseDefaults.txt +++ /dev/null @@ -1,19 +0,0 @@ -OpenLayers.Control.MouseDefaults - -Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseDefaults, replacing the functions whose behavior you wish to change. - - -* Constructor - OpenLayers.Control() -- Creates a new control. No options available. - -* Methods - defaultClick -- none -- This event takes place when a click event occurs on the map. - defaultDblClick -- none -- This event re-centers the map on the clicked location. - defaultMouseDown -- none -- This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead. - defaultMouseMove -- none -- If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor. - defaultMouseUp -- none -- This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled. - defaultMouseOut -- none -- This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped. - defaultWheelUp -- none -- Zooms in one level. Called by onWheelEvent - defaultWheelDown -- none -- Zooms out one level. Called by onWheelEvent. - onWheelEvent -- none -- catches the map wheel event, and handles it, zooming appropriately. - diff --git a/pacotes/openlayers/doc/Control.MousePosition.txt b/pacotes/openlayers/doc/Control.MousePosition.txt deleted file mode 100644 index 3025453..0000000 --- a/pacotes/openlayers/doc/Control.MousePosition.txt +++ /dev/null @@ -1,32 +0,0 @@ -OpenLayers.Control.MousePosition - -A small control which displays the Longitude and Latitude of the current mouse position, by defualt in the lower right of the map viewport. - -* Constructor - OpenLayers.Control.MousePosition({Object|options}) -- Creates a new MousePosition control. - - -* Parameters - - element -- if not null, div in which to display the MousePosition - prefix -- html to precede the longitude value (default: '') - separator -- html to separate the longitude and latitude values (default: '
') - suffix -- html to follow the latitude value (default: '') - numdigits -- number of digits to the right of the decimal (default: 5) - granularity -- Don't refresh display if mouse has moved more than this (default: 10) - -prefix, separator, and suffix are used to format the lon/lat values. - -With: - prefix = 'Lon: ' - suffix = '
Lat: ' - suffix = '' - nudigits = 3 -Lon/Lat is displayed as: - Lon: 95.123 - Lat: 35.456 - -If the mouse has never been over the map, Lon/Lat will equal 0/0. If the mouse is over the map, Lon/Lat will equal the current mouse position. If the mouse has been moved off the map, Lon/Lat will equal the value displayed at the time the mouse was moved off the map. - -If the mouse is moving slowly, the Lon/Lat will refresh continuously. If the mouse is moving rapidly, the refresh of Lon/Lat will be suspended until the mouse has slowed down or stopped. (Trying to update the Lon/Lat value while the mouse is in rapid movemement makes the movement of the mouse unacceptably jerky.) - diff --git a/pacotes/openlayers/doc/Control.MouseToolbar.txt b/pacotes/openlayers/doc/Control.MouseToolbar.txt deleted file mode 100644 index 0534407..0000000 --- a/pacotes/openlayers/doc/Control.MouseToolbar.txt +++ /dev/null @@ -1,15 +0,0 @@ -OpenLayers.Control.MouseToolbar - -Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseToolbar, replacing the functions whose behavior you wish to change. Additionally, a toolbar of images can be clicked to start events, as well as using the keyboard shortcuts. Note that if you wish to use the MouseToolbar, you *must* add a 'controls' option to the map constructor, otherwise you will have both MouseDefaults and MouseToolbar on the map, which will not work. - -* Constructor - OpenLayers.Control.MouseToolbar({OpenLayers.Pixel|position}, {String|direction}) -- Creates a new control. The direction of the control can be either "vertical" or "horizontal". The default is vertical. - -* Methods - defaultClick -- none -- This event takes place when a click event occurs on the map. - defaultDblClick -- none -- This event re-centers the map on the clicked location. - defaultMouseDown -- none -- This event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead. - defaultMouseMove -- none -- If a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor. - defaultMouseUp -- none -- This function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled. - defaultMouseOut -- none -- This calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped. - diff --git a/pacotes/openlayers/doc/Control.OverviewMap.txt b/pacotes/openlayers/doc/Control.OverviewMap.txt deleted file mode 100644 index 9d2ed68..0000000 --- a/pacotes/openlayers/doc/Control.OverviewMap.txt +++ /dev/null @@ -1,38 +0,0 @@ -OpenLayers.Control.OverviewMap - -This control provides a locator or overview map linked to another map. By default, the overview map shows up in the lower right of the main map and can be expdaned with the '+' button. - -* Constructor - OpenLayers.Control.OverviewMap(opts?) -- Creates a new overview map. The opts variable is an object with various options, as described in the options section below. - -* Methods -isSuitableOverview() -- {Boolean} -- Determines if the overview map is suitable given the extent and resolution of the main map. -getRectPxBounds() -- {OpenLayers.Bounds|bounds} -- An OpenLayers.Bounds which is the extent rectangle's pixel bounds (relative to the parent element). -setRectPxBounds({OpenLayers.Bounds|bounds}) -- none -- Set extent rectangle pixel bounds. -getRectBoundsFromMapBounds({OpenLayers.Bounds|lonLatBounds}) -- {OpenLayers.Bounds|bounds} -- An OpenLayers.Bounds which is the passed-in map lon/lat extent translated into pixel bounds for the overview map. -getMapBoundsFromRectBounds({OpenLayers.Bounds|pxBounds]}) -- {OpenLayers.Bounds|bounds} -- An OpenLayers.Bounds which is the passed-in overview rect bounds translated into lon/lat bounds for the overview map. -getLonLatFromOverviewPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat|lonlat} -- An OpenLayers.LonLat which is the passed-in overview map OpenLayers.Pixel translated into lon/lat by the overview map. -getOverviewPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel|pixel} -- An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into overview map pixels - - -* Events - * Rectangle events -They are defined on OverviewMap.rectEvents - - mouseover -- rectangle is moused over - mouseout -- rectangle is no longer mousedout - mousemove -- mouse moves inside rectangle - mousedown -- mouse button is pressed over the rectangle. - mouseup -- mouse button is released over the rectangle. - click -- mouse clicked - dblclick -- mouse double clicked - - * Map events - They are defined on OverviewMap.mapDivEvents - - click -- mouse clicked - -* Options: - * minRatio -- The ratio of the overview map resolution to the main map resolution at which to zoom farther out on the overview map. - * maxRatio -- The ratio of the overview map resolution to the main map resolution at which to zoom farther in on the overview map. - * layers -- Ordered list of layers in the overview map. If none, then the map base layer is used. diff --git a/pacotes/openlayers/doc/Control.PanZoom.txt b/pacotes/openlayers/doc/Control.PanZoom.txt deleted file mode 100644 index 8de0dcb..0000000 --- a/pacotes/openlayers/doc/Control.PanZoom.txt +++ /dev/null @@ -1,9 +0,0 @@ -OpenLayers.Control.PanZoom - -Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and one button which zooms to the max extent of the map. - -* Constructor - OpenLayers.Control.PanZoom({Object|options}) -- Creates a new panzoom control. - -* Parameters - slideFactor -- Number of pixels by which to slide the map when a pan arrow is clicked. diff --git a/pacotes/openlayers/doc/Control.PanZoomBar.txt b/pacotes/openlayers/doc/Control.PanZoomBar.txt deleted file mode 100644 index a244c20..0000000 --- a/pacotes/openlayers/doc/Control.PanZoomBar.txt +++ /dev/null @@ -1,6 +0,0 @@ -OpenLayers.Control.PanZoomBar - -Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and a bar on which a slider can be moved to zoom in or out by multiple stops at once. - -* Constructor - OpenLayers.Control.PanZoomBar() -- Creates a new panzoombar control. diff --git a/pacotes/openlayers/doc/Control.Permalink.txt b/pacotes/openlayers/doc/Control.Permalink.txt deleted file mode 100644 index aa0a0b8..0000000 --- a/pacotes/openlayers/doc/Control.Permalink.txt +++ /dev/null @@ -1,6 +0,0 @@ -OpenLayers.Control.Permalink - -A small control which updates a "Permalink" to the map every time the viewport changes. This allows users to copy a link to a specfic map view. By default, it places itself in the lower right corner of the map. This control must be added to the map after a baselayer has been set. - -* Constructor - OpenLayers.Control.Scale({DOMElement|element}?, {String|base}) -- Creates a new permalink control. The DOMElement is used, if passed, as the element on which the 'href' is set. If you prefer to put this link on an element outside of the map, set this element to an anchor element to have its href updated when the map moves. If you wish to make the link go to some other URL (for example, an editing interface rather than the current URL), the 'base' property can be used, to which the ?lat=&lon=&zoom= will be appended after the map has moved. diff --git a/pacotes/openlayers/doc/Control.Scale.txt b/pacotes/openlayers/doc/Control.Scale.txt deleted file mode 100644 index b7facb1..0000000 --- a/pacotes/openlayers/doc/Control.Scale.txt +++ /dev/null @@ -1,6 +0,0 @@ -OpenLayers.Control.Scale - -A small control which displays an informative scale value, a la "1:50K" , by defualt in the lower right of the map viewport. - -* Constructor - OpenLayers.Control.Scale({DOMElement|element}?) -- Creates a new scale control. The DOMElement is used, if passed, to put the scale inside -- this allows you to have the scale displayed in some location outside the map. diff --git a/pacotes/openlayers/doc/Control.txt b/pacotes/openlayers/doc/Control.txt deleted file mode 100644 index a8e6432..0000000 --- a/pacotes/openlayers/doc/Control.txt +++ /dev/null @@ -1,9 +0,0 @@ -OpenLayers.Control - -Base class from which controls are derived. Controls are elements of the map used to control things like zoom, layer status, or to provide information to the user about the status of the map, such as scale or copyright information. - -* Constructor - OpenLayers.Control({Object|options}?) -- Creates a new control. The options here are used to control parameters of the control. The base control defines only "position", which is designed to be an {OpenLayers.Pixel} which is the top-left of the location of the control relative to the map div. - -* Parameters - position -- {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area. diff --git a/pacotes/openlayers/doc/Icon.txt b/pacotes/openlayers/doc/Icon.txt deleted file mode 100644 index 66b54ae..0000000 --- a/pacotes/openlayers/doc/Icon.txt +++ /dev/null @@ -1,9 +0,0 @@ -OpenLayers.Icon - -Icon is used as the visual representation of a Marker. Creating such a representation requres up to three parts: An Icon URL, a size, and an offset. The icon URL is a pointer to an image to use as an icon. The size is the size of the image, as an {OpenLayers.Size} object, and the offset is the position of the top left corner of the image in pixels, relative to the latitude and longitude of the Marker. - -* Constructor - OpenLayers.Icon({String|url}, {OpenLayers.Size|size}, {OpenLayers.Pixel|offset}) -- creates a new icon. - -* Methods - clone() -- {OpenLayers.Icon} -- Create an exact copy of the icon. diff --git a/pacotes/openlayers/doc/Layer.Boxes.txt b/pacotes/openlayers/doc/Layer.Boxes.txt deleted file mode 100644 index acf7b39..0000000 --- a/pacotes/openlayers/doc/Layer.Boxes.txt +++ /dev/null @@ -1,7 +0,0 @@ -OpenLayers.Layer.Boxes - -A subclass of the markers layer, this layer draws boxes using div elements -instead of icons using images. - -* Constructor - OpenLayers.Layer.Boxes(name, options) -- Same as OpenLayers.Layer.Markers. diff --git a/pacotes/openlayers/doc/Layer.EventPane.txt b/pacotes/openlayers/doc/Layer.EventPane.txt deleted file mode 100644 index ca75b46..0000000 --- a/pacotes/openlayers/doc/Layer.EventPane.txt +++ /dev/null @@ -1,6 +0,0 @@ -OpenLayers.Layer.EventPane - -Designed to act as a super-class for layers which need OpenLayers to intercept click events. Google Maps and Microsoft Virtual Earth both use this functionality, in order to allow for actions like the rubber-band-zoom/zoombox functionality. This Layer is not designed to be used on its own, but instead to act as an intermediary between the user and layers which have their own click handlers. - -* Constructor - OpenLayers.Layer.EventPane(name, options) -- Only designed to be used by subclasses. diff --git a/pacotes/openlayers/doc/Layer.GeoRSS.txt b/pacotes/openlayers/doc/Layer.GeoRSS.txt deleted file mode 100644 index 6f61629..0000000 --- a/pacotes/openlayers/doc/Layer.GeoRSS.txt +++ /dev/null @@ -1,12 +0,0 @@ -OpenLayers.Layer.GeoRSS - -GeoRSS layer. Pass a name and location of a GeoRSS file on the web, and a marker will be added to the map for each item in the GeoRSS feed. Uses OpenLayers.loadURL to load the XML, parses the data, and adds markers to the map. The GeoRSS layer supports 1.0 and 2.0 in IE and Firefox, and supports 2.0 in Safari. (Ticket #111 explains the reason for this difference.) - - -* Constructor - OpenLayers.Layer.GeoRSS(name, url) -- Name and location of GeoRSS XML file. - -* Methods - parseData(ajaxResponse) -- none -- Callback for the loadURL call. This function parses the XML for the GeoRSS feed, creating markers for the data and adding a popup to each marker. It populates an array of features as 'this.features'. - markerClick(Event) -- none -- Action to perform when a marker is clicked. - clearFeatures() -- none -- Removes all features and markers from the map. diff --git a/pacotes/openlayers/doc/Layer.Google.txt b/pacotes/openlayers/doc/Layer.Google.txt deleted file mode 100644 index a087317..0000000 --- a/pacotes/openlayers/doc/Layer.Google.txt +++ /dev/null @@ -1,16 +0,0 @@ -OpenLayers.Layer.Google - -The Google Layer in OpenLayers allows you to include Google Maps functionality in your OpenLayers maps. In order to use the Google Layer, you must first obtain an API key for Google Maps, and include the Google Maps API script in your page. Once you have done this, - -* Constructor - OpenLayers.Layer.Google(name, options?) -- Constructor for Google layer. Accepts name and options. - -* Methods - getOLLonLatFromGLatLng(GLonLat) -- {OpenLayers.LonLat} -- Convert from GLatLon to OpenLayers LonLat - getGLatLngFromOLLonLat({OpenLayers.LonLat|lonlat}) -- GLatLon -- Convert From OpenLayers LonLat to GLatLon - getOLPixelFromGPoint(GPoint) -- {OpenLayers.Pixel} -- Convert from GPoint to OpenLayers.Pixel - getGPointFromOLPixel({OpenLayers.Pixel|pixel}) -- GPoint -- Create GPoint from OpenLayers Pixel. - -* Parameters - type -- one of G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, used to choose the type of map to display. (See GMapType in the Google documentation for more.) - diff --git a/pacotes/openlayers/doc/Layer.Grid.txt b/pacotes/openlayers/doc/Layer.Grid.txt deleted file mode 100644 index c6ae0d9..0000000 --- a/pacotes/openlayers/doc/Layer.Grid.txt +++ /dev/null @@ -1,31 +0,0 @@ -OpenLayers.Layer.Grid - -The Grid layer is the base layer for almost all image layers. This is a subclass of HTTPRequest. - -* Constructor - OpenLayers.Layer.Grid(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer. - -* Methods - getGridBounds() -- {OpenLayers.Bounds} -- return geographic extent of the grid of tiles. - _initTiles() -- none -- Used to initialize the tile grid, creating image elements as neccesary and filling them with the correct images. - spiralTileLoad() -- none -- Called from _initTiles. Rotates through the grid filling in the images for the grid. - clone() -- {OpenLayers.Layer.Grid} -- create a clone of the layer. Subclassed from {OpenLayers.Layer}. - setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map. This is also where the tileSize is retrieved from the map. Subclassed from {OpenLayers.Layer}. - moveTo({OpenLayers.Bounds|bounds}, {Boolean|zoomChanged}) -- none -- Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location. Subclassed from {OpenLayers.Layer}. - getResolution() -- {float} -- Return the current resolution of the map, in units/pixel. Subclassed from {OpenLayers.Layer}. - getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport. Subclassed from {OpenLayers.Layer}. - getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds. Subclassed from {OpenLayers.Layer}. - getLonLatFromViewPortPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the layer. Subclassed from {OpenLayers.Layer}. - getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels. Subclassed from {OpenLayers.Layer}. - -* Parameters - buffer -- Default 2. Number of tiles around the central map area which OpenLayers will preload so that dragging goes more smoothly. - * Subclassed from OpenLayers.Layer - isBaseLayer -- This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false. - projection -- SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. - maxExtent -- an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. - maxResolution -- The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. - maxZoomLevel -- The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. - minScale -- The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. - maxScale -- The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map. - units -- The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map. diff --git a/pacotes/openlayers/doc/Layer.HTTPRequest.txt b/pacotes/openlayers/doc/Layer.HTTPRequest.txt deleted file mode 100644 index 39050d6..0000000 --- a/pacotes/openlayers/doc/Layer.HTTPRequest.txt +++ /dev/null @@ -1,13 +0,0 @@ -OpenLayers.Layer.HTTPRequest - -Sublass of Layer used for services which require initiating multiple HTTPRequests. - -* Constructor - OpenLayers.Layer.HTTPRequest(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer. - -* Methods - initResolutions() -- none -- Based on the current minScale/maxScale/maxResolution/numZoomLevel/scales/resolutions parameters, initializes an array of 'zoom levels' as this.resolutions, which are then used as an index into when zooming. - getFullRequestString(newParams) -- {String} -- Returns the full request string for a combination of the defaults on this layer and the parameters passed via newParams. - -* Options - reproject -- If reproject is true, then the layer will alter the bounding boxes of its tiles to be based on the geographic location of the pixel bounds in the base layer. This is important for reprojecting WMS tiles onto something like Google Maps. Tile locations are calculated, and then when creating the tile request, the bounding box is adjusted to match the bounding box of the base layer at that location. diff --git a/pacotes/openlayers/doc/Layer.Image.txt b/pacotes/openlayers/doc/Layer.Image.txt deleted file mode 100644 index bc78d05..0000000 --- a/pacotes/openlayers/doc/Layer.Image.txt +++ /dev/null @@ -1,9 +0,0 @@ -OpenLayers.Layer.Image - -The Image Layer allows you to load a single image and use it as a layer in your -map. - - -* Constructor - OpenLayers.Layer(name, url, {OpenLayers.Bounds|bounds}, {OpenLayers.Size|size}, {options}) -- Image Layer constructor requires a name, URL of the image, geographic bounds of the image, pixel size of the image, and an optional options parameter. - diff --git a/pacotes/openlayers/doc/Layer.KaMap.txt b/pacotes/openlayers/doc/Layer.KaMap.txt deleted file mode 100644 index da0ef22..0000000 --- a/pacotes/openlayers/doc/Layer.KaMap.txt +++ /dev/null @@ -1,7 +0,0 @@ -OpenLayers.Layer.KaMap - -ka-Map is a Mapserver wrapper which performs caching and works around many of the deficiencies with tiling when using Mapserver as a WMS client. - -* Construtor - OpenLayers.Layer.KaMap(name, url, params, options) -- URL is the url of the tile.php for KaMap. - diff --git a/pacotes/openlayers/doc/Layer.Markers.txt b/pacotes/openlayers/doc/Layer.Markers.txt deleted file mode 100644 index c79f892..0000000 --- a/pacotes/openlayers/doc/Layer.Markers.txt +++ /dev/null @@ -1,13 +0,0 @@ -OpenLayers.Layer.Markers - -The base class for all vector drawing, The OpenLayers.Layer.Markers layer is the primary way to get annotations into your map. - -* Constructor - OpenLayers.Layer.Markers(name, options) -- Name and options for layer. - -* Methods - addMarker({OpenLayers.Marker|Marker}) -- none -- Adds a marker to the layer, sets the map object on the marker, and calls drawMarker on the marker. - removeMarker({OpenLayers.Marker|Marker}) -- none -- Remove the marker from the layer and map. - clearMarkers() -- none -- Remove all markers from the layer with removeMarker. - redraw() -- none -- Redraw all markers. Used so that markers can change their position when a base layer changes. - drawMarker -- none -- Call marker.draw(px), which passes the Pixel of the latitude/longitude in the map viewport to the marker. adds the marker to the div, and marks the marker as drawn. diff --git a/pacotes/openlayers/doc/Layer.TMS.txt b/pacotes/openlayers/doc/Layer.TMS.txt deleted file mode 100644 index 3124848..0000000 --- a/pacotes/openlayers/doc/Layer.TMS.txt +++ /dev/null @@ -1,15 +0,0 @@ -OpenLayers.Layer.TMS - -The TMS layer allows one to connect to a TMS -- Tiled Map Service -- server to obtain images. - -* Constructor - OpenLayers.Layer.TMS(name, url, options) -- URL is the base URL to the layer. Options is a set of options, extending the parameters of the layer. - -* Methods - getURL({OpenLayers.Bounds|bounds}) -- {String} -- Returns a TMS URL for the given bounds based on the properties of the layer. - All other methods are inherited from {OpenLayers.Layer.Grid} - -* Options - tileOrigin -- The tileOrigin option will allow you to set your tileOrigin to something other than the lower left extent of your map. - layername -- Name of the layer in the TMS request. - type -- The extension images have. diff --git a/pacotes/openlayers/doc/Layer.Text.txt b/pacotes/openlayers/doc/Layer.Text.txt deleted file mode 100644 index 9e7871e..0000000 --- a/pacotes/openlayers/doc/Layer.Text.txt +++ /dev/null @@ -1,10 +0,0 @@ -OpenLayers.Layer.Text - -Subclass of Markers layer which retrieves CSV file from the web, and parses content to create markers and popups. - -* Constructor - OpenLayers.Layer.Text(name, options) -- Pass in name, and set location: 'URL of CSV file' in the options hash. - -* Methods - parseData(ajaxRequest) -- none -- Parses returned CSV file. - diff --git a/pacotes/openlayers/doc/Layer.VirtualEarth.txt b/pacotes/openlayers/doc/Layer.VirtualEarth.txt deleted file mode 100644 index 0876131..0000000 --- a/pacotes/openlayers/doc/Layer.VirtualEarth.txt +++ /dev/null @@ -1,14 +0,0 @@ -OpenLayers.Layer.VirtualEarth - -The Virtual Earth Layer in OpenLayers allows you to include Virtual Earth Maps in your OpenLayers maps. In order to use the Virtual Earth Layer, you must first include the Virtual Earth API script in your page. Once you have done this, simply add the layer to your map. - -* Constructor - OpenLayers.Layer.VirtualEarth(name) -- Constructor for Virtual Earth layer. Accepts name. - -* Methods - getOLLonLatFromVELatLng(VELatLon) -- {OpenLayers.LonLat} -- Convert from VELatLon to OpenLayers LonLat - getVELatLngFromOLLonLat({OpenLayers.LonLat|lonlat}) -- VELatLon -- Convert From OpenLayers LonLat to VELatLon - getOLPixelFromVEPoint(Msn.VE.Pixel) -- {OpenLayers.Pixel} -- Convert from VEPoint to OpenLayers.Pixel - getGPointFromOLPixel({OpenLayers.Pixel|pixel}) -- Msn.VE.Pixel -- Create Msvn.VE.Pixel from OpenLayers Pixel. - - diff --git a/pacotes/openlayers/doc/Layer.WMS.txt b/pacotes/openlayers/doc/Layer.WMS.txt deleted file mode 100644 index edf0da8..0000000 --- a/pacotes/openlayers/doc/Layer.WMS.txt +++ /dev/null @@ -1,15 +0,0 @@ -OpenLayers.Layer.WMS - -The WMS layer allows one to connect to a WMS server to obtain images. Params are available as a hash on the layer object, however, all keys are upper-cased automatically for maximum compatibility with WMS servers, so a parameter which is set as 'layers' will be uppercased to LAYERS. Where 'layer' is your Javscript variable for the layer, layer.params.LAYERS is the value of the layers param as set by the constructor. - -If you wish to change params, you should use mergeNewParams, rather than accessing the parameters directly. - -* Constructor - OpenLayers.Layer.WMS(name, url, params, options) -- URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer. - -* Methods - getURL({OpenLayers.Bounds|bounds}) -- {String} -- Returns a WMS URL for the given bounds based on the properties of the layer. - All other methods are inherited from {OpenLayers.Layer.Grid} - -* Options - isBaseLayer -- WMS layers default to being base layers unless one of their parameters is 'transparent':'true'. diff --git a/pacotes/openlayers/doc/Layer.txt b/pacotes/openlayers/doc/Layer.txt deleted file mode 100644 index 0f69c19..0000000 --- a/pacotes/openlayers/doc/Layer.txt +++ /dev/null @@ -1,40 +0,0 @@ -OpenLayers.Layer - -Layers are the most important and central aspect of OpenLayers. They are the -core functionality for the software: Everything that ends up on the map comes -from a layer. The base layer class is designed to be subclassed by any number -of different layers. - -* Constructor - OpenLayers.Layer(name, options) -- All layers have a name as their first param. This name is used to display the layer in the LayerSwitcher, and for other purposes. The options parameter is used to replace any parameters of the Layer which need to be different. - -* Methods - clone() -- {OpenLayers.Layer} -- create a clone of the layer. - setName({String|name}) -- none -- Set the name of the layer to something different. - moveTo({OpenLayers.Bounds|bounds}, {Boolean|zoomChanged}) -- none -- Not implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location. - setMap(map) -- none -- Set the map property of the layer. Also set the parameters which are inherited from the map. - getVisibility() -- {Boolean} -- Return true or false based on visibility of the layer. - setVisibility({Boolean|visible}) -- none -- Set the layer visibility, and trigger the appropriate events. - getResolution() -- {float} -- Return the current resolution of the map, in units/pixel. - getExtent() -- {OpenLayers.Bounds} -- Return the geographic extent of the current map viewport. - getZoomForExtent({OpenLayers.Bounds|bounds}) -- {Integer} -- return the integer zoom which most closely matches the passed bounds. - getLonLatFromViewPortPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the laye - getViewPortPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels - addOptions({options})) -- none -- Change the options on the layer. This is the supported way to change properties of the layer. - -* Parameters - displayOutsideMaxExtent -- Determine whether images or data are loaded outside the maxExtent. Default is false. - isBaseLayer -- This determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false. - projection -- SRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. - maxExtent -- an OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. - maxResolution -- The number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. - maxZoomLevel -- The maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map. - minScale -- The scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map. - maxScale -- The scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map. - units -- The units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map. - - - - - - diff --git a/pacotes/openlayers/doc/LonLat.txt b/pacotes/openlayers/doc/LonLat.txt deleted file mode 100644 index f70aa07..0000000 --- a/pacotes/openlayers/doc/LonLat.txt +++ /dev/null @@ -1,13 +0,0 @@ -OpenLayers.LonLat - -This class represents a geographic coordinate pair, either projected or unprojected. - -* Constructor - OpenLayers.LonLat({float|lon}, {float|lat}) -- Create LonLat. - -* Methods - toString() -- {String} -- Converts to human readable string. - toShortString() -- {String} -- Converts to short human readable string. - clone() -- {OpenLayers.Size} -- Returns a copy of the pixel. - equals({OpenLayers.LonLat|ll}) -- {Boolean} -- Compares two LonLats. - add({int|lon}, {int|lat}) -- {OpenLayers.LonLat} -- add x and y to the current coordinates. diff --git a/pacotes/openlayers/doc/Map.txt b/pacotes/openlayers/doc/Map.txt deleted file mode 100644 index a0f0e57..0000000 --- a/pacotes/openlayers/doc/Map.txt +++ /dev/null @@ -1,77 +0,0 @@ -OpenLayers.Map - -Instantiate class {OpenLayers.Map} in order to create a map. This is the central class in the API. Everything else is auxiliary. - -* Constructor - OpenLayers.Map(container, opts?) -- Creates a new map inside of the given HTML container, which is typically a DIV element. The opts variable is an object with various options, as described in the options section below. - -* Methods - * Layer Management - addLayer({OpenLayers.Layer|layer}) -- none -- adds a layer to the list currently set for the map. - addLayers([ {OpenLayers.Layer|layer}, {OpenLayers.Layer|layer} ]) -- none -- Adds multiple layers to a map. - removeLayer({OpenLayers.Layer|layer}) -- none -- Remove a layer from the map. - setBaseLayer({OpenLayers.Layer|layer}) -- none -- Sets a new base layer for the map. The provided layer should have already been added to the map. Changing the base layer causes all other base layers to be turned off, and all overlays to reproject themselves. - - * Control Management - addControl({OpenLayers.Control|control}) -- none -- Adds a control to the map. - - * Popup Management - addPopup({OpenLayers.Popup|popup}, {Boolean|exclusive}) -- none -- adds a popup to the map. If exclusive is set to true, then all other popups are closed first. - removePopup({OpenLayers.Popup|popup}) -- none -- removes an existing popup from the map. - - * Center management - setCenter({OpenLayers.LonLat|lonlat}, {int|zoom}) -- none -- Set the center point of the map. This then moves all the layers to the new center location as well, using each layer's 'moveTo' function. The 'zoom' is an integer from 0 to maxZoomLevel. - pan({Integer|dx}, {Integer|dy}) -- none -- Allows user to pan by a value of screen pixels - - * Zoom Management - zoomTo({int|zoom}) -- none -- zoom to the given zoom level. - zoomIn() -- none -- zoom in one level. - zoomOut() -- none -- zoom out one level. - zoomToExtent({OpenLayers.Bounds|bounds}) -- none -- Set the map such that the bounds fits within the current viewport area. - zoomToMaxExtent() -- none -- Zoom such that the entire bounds of the map is contained in the viewport. - zoomToScale({float}) -- none -- Zoom as close to the given scale as possible. Scale can be given as a ratio (1/24000) or as the denominator of the scale value (24000). zoomToScale will find the zoom level which most closely fits the requested scale and set that as the current zoom level. - - * Current Map Information - getLonLatFromPixel({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat} -- Returns OpenLayers.LonLat corresponding to the given OpenLayers.Pixel, translated into lon/lat by the current base layer - getPixelFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel} -- Returns OpenLayers.Pixel corresponding to the given OpenLayers.LonLat, translated by the current base layer - getCenter() -- {OpenLayers.LonLat} -- Returns a LonLat for the current center of the map - getZoom() -- {Integer} -- Returns the current zoom level as an integer - getExtent() -- {OpenLayers.Bounds} -- Returns a Bounds object which represents the geographic bounds of the current viewPort. - getSize() -- {OpenLayers.Pixel} -- Returns the pixel size of the current map window. - getTileSize() -- {OpenLayers.Size} -- Returns tile size currently set for map. - getResolution() -- {float} -- Returns the current resolution (units/pixel) of the map - getZoomForExtent({OpenLayers.Bounds|bounds}) -- Zoom level in which the given bounds will fit -- zooming to this level and setting the center of the map in the center of the bounds will always fit the given bounds in the map. - - * Default Map Information - getMaxResolution() -- {float} -- returns The Map's Maximum Resolution, the units/pixel at zoom level 0. The default is 1.40625, to match the approximate MaxResolution used by the commercial providers. - getMaxExtent() -- {OpenLayers.Bounds} -- Return the max extent of the current base layer as defined on the layer. The default maxExtent for OpenLayers is -180,-90,180,90 - getMaxZoomLevel() -- {int} -- Returns the maximum zoom level that can be reached in the map for the current base layer - getMinZoomLevel() -- {int} -- Returns the minimum zoom level that can be reached in the map for the current base layer - -* Events - addlayer -- a layer is added to the map - removelayer -- a layer is removed from the map - changelayer -- a layer has some property of it, typically visibility, changed. - changebaselayer -- the current base layer changes - movestart -- start of a movement in the map - move -- end of movement in a map. this happens while te mouse is dragging as well as for all other events. - moveend -- end of movement in a map, but does not happen when the 'dragging' flag is set, as is the case when the move event is in the middle of a drag action. - zoomend -- end of a zoom action - mouseover -- map is moused over - mouseout -- map is no longer mousedout - mousemove -- mouse moves inside map - dragstart -- drag action starts - dragend -- drag action ends - -* Options: - * controls -- an array of control objects to be added to the map. The default is [new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.PanZoom()] - * projection -- used by WMS layers, should be an SRS identifier. - * maxZoomLevel -- The number of zoom levels to use in the map. - * maxExtent -- {OpenLayers.Bounds} to be used as the maximum extent of a map. The center of the map can not leave the maxExtent of the map when dragging. - * maxResolution -- The units/pixel measurement at zoom level 0. Default is 1.40625 - * resolutions -- An array of resolutions to be used as an index when zooming. Overrides maxZoomLevel and maxResolution if present. - * minScale -- The smallest scale value. minScale is preferred over maxResolution, if present. - * maxScale -- The maximum scale the map should include. Overrides maxZoomLevel if present. - * units -- The units of the map. Defaults to degrees. Neccesary when using scale in any way. - * scales -- An array of scale values. Overrides maxResolution, maxZoomLevel, resolutions, and min/max scale if present. - diff --git a/pacotes/openlayers/doc/Marker.Box.txt b/pacotes/openlayers/doc/Marker.Box.txt deleted file mode 100644 index 4c2da0c..0000000 --- a/pacotes/openlayers/doc/Marker.Box.txt +++ /dev/null @@ -1,10 +0,0 @@ -OpenLayers.Marker.Box - -A different kind of Marker, designed to be added to a Boxes layer instead of a Markers layer. - -* Constructor - OpenLayers.Marker.Box({OpenLayers.Bounds|bounds}, borderColor, borderWidth) -- Set up a box. Defaults are red, with a width of 2. - -* Methods - setBorder(color, width) -- sets properties of border color and width. - diff --git a/pacotes/openlayers/doc/Marker.txt b/pacotes/openlayers/doc/Marker.txt deleted file mode 100644 index c48a509..0000000 --- a/pacotes/openlayers/doc/Marker.txt +++ /dev/null @@ -1,15 +0,0 @@ -OpenLayers.Marker - -Instantiate class {OpenLayers.Marker} in order to create a marker. - -* Constructor - OpenLayers.Marker({OpenLayers.LonLat|lonlat}, {OpenLayers.Icon|icon}? ) -- Creates a new marker object. This object must be added to a Marker layer and will then be displayed. The icon can be left null -- if this is the case, then the default OpenLayers icon will be used. - -* Methods - onScreen() -- {boolean} -- Returns whether or not the marker is currently visible on screen. - inflate({float}) -- none -- Changes the size of the Icon by a factor of the passed float. - display({string}) -- none -- Sets the style.display property of the Icon. - -* Events - Standard browser events are available. - diff --git a/pacotes/openlayers/doc/Pixel.txt b/pacotes/openlayers/doc/Pixel.txt deleted file mode 100644 index 72ec9cd..0000000 --- a/pacotes/openlayers/doc/Pixel.txt +++ /dev/null @@ -1,13 +0,0 @@ -OpenLayers.Pixel - -This class represents a screen coordinate in x and y coordinates. - -* Constructor - OpenLayers.Pixel({float|x}, {float|y}) -- Create Pixel. - -* Methods - toString() -- {String} -- Converts to human readable string. - clone() -- {OpenLayers.Pixel} -- Returns a copy of the pixel. - equals({OpenLayers.Pixel|px}) -- {Boolean} -- Tests for equivilance. - add({int|x}, {int|y}) -- {OpenLayers.Pixel} -- add x and y to the current coordinates. - offset({OpenLayers.Pixel|pixel}) -- {OpenLayers.Pixel} -- Add pixels together. diff --git a/pacotes/openlayers/doc/Size.txt b/pacotes/openlayers/doc/Size.txt deleted file mode 100644 index 76bafea..0000000 --- a/pacotes/openlayers/doc/Size.txt +++ /dev/null @@ -1,11 +0,0 @@ -OpenLayers.Size - -This class represents a width/height pair. - -* Constructor - OpenLayers.Size({float|h}, {float|w}) -- Create Size. - -* Methods - toString() -- {String} -- Converts to human readable string. - clone() -- {OpenLayers.Size} -- Returns a copy of the pixel. - add({int|x}, {int|y}) -- {OpenLayers.Size} -- add x and y to the current coordinates. diff --git a/pacotes/openlayers/doc/Tile.Image.txt b/pacotes/openlayers/doc/Tile.Image.txt deleted file mode 100644 index 7cb45b2..0000000 --- a/pacotes/openlayers/doc/Tile.Image.txt +++ /dev/null @@ -1,7 +0,0 @@ -OpenLayers.Tile.Image - -The image tile is designed to hold images for all types of layers, from WMS to KaMap to WorldWind. - -* Constructor - OpenLayers.Tile.Image({OpenLayers.Layer|layer}, {OpenLayers.Pixel|position}, {OpenLayers.Bounds|bounds}, {String|url}, {OpenLayers.Size|size}) -- Create a new tile, with properties passed. - diff --git a/pacotes/openlayers/doc/Tile.WFS.txt b/pacotes/openlayers/doc/Tile.WFS.txt deleted file mode 100644 index 442a215..0000000 --- a/pacotes/openlayers/doc/Tile.WFS.txt +++ /dev/null @@ -1,6 +0,0 @@ -OpenLayers.Tile.WFS - -The WFS tile allows you to load any number of WFS URLs into a single tile. - -* Constructor - OpenLayers.Tile.WFS({OpenLayers.Layer|layer}, {OpenLayers.Pixel|position}, {OpenLayers.Bounds|bounds}, {String|urls}, {OpenLayers.Size|size}) -- Create a new tile, with properties passed. The major difference between this tile and other tiles is what it does with results: The WFS tile is designed to parse XML responses, and create features for each item in the response. diff --git a/pacotes/openlayers/doc/Tile.txt b/pacotes/openlayers/doc/Tile.txt deleted file mode 100644 index a21c45d..0000000 --- a/pacotes/openlayers/doc/Tile.txt +++ /dev/null @@ -1,10 +0,0 @@ -OpenLayers.Tile - -This is a class designed to designate a single tile, however -it is explicitly designed to do relatively little. Tiles store information -about themselves -- such as the URL that they are related to, and their -size - but do not add themselves to the layer div automatically, for -example. - -* Constructor - OpenLayers.Tile({OpenLayers.Layer|layer}, {OpenLayers.Pixel|position}, {OpenLayers.Bounds|bounds}, {String|url}, {OpenLayers.Size|size}) -- Create a new tile, with properties passed. diff --git a/pacotes/openlayers/doc/Util.txt b/pacotes/openlayers/doc/Util.txt deleted file mode 100644 index f2fb26a..0000000 --- a/pacotes/openlayers/doc/Util.txt +++ /dev/null @@ -1,8 +0,0 @@ -OpenLayers.Util - -Utility class. Stores a bunch of methods and settings that don't fit anywhere else. - -* Options - - OpenLayers.Util.onImageLoadErrorColor -- A string to set img.style.backgroundColor to if the onerror event fires for the image (useful for 500 errors from WMS, for example). - OpenLayers.ImgPath -- A string to be used as the base for images for controls and the like. Should end with '/'. diff --git a/pacotes/openlayers/doc/authors.txt b/pacotes/openlayers/doc/authors.txt deleted file mode 100644 index 072416d..0000000 --- a/pacotes/openlayers/doc/authors.txt +++ /dev/null @@ -1,25 +0,0 @@ -OpenLayers contributors: -Howard Butler -Bertil Chaupis -John Cole -Jeff Dege -Schuyler Erle -Christian López Espínola -John Frank -Sean Gilles -Pierre Giraud -Andreas Hocevar -Philip Lindsay -Corey Puffault -Tim Schaub -Christopher Schmidt -Cameron Shorter -Paul Spencer -James Stembridge -Erik Uzureau -Bill Woodall -Steve Woodbridge - - -OpenLayers is graciously supported by MetaCarta, Inc. -. diff --git a/pacotes/openlayers/doc/customization b/pacotes/openlayers/doc/customization deleted file mode 100644 index f4b5b98..0000000 --- a/pacotes/openlayers/doc/customization +++ /dev/null @@ -1,49 +0,0 @@ -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; - } diff --git a/pacotes/openlayers/doc/readme.txt b/pacotes/openlayers/doc/readme.txt deleted file mode 100644 index fd23a71..0000000 --- a/pacotes/openlayers/doc/readme.txt +++ /dev/null @@ -1,3 +0,0 @@ -Automatically generated OpenLayers API documentation is online: - - http://dev.openlayers.org/docs/overview-tree.html diff --git a/pacotes/openlayers/doc/reference.html b/pacotes/openlayers/doc/reference.html deleted file mode 100644 index 5736d5d..0000000 --- a/pacotes/openlayers/doc/reference.html +++ /dev/null @@ -1,840 +0,0 @@ - - - OpenLayers Class Reference Documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

OpenLayers.Map

- -Instantiate class OpenLayers.Map in order to create a map. This is the central class in the API. Everything else is auxiliary. - - -

Constructor

- - - -
OpenLayers.Map(container, opts?)Creates a new map inside of the given HTML container, which is typically a DIV element. The opts variable is an object with various options, as described in the options section below.
-

Methods

- -
- -

Layer Management

- - - - - - -
addLayer(layer)noneadds a layer to the list currently set for the map.
addLayers([ layer, layer ])noneAdds multiple layers to a map.
removeLayer(layer)noneRemove a layer from the map.
setBaseLayer(layer)noneSets a new base layer for the map. The provided layer should have already been added to the map. Changing the base layer causes all other base layers to be turned off, and all overlays to reproject themselves.
- -

Control Management

- - - -
addControl(control)noneAdds a control to the map.
- -

Popup Management

- - - - -
addPopup(popup, exclusive)noneadds a popup to the map. If exclusive is set to true, then all other popups are closed first.
removePopup(popup)noneremoves an existing popup from the map.
- -

Center management

- - - - -
setCenter(lonlat, zoom)noneSet the center point of the map. This then moves all the layers to the new center location as well, using each layer's 'moveTo' function. The 'zoom' is an integer from 0 to maxZoomLevel.
pan(dx, dy)noneAllows user to pan by a value of screen pixels
- -

Zoom Management

- - - - - - - - -
zoomTo(zoom)nonezoom to the given zoom level.
zoomIn()nonezoom in one level.
zoomOut()nonezoom out one level.
zoomToExtent(bounds)noneSet the map such that the bounds fits within the current viewport area.
zoomToMaxExtent()noneZoom such that the entire bounds of the map is contained in the viewport.
zoomToScale(float)noneZoom as close to the given scale as possible. Scale can be given as a ratio (1/24000) or as the denominator of the scale value (24000). zoomToScale will find the zoom level which most closely fits the requested scale and set that as the current zoom level.
- -

Current Map Information

- - - - - - - - - - - -
getLonLatFromPixel(pixel)OpenLayers.LonLatReturns OpenLayers.LonLat corresponding to the given OpenLayers.Pixel, translated into lon/lat by the current base layer
getPixelFromLonLat(lonlat)OpenLayers.PixelReturns OpenLayers.Pixel corresponding to the given OpenLayers.LonLat, translated by the current base layer
getCenter()OpenLayers.LonLatReturns a LonLat for the current center of the map
getZoom()IntegerReturns the current zoom level as an integer
getExtent()OpenLayers.BoundsReturns a Bounds object which represents the geographic bounds of the current viewPort.
getSize()OpenLayers.PixelReturns the pixel size of the current map window.
getTileSize()OpenLayers.SizeReturns tile size currently set for map.
getResolution()floatReturns the current resolution (units/pixel) of the map
getZoomForExtent(bounds)Zoom level in which the given bounds will fitzooming to this level and setting the center of the map in the center of the bounds will always fit the given bounds in the map.
- -

Default Map Information

- - - - - - -
getMaxResolution()floatreturns The Map's Maximum Resolution, the units/pixel at zoom level 0. The default is 1.40625, to match the approximate MaxResolution used by the commercial providers.
getMaxExtent()OpenLayers.BoundsReturn the max extent of the current base layer as defined on the layer. The default maxExtent for OpenLayers is -180,-90,180,90
getMaxZoomLevel()intReturns the maximum zoom level that can be reached in the map for the current base layer
getMinZoomLevel()intReturns the minimum zoom level that can be reached in the map for the current base layer
-

Events

- - - - - - - - - - - - - - - -
addlayera layer is added to the map
removelayera layer is removed from the map
changelayera layer has some property of it, typically visibility, changed.
changebaselayerthe current base layer changes
movestartstart of a movement in the map
moveend of movement in a map. this happens while te mouse is dragging as well as for all other events.
moveendend of movement in a map, but does not happen when the 'dragging' flag is set, as is the case when the move event is in the middle of a drag action.
zoomendend of a zoom action
mouseovermap is moused over
mouseoutmap is no longer mousedout
mousemovemouse moves inside map
dragstartdrag action starts
dragenddrag action ends
-

Options:

- - - - - - - - - - - - -
controlsan array of control objects to be added to the map. The default is [new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.PanZoom()]
projectionused by WMS layers, should be an SRS identifier.
maxZoomLevelThe number of zoom levels to use in the map.
maxExtentOpenLayers.Bounds to be used as the maximum extent of a map. The center of the map can not leave the maxExtent of the map when dragging.
maxResolutionThe units/pixel measurement at zoom level 0. Default is 1.40625
resolutionsAn array of resolutions to be used as an index when zooming. Overrides maxZoomLevel and maxResolution if present.
minScaleThe smallest scale value. minScale is preferred over maxResolution, if present.
maxScaleThe maximum scale the map should include. Overrides maxZoomLevel if present.
unitsThe units of the map. Defaults to degrees. Neccesary when using scale in any way.
scalesAn array of scale values. Overrides maxResolution, maxZoomLevel, resolutions, and min/max scale if present.
-

OpenLayers.Layer

- -Layers are the most important and central aspect of OpenLayers. They are the -core functionality for the software: Everything that ends up on the map comes -from a layer. The base layer class is designed to be subclassed by any number -of different layers. - - -

Constructor

- - - -
OpenLayers.Layer(name, options)All layers have a name as their first param. This name is used to display the layer in the LayerSwitcher, and for other purposes. The options parameter is used to replace any parameters of the Layer which need to be different.
-

Methods

- - - - - - - - - - - - - - -
clone()OpenLayers.Layercreate a clone of the layer.
setName(name)noneSet the name of the layer to something different.
moveTo(bounds, zoomChanged)noneNot implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location.
setMap(map)noneSet the map property of the layer. Also set the parameters which are inherited from the map.
getVisibility()BooleanReturn true or false based on visibility of the layer.
setVisibility(visible)noneSet the layer visibility, and trigger the appropriate events.
getResolution()floatReturn the current resolution of the map, in units/pixel.
getExtent()OpenLayers.BoundsReturn the geographic extent of the current map viewport.
getZoomForExtent(bounds)Integerreturn the integer zoom which most closely matches the passed bounds.
getLonLatFromViewPortPx(pixel)OpenLayers.LonLatReturns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the laye
getViewPortPxFromLonLat(lonlat)OpenLayers.PixelReturns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels
addOptions(options))noneChange the options on the layer. This is the supported way to change properties of the layer.
-

Parameters

- - - - - - - - - - - - - - - - -
displayOutsideMaxExtentDetermine whether images or data are loaded outside the maxExtent. Default is false.
isBaseLayerThis determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false.
projectionSRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
maxExtentan OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
maxResolutionThe number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
maxZoomLevelThe maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
minScaleThe scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
maxScaleThe scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map.
unitsThe units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map.
-

OpenLayers.Layer.Image

- -The Image Layer allows you to load a single image and use it as a layer in your -map. - - - -

Constructor

- - - -
OpenLayers.Layer(name, url, bounds, size, options)Image Layer constructor requires a name, URL of the image, geographic bounds of the image, pixel size of the image, and an optional options parameter.
-

OpenLayers.Layer.HTTPRequest

- -Sublass of Layer used for services which require initiating multiple HTTPRequests. - - -

Constructor

- - - -
OpenLayers.Layer.HTTPRequest(name, url, params, options)URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
-

Methods

- - - - -
initResolutions()noneBased on the current minScale/maxScale/maxResolution/numZoomLevel/scales/resolutions parameters, initializes an array of 'zoom levels' as this.resolutions, which are then used as an index into when zooming.
getFullRequestString(newParams)StringReturns the full request string for a combination of the defaults on this layer and the parameters passed via newParams.
-

Options

- - -
reprojectIf reproject is true, then the layer will alter the bounding boxes of its tiles to be based on the geographic location of the pixel bounds in the base layer. This is important for reprojecting WMS tiles onto something like Google Maps. Tile locations are calculated, and then when creating the tile request, the bounding box is adjusted to match the bounding box of the base layer at that location.
-

OpenLayers.Layer.Grid

- -The Grid layer is the base layer for almost all image layers. This is a subclass of HTTPRequest. - - -

Constructor

- - - -
OpenLayers.Layer.Grid(name, url, params, options)URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
-

Methods

- - - - - - - - - - - - - -
getGridBounds()OpenLayers.Boundsreturn geographic extent of the grid of tiles.
_initTiles()noneUsed to initialize the tile grid, creating image elements as neccesary and filling them with the correct images.
spiralTileLoad()noneCalled from _initTiles. Rotates through the grid filling in the images for the grid.
clone()OpenLayers.Layer.Gridcreate a clone of the layer. Subclassed from {OpenLayers.Layer}.
setMap(map)noneSet the map property of the layer. Also set the parameters which are inherited from the map. This is also where the tileSize is retrieved from the map. Subclassed from OpenLayers.Layer.
moveTo(bounds, zoomChanged)noneNot implemented here, but the general function called on dragging or setCenter, to move the Layer to a new geographic location. Subclassed from OpenLayers.Layer.
getResolution()floatReturn the current resolution of the map, in units/pixel. Subclassed from OpenLayers.Layer.
getExtent()OpenLayers.BoundsReturn the geographic extent of the current map viewport. Subclassed from {OpenLayers.Layer}.
getZoomForExtent(bounds)Integerreturn the integer zoom which most closely matches the passed bounds. Subclassed from OpenLayers.Layer.
getLonLatFromViewPortPx(pixel)OpenLayers.LonLatReturns an OpenLayers.LonLat which is the passed-in view port OpenLayers.Pixel, translated into lon/lat by the layer. Subclassed from {OpenLayers.Layer}.
getViewPortPxFromLonLat(lonlat)OpenLayers.PixelReturns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into view port pixels. Subclassed from {OpenLayers.Layer}.
-

Parameters

- - -
bufferDefault 2. Number of tiles around the central map area which OpenLayers will preload so that dragging goes more smoothly.
- -

Subclassed from OpenLayers.Layer

- - - - - - - - - -
isBaseLayerThis determines whether the layer is a base layer or an overlay. Only one Base Layer can be displayed on the map at once. Default is false.
projectionSRS string to describe the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
maxExtentan OpenLayers.Bounds for the layer. This is the maximum geographic extent of the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
maxResolutionThe number of degrees per pixel at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
maxZoomLevelThe maximum zoom level for the layer. If this is set on the map before the Layer is added to the map, it will inherit from the map.
minScaleThe scale at zoom level 0. If this is set on the map before the Layer is added to the map, it will inherit from the map.
maxScaleThe scale at the highest zoom level. If this is set on the map before the Layer is added to the map, it will inherit from the map.
unitsThe units the map is projected into. If this is set on the map before the Layer is added to the map, it will inherit from the map.
-

OpenLayers.Layer.WMS

- -The WMS layer allows one to connect to a WMS server to obtain images. Params are available as a hash on the layer object, however, all keys are upper-cased automatically for maximum compatibility with WMS servers, so a parameter which is set as 'layers' will be uppercased to LAYERS. Where 'layer' is your Javscript variable for the layer, layer.params.LAYERS is the value of the layers param as set by the constructor. - -If you wish to change params, you should use mergeNewParams, rather than accessing the parameters directly. - - -

Constructor

- - - -
OpenLayers.Layer.WMS(name, url, params, options)URL is the base URL to the layer. Params is a set of params to be included in the HTTP Request. Options is a set of options, extending the parameters of the layer.
-

Methods

- - - All other methods are inherited from OpenLayers.Layer.Grid - -
getURL(bounds)StringReturns a WMS URL for the given bounds based on the properties of the layer.
-

Options

- - -
isBaseLayerWMS layers default to being base layers unless one of their parameters is 'transparent':'true'.
-

OpenLayers.Layer.KaMap

- -ka-Map is a Mapserver wrapper which performs caching and works around many of the deficiencies with tiling when using Mapserver as a WMS client. - - -

Construtor

- - - -
OpenLayers.Layer.KaMap(name, url, params, options)URL is the url of the tile.php for KaMap.
-

OpenLayers.Layer.EventPane

- -Designed to act as a super-class for layers which need OpenLayers to intercept click events. Google Maps and Microsoft Virtual Earth both use this functionality, in order to allow for actions like the rubber-band-zoom/zoombox functionality. This Layer is not designed to be used on its own, but instead to act as an intermediary between the user and layers which have their own click handlers. - - -

Constructor

- - -
OpenLayers.Layer.EventPane(name, options)Only designed to be used by subclasses.
-

OpenLayers.Layer.Google

- -The Google Layer in OpenLayers allows you to include Google Maps functionality in your OpenLayers maps. In order to use the Google Layer, you must first obtain an API key for Google Maps, and include the Google Maps API script in your page. Once you have done this, - - -

Constructor

- - - -
OpenLayers.Layer.Google(name, options?)Constructor for Google layer. Accepts name and options.
-

Methods

- - - - - - -
getOLLonLatFromGLatLng(GLonLat)OpenLayers.LonLatConvert from GLatLon to OpenLayers LonLat
getGLatLngFromOLLonLat(lonlat)GLatLonConvert From OpenLayers LonLat to GLatLon
getOLPixelFromGPoint(GPoint)OpenLayers.PixelConvert from GPoint to OpenLayers.Pixel
getGPointFromOLPixel(pixel)GPointCreate GPoint from OpenLayers Pixel.
-

Parameters

- - - -
typeone of G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, used to choose the type of map to display. (See GMapType in the Google documentation for more.)
-

OpenLayers.Layer.VirtualEarth

- -The Virtual Earth Layer in OpenLayers allows you to include Virtual Earth Maps in your OpenLayers maps. In order to use the Virtual Earth Layer, you must first include the Virtual Earth API script in your page. Once you have done this, simply add the layer to your map. - - -

Constructor

- - - -
OpenLayers.Layer.VirtualEarth(name)Constructor for Virtual Earth layer. Accepts name.
-

Methods

- - - - - - - -
getOLLonLatFromVELatLng(VELatLon)OpenLayers.LonLatConvert from VELatLon to OpenLayers LonLat
getVELatLngFromOLLonLat(lonlat)VELatLonConvert From OpenLayers LonLat to VELatLon
getOLPixelFromVEPoint(Msn.VE.Pixel)OpenLayers.PixelConvert from VEPoint to OpenLayers.Pixel
getGPointFromOLPixel(pixel)Msn.VE.PixelCreate Msvn.VE.Pixel from OpenLayers Pixel.
-

OpenLayers.Layer.Markers

- -The base class for all vector drawing, The OpenLayers.Layer.Markers layer is the primary way to get annotations into your map. - - -

Constructor

- - - -
OpenLayers.Layer.Markers(name, options)Name and options for layer.
-

Methods

- - - - - - -
addMarker(Marker)noneAdds a marker to the layer, sets the map object on the marker, and calls drawMarker on the marker.
removeMarker(Marker)noneRemove the marker from the layer and map.
clearMarkers()noneRemove all markers from the layer with removeMarker.
redraw()noneRedraw all markers. Used so that markers can change their position when a base layer changes.
drawMarkernoneCall marker.draw(px), which passes the Pixel of the latitude/longitude in the map viewport to the marker. adds the marker to the div, and marks the marker as drawn.
-

OpenLayers.Layer.Text

- -Subclass of Markers layer which retrieves CSV file from the web, and parses content to create markers and popups. - - -

Constructor

- - - -
OpenLayers.Layer.Text(name, options)Pass in name, and set location: 'URL of CSV file' in the options hash.
-

Methods

- - - -
parseData(ajaxRequest)noneParses returned CSV file.
-

OpenLayers.Layer.GeoRSS

- -GeoRSS layer. Pass a name and location of a GeoRSS file on the web, and a marker will be added to the map for each item in the GeoRSS feed. Uses OpenLayers.loadURL to load the XML, parses the data, and adds markers to the map. The GeoRSS layer supports 1.0 and 2.0 in IE and Firefox, and supports 2.0 in Safari. (Ticket #111 explains the reason for this difference.) - - - -

Constructor

- - - -
OpenLayers.Layer.GeoRSS(name, url)Name and location of GeoRSS XML file.
-

Methods

- - - - -
parseData(ajaxResponse)noneCallback for the loadURL call. This function parses the XML for the GeoRSS feed, creating markers for the data and adding a popup to each marker. It populates an array of features as 'this.features'.
markerClick(Event)noneAction to perform when a marker is clicked.
clearFeatures()noneRemoves all features and markers from the map.
-

OpenLayers.Layer.Boxes

- -A subclass of the markers layer, this layer draws boxes using div elements -instead of icons using images. - - -

Constructor

- - -
OpenLayers.Layer.Boxes(name, options)Same as OpenLayers.Layer.Markers.
-

OpenLayers.Layer.TMS

- - The TMS layer allows one to connect to a TMSTiled Map Serviceserver to obtain images. - - -

Constructor

- - - -
OpenLayers.Layer.TMS(name, url, options)URL is the base URL to the layer. Options is a set of options, extending the parameters of the layer.
-

Methods

- - - All other methods are inherited from OpenLayers.Layer.Grid - -
getURL(bounds)StringReturns a TMS URL for the given bounds based on the properties of the layer.
-

Options

- - - - -
tileOriginThe tileOrigin option will allow you to set your tileOrigin to something other than the lower left extent of your map.
layernameName of the layer in the TMS request.
typeThe extension images have.
-

OpenLayers.Icon

- -Icon is used as the visual representation of a Marker. Creating such a representation requres up to three parts: An Icon URL, a size, and an offset. The icon URL is a pointer to an image to use as an icon. The size is the size of the image, as an OpenLayers.Size object, and the offset is the position of the top left corner of the image in pixels, relative to the latitude and longitude of the Marker. - - -

Constructor

- - - -
OpenLayers.Icon(url, size, offset)creates a new icon.
-

Methods

- - -
clone()OpenLayers.IconCreate an exact copy of the icon.
-

OpenLayers.Marker

- -Instantiate class OpenLayers.Marker in order to create a marker. - - -

Constructor

- - - -
OpenLayers.Marker(lonlat, icon? )Creates a new marker object. This object must be added to a Marker layer and will then be displayed. The icon can be left nullif this is the case, then the default OpenLayers icon will be used.
-

Methods

- - - - - -
onScreen()booleanReturns whether or not the marker is currently visible on screen.
inflate(float)noneChanges the size of the Icon by a factor of the passed float.
display(string)noneSets the style.display property of the Icon.
-

Events

- - Standard browser events are available. - -
-

OpenLayers.Marker.Box

- -A different kind of Marker, designed to be added to a Boxes layer instead of a Markers layer. - - -

Constructor

- - - -
OpenLayers.Marker.Box(bounds, borderColor, borderWidth)Set up a box. Defaults are red, with a width of 2.
-

Methods

- - - -
setBorder(color, width)sets properties of border color and width.
-

OpenLayers.Tile

- -This is a class designed to designate a single tile, however -it is explicitly designed to do relatively little. Tiles store information - about themselvessuch as the URL that they are related to, and their -size - but do not add themselves to the layer div automatically, for -example. - - -

Constructor

- - -
OpenLayers.Tile(layer, position, bounds, url, size)Create a new tile, with properties passed.
-

OpenLayers.Tile.Image

- -The image tile is designed to hold images for all types of layers, from WMS to KaMap to WorldWind. - - -

Constructor

- - - -
OpenLayers.Tile.Image(layer, position, bounds, url, size)Create a new tile, with properties passed.
-

OpenLayers.Tile.WFS

- -The WFS tile allows you to load any number of WFS URLs into a single tile. - - -

Constructor

- - -
OpenLayers.Tile.WFS(layer, position, bounds, urls, size)Create a new tile, with properties passed. The major difference between this tile and other tiles is what it does with results: The WFS tile is designed to parse XML responses, and create features for each item in the response.
-

OpenLayers.Control

- -Base class from which controls are derived. Controls are elements of the map used to control things like zoom, layer status, or to provide information to the user about the status of the map, such as scale or copyright information. - - -

Constructor

- - - -
OpenLayers.Control(options?)Creates a new control. The options here are used to control parameters of the control. The base control defines only "position", which is designed to be an OpenLayers.Pixel which is the top-left of the location of the control relative to the map div.
-

Parameters

- - -
positionOpenLayers.Pixel to use as the top-left corner of the control div, relative to the map area.
-

OpenLayers.Control.LayerSwitcher

- -This control will by default display a small image in the upper right corner of the map. When clicked, this image expands into a control which allows one to select between multiple types of layers, seperated into two types: Base Layers and Overlays. Only one base layer can be selected at a time, and is enforced by a radio button control being used. Multiple overlays can be selected at once, and a checkbox control is visible for this functionality. - -

Constructor

- - - -
OpenLayers.Control.LayerSwitcher(options?)Creates a new control.
-

Methods

- - - - -
maximizeControl()noneExpand the layer switcher control.
minimizeControl()noneClose the layer switcher control.
-

Parameters

- - - - -
position(inherited from OpenLayers.Control) {OpenLayers.Pixel} to use as the top-left corner of the control div, relative to the map area.
activeColorThe color to use for the background of the layer switcher div.
ascendingAscending determines whether layers are added to the layer switcher in ascending or descending order. If ascending is true, the lowest layer is appended to the list first. If ascending is false, the lowest layer is at the very bottom of the LayerSwitcher. Default is true.
-

OpenLayers.Control.MouseDefaults

- -Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseDefaults, replacing the functions whose behavior you wish to change. - - - -

Constructor

- - - -
OpenLayers.Control()Creates a new control. No options available.
-

Methods

- - - - - - - - - - - -
defaultClicknoneThis event takes place when a click event occurs on the map.
defaultDblClicknoneThis event re-centers the map on the clicked location.
defaultMouseDownnoneThis event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead.
defaultMouseMovenoneIf a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor.
defaultMouseUpnoneThis function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled.
defaultMouseOutnoneThis calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped.
defaultWheelUpnoneZooms in one level. Called by onWheelEvent
defaultWheelDownnoneZooms out one level. Called by onWheelEvent.
onWheelEventnonecatches the map wheel event, and handles it, zooming appropriately.
-

OpenLayers.Control.MousePosition

- -A small control which displays the Longitude and Latitude of the current mouse position, by defualt in the lower right of the map viewport. - - -

Constructor

- - - - -
OpenLayers.Control.MousePosition(options)Creates a new MousePosition control.
-

Parameters

- - - - - - - - - -prefix, separator, and suffix are used to format the lon/lat values. - -With: - prefix = 'Lon: ' - suffix = '
Lat: ' - suffix = '' - nudigits = 3 -Lon/Lat is displayed as: - Lon: 95.123 - Lat: 35.456 - -If the mouse has never been over the map, Lon/Lat will equal 0/0. If the mouse is over the map, Lon/Lat will equal the current mouse position. If the mouse has been moved off the map, Lon/Lat will equal the value displayed at the time the mouse was moved off the map. - -If the mouse is moving slowly, the Lon/Lat will refresh continuously. If the mouse is moving rapidly, the refresh of Lon/Lat will be suspended until the mouse has slowed down or stopped. (Trying to update the Lon/Lat value while the mouse is in rapid movemement makes the movement of the mouse unacceptably jerky.) - -
elementif not null, div in which to display the MousePosition
prefixhtml to precede the longitude value (default: '')
separatorhtml to separate the longitude and latitude values (default: '
')
suffixhtml to follow the latitude value (default: '')
numdigitsnumber of digits to the right of the decimal (default: 5)
granularityDon't refresh display if mouse has moved more than this (default: 10)
-

OpenLayers.Control.MouseToolbar

- -Control to set up mouse handling. This includes clicks, double clicks, scrollwheel events, and mouse movement. There are a number of functions which act as the default handlers for these events: if you wish to create your own mouse control which behaves differently, you should create a subclass of MouseToolbar, replacing the functions whose behavior you wish to change. Additionally, a toolbar of images can be clicked to start events, as well as using the keyboard shortcuts. Note that if you wish to use the MouseToolbar, you *must* add a 'controls' option to the map constructor, otherwise you will have both MouseDefaults and MouseToolbar on the map, which will not work. - - -

Constructor

- - - -
OpenLayers.Control.MouseToolbar(position, direction)Creates a new control. The direction of the control can be either "vertical" or "horizontal". The default is vertical.
-

Methods

- - - - - - - - -
defaultClicknoneThis event takes place when a click event occurs on the map.
defaultDblClicknoneThis event re-centers the map on the clicked location.
defaultMouseDownnoneThis event starts a dragging event, so that the map can be dragged. If the shift key is held, it starts a 'zoombox' or rubber-band-zoom action instead.
defaultMouseMovenoneIf a mouseDrag is in operation, this function causes the map to move to follow the cursor. If a zoombox is in place, this increases the size of the zoombox element to match the cursor.
defaultMouseUpnoneThis function is called when a mouseup event is received, and either sets the center of the map to be the final location or zooms to the zoombox if enabled.
defaultMouseOutnoneThis calls defaultMouseUp, so that when you mouse out of the map div, the events are stopped.
-

OpenLayers.Control.OverviewMap

- -This control provides a locator or overview map linked to another map. By default, the overview map shows up in the lower right of the main map and can be expdaned with the '+' button. - - -

Constructor

- - - -
OpenLayers.Control.OverviewMap(opts?)Creates a new overview map. The opts variable is an object with various options, as described in the options section below.
-

Methods

- - - - - - - - - - -
isSuitableOverview()BooleanDetermines if the overview map is suitable given the extent and resolution of the main map.
getRectPxBounds()boundsAn OpenLayers.Bounds which is the extent rectangle's pixel bounds (relative to the parent element).
setRectPxBounds(bounds)noneSet extent rectangle pixel bounds.
getRectBoundsFromMapBounds(lonLatBounds)boundsAn OpenLayers.Bounds which is the passed-in map lon/lat extent translated into pixel bounds for the overview map.
getMapBoundsFromRectBounds(pxBounds])boundsAn OpenLayers.Bounds which is the passed-in overview rect bounds translated into lon/lat bounds for the overview map.
getLonLatFromOverviewPx(pixel)lonlatAn OpenLayers.LonLat which is the passed-in overview map OpenLayers.Pixel translated into lon/lat by the overview map.
getOverviewPxFromLonLat(lonlat)pixelAn OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into overview map pixels
-

Events

- -
- -

Rectangle events

- -They are defined on OverviewMap.rectEvents - - - - - - - - - -
mouseoverrectangle is moused over
mouseoutrectangle is no longer mousedout
mousemovemouse moves inside rectangle
mousedownmouse button is pressed over the rectangle.
mouseupmouse button is released over the rectangle.
clickmouse clicked
dblclickmouse double clicked
- -

Map events

- - They are defined on OverviewMap.mapDivEvents - - - -
clickmouse clicked
-

Options:

- - - - -
minRatioThe ratio of the overview map resolution to the main map resolution at which to zoom farther out on the overview map.
maxRatioThe ratio of the overview map resolution to the main map resolution at which to zoom farther in on the overview map.
layersOrdered list of layers in the overview map. If none, then the map base layer is used.
-

OpenLayers.Control.PanZoom

- -Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and one button which zooms to the max extent of the map. - - -

Constructor

- - - -
OpenLayers.Control.PanZoom(options)Creates a new panzoom control.
-

Parameters

- - -
slideFactorNumber of pixels by which to slide the map when a pan arrow is clicked.
-

OpenLayers.Control.PanZoomBar

- -Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and a bar on which a slider can be moved to zoom in or out by multiple stops at once. - - -

Constructor

- - -
OpenLayers.Control.PanZoomBar()Creates a new panzoombar control.
-

OpenLayers.Control.Permalink

- -A small control which updates a "Permalink" to the map every time the viewport changes. This allows users to copy a link to a specfic map view. By default, it places itself in the lower right corner of the map. This control must be added to the map after a baselayer has been set. - - -

Constructor

- - -
OpenLayers.Control.Scale(element?, base)Creates a new permalink control. The DOMElement is used, if passed, as the element on which the 'href' is set. If you prefer to put this link on an element outside of the map, set this element to an anchor element to have its href updated when the map moves. If you wish to make the link go to some other URL (for example, an editing interface rather than the current URL), the 'base' property can be used, to which the ?lat=&lon=&zoom= will be appended after the map has moved.
-

OpenLayers.Control.Scale

- -A small control which displays an informative scale value, a la "1:50K" , by defualt in the lower right of the map viewport. - - -

Constructor

- - -
OpenLayers.Control.Scale(element?)Creates a new scale control. The DOMElement is used, if passed, to put the scale insidethis allows you to have the scale displayed in some location outside the map.
-

OpenLayers.LonLat

- -This class represents a geographic coordinate pair, either projected or unprojected. - - -

Constructor

- - - -
OpenLayers.LonLat(lon, lat)Create LonLat.
-

Methods

- - - - - - -
toString()StringConverts to human readable string.
toShortString()StringConverts to short human readable string.
clone()OpenLayers.SizeReturns a copy of the pixel.
equals(ll)BooleanCompares two LonLats.
add(lon, lat)OpenLayers.LonLatadd x and y to the current coordinates.
-

OpenLayers.Size

- -This class represents a width/height pair. - - -

Constructor

- - - -
OpenLayers.Size(h, w)Create Size.
-

Methods

- - - - -
toString()StringConverts to human readable string.
clone()OpenLayers.SizeReturns a copy of the pixel.
add(x, y)OpenLayers.Sizeadd x and y to the current coordinates.
-

OpenLayers.Pixel

- -This class represents a screen coordinate in x and y coordinates. - - -

Constructor

- - - -
OpenLayers.Pixel(x, y)Create Pixel.
-

Methods

- - - - - - -
toString()StringConverts to human readable string.
clone()OpenLayers.PixelReturns a copy of the pixel.
equals(px)BooleanTests for equivilance.
add(x, y)OpenLayers.Pixeladd x and y to the current coordinates.
offset(pixel)OpenLayers.PixelAdd pixels together.
-

OpenLayers.Bounds

- -This class represents a bounding box. Data stores as left, bottom, right, top floats. - - -

Constructor

- - - -
OpenLayers.Bounds(left, bottom, right, top)Create new Bounds.
-

Methods

- - - - - - - - - - - - - - -
clone()OpenLayers.BoundsReturn copy of the current bounds.
toString()StringReturn bounds as string.
toBBOX()StringReturn bounds as simple string, usable for WMS.
getWidth()floatReturn width of bounds.
getHeight()floatReturn height of bounds.
getSize()OpenLayers.SizeReturn size of bounds.
getCenterPixel()OpenLayers.PixelReturn center of bounds as pixel.
getCenterLonLat()OpenLayers.LonLatReturn center of bounds as LonLat.
equals(bounds)Booleanwhether or not the bounds are equivilant.
add(x, y)OpenLayers.BoundsShift bounds by x and y.
contains(x, y, inclusive)BooleanReturn Whether or not the passed-in coordinates are within this bounds
containsBounds(bounds, partial, inclusive)BooleanReturns whether or not the passed-in OpenLayers.Bounds object is contained within this bounds. partial indicates whether bounds must be contained or only overlap. Inclusive determines whether border is included.
determineQuadrant(lonlat)StringDetermine which quadrant the LonLat is in. Returns combination of "b" or "t" and "l" or "r".
-

OpenLayers.Util

- -Utility class. Stores a bunch of methods and settings that don't fit anywhere else. - - -

Options

- - - - -
OpenLayers.Util.onImageLoadErrorColorA string to set img.style.backgroundColor to if the onerror event fires for the image (useful for 500 errors from WMS, for example).
OpenLayers.ImgPathA string to be used as the base for images for controls and the like. Should end with '/'.
-OpenLayers contains a number of helper functions for working with AJAX. - - -

Methods

- - - - -
OpenLayers.loadURL(uri, params, caller, onComplete, onFailure)noneThis function sends an XMLHTTPRequest to a remote site, specified by URI, with the params string given as the params argument. Caller is bound as 'this' to the function specified by either onComplete or onFailure.
OpenLayers.parseXMLString(text)AJAXResponseAccepts a block of text, and creates a DOM response document from the text.
-

Parameters

- - - -
OpenLayers.ProxyHostWhen initiating an AJAX request, any URL that is absolute is prefixed with OpenLayers.ProxyHost. The ProxyHost is designed to accept a URL and return the content, in an effort to work around cross-browser security restrictions. This defaults to null, but if you wish to access content from another domain that Javascript would restrict access to, you must set this to be the URL which will accept a URL encoded version of the passed URL and return the content at that URL. An example is available as proxy.txt in the examples/ directory.
- - diff --git a/pacotes/openlayers/examples/GMLParser.html b/pacotes/openlayers/examples/GMLParser.html deleted file mode 100644 index 4471813..0000000 --- a/pacotes/openlayers/examples/GMLParser.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/pacotes/openlayers/examples/KMLParser.html b/pacotes/openlayers/examples/KMLParser.html deleted file mode 100644 index 43fd65a..0000000 --- a/pacotes/openlayers/examples/KMLParser.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - diff --git a/pacotes/openlayers/examples/baseLayers.html b/pacotes/openlayers/examples/baseLayers.html deleted file mode 100644 index fd1ecaf..0000000 --- a/pacotes/openlayers/examples/baseLayers.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - -

OpenLayers With WMS, Google, VE Example

-
-
click to add a marker to the map
-
click to remove the marker from the map
- - diff --git a/pacotes/openlayers/examples/boxes.html b/pacotes/openlayers/examples/boxes.html deleted file mode 100644 index cd85e70..0000000 --- a/pacotes/openlayers/examples/boxes.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/canvas.html b/pacotes/openlayers/examples/canvas.html deleted file mode 100644 index ea02c39..0000000 --- a/pacotes/openlayers/examples/canvas.html +++ /dev/null @@ -1,613 +0,0 @@ - - - - - - - - -

OpenLayers Example

-
-
- Start Lon: - Start Lat:
- End Lon: - End Lat:
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - -
- -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - -
- -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - -
- -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - -
- -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - -
- -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - -
- -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - - - -    - -
-
-
- - diff --git a/pacotes/openlayers/examples/ciesin.html b/pacotes/openlayers/examples/ciesin.html deleted file mode 100644 index b10e9a4..0000000 --- a/pacotes/openlayers/examples/ciesin.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/click.html b/pacotes/openlayers/examples/click.html deleted file mode 100644 index 909c701..0000000 --- a/pacotes/openlayers/examples/click.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/controls.html b/pacotes/openlayers/examples/controls.html deleted file mode 100644 index 5cf06f4..0000000 --- a/pacotes/openlayers/examples/controls.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -

OpenLayers Example

- -
- - diff --git a/pacotes/openlayers/examples/custom-control.html b/pacotes/openlayers/examples/custom-control.html deleted file mode 100644 index ddb12ad..0000000 --- a/pacotes/openlayers/examples/custom-control.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/custom-style.html b/pacotes/openlayers/examples/custom-style.html deleted file mode 100644 index 79bab7a..0000000 --- a/pacotes/openlayers/examples/custom-style.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - -
-

If you care to modify the style of any OpenLayers element, include - the default stylesheet as a link and declare any style modifications - below that link. These style declarations can be in other linked - stylesheets or in style tags. In addition, construct your map with - options that include {theme: null}. This will disable the default - method of loading the stylesheet and allow you to declare style rules - in your own linked stylesheets or style tags.

-

This example shows how to declare the font family, size, and color - for the mouse position. Note that only the style keys that you want to - modify (change from the default) need to be specified.

- - diff --git a/pacotes/openlayers/examples/doubleSetCenter.html b/pacotes/openlayers/examples/doubleSetCenter.html deleted file mode 100644 index d982532..0000000 --- a/pacotes/openlayers/examples/doubleSetCenter.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - -
- - - - diff --git a/pacotes/openlayers/examples/draw-feature.html b/pacotes/openlayers/examples/draw-feature.html deleted file mode 100644 index 760fef8..0000000 --- a/pacotes/openlayers/examples/draw-feature.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - -

OpenLayers Draw Feature Example

-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-

Feature digitizing is in freehand mode by default. In freehand mode, the mouse is treated as a pen. - Drawing begins on mouse down, continues with every mouse move, and ends with mouse up.

-

To turn freehand mode off, hold down the shift key while digitizing. With freehand mode off, one - vertex is added with each click and double-clicks finish drawing. Freehand mode can be toggled on and off - at any time while drawing.

- - - diff --git a/pacotes/openlayers/examples/editingtoolbar.html b/pacotes/openlayers/examples/editingtoolbar.html deleted file mode 100644 index 77d064f..0000000 --- a/pacotes/openlayers/examples/editingtoolbar.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - -
-
- - diff --git a/pacotes/openlayers/examples/example.html b/pacotes/openlayers/examples/example.html deleted file mode 100644 index a9c90f4..0000000 --- a/pacotes/openlayers/examples/example.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/freemap.html b/pacotes/openlayers/examples/freemap.html deleted file mode 100644 index 4c0bd6b..0000000 --- a/pacotes/openlayers/examples/freemap.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/fullScreen.html b/pacotes/openlayers/examples/fullScreen.html deleted file mode 100644 index 681199d..0000000 --- a/pacotes/openlayers/examples/fullScreen.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/georss-serialize.html b/pacotes/openlayers/examples/georss-serialize.html deleted file mode 100644 index f6f1140..0000000 --- a/pacotes/openlayers/examples/georss-serialize.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - -

OpenLayers Draw Point Example

-
- -
-
- - diff --git a/pacotes/openlayers/examples/georss.html b/pacotes/openlayers/examples/georss.html deleted file mode 100644 index bc0e705..0000000 --- a/pacotes/openlayers/examples/georss.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - -

GeoRSS in OpenLayers

-

This demo uses the OpenLayers GeoRSS parser, which supports GeoRSS Simple and W3C GeoRSS. Only points are currently supported. Get the code!

-
- GeoRSS URL: -
-
- - diff --git a/pacotes/openlayers/examples/georss.xml b/pacotes/openlayers/examples/georss.xml deleted file mode 100644 index 053749b..0000000 --- a/pacotes/openlayers/examples/georss.xml +++ /dev/null @@ -1,378 +0,0 @@ - - - -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: http://platial.typepad.com/news/2006/04/really_simple_t.html for more info. -http://platial.com -Crschmidt's Places At Platial - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -http://platial.com/place/90306 -Knitting Room -Address: 2 lake St, Arlington, MA
Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

Map this on Platial
Grab this on Platial ]]>
-42.405696 -71.142197 -crschmidt -2006-06-08T17:35:01.942452+00:00 -
- -http://platial.com/place/67230 -Knitting Room -Address: 2 lake St, Arlington, MA
Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

Map this on Platial
Grab this on Platial ]]>
-42.405524 -71.142273 -crschmidt -2006-04-24T11:35:26.733857+00:00 -
- -http://platial.com/place/65645 -†¢¢™£ˆøœ -Address: 151 Erie St., Cambridge, MA
Tags: platial graffiti

Map this on Platial
Grab this on Platial ]]>
-42.352455 -71.110210 -crschmidt -2006-04-20T08:56:12.696224+00:00 -
- -http://platial.com/place/62200 -Allen Hall -Address: 1301 W Gregory Dr, Urbana, IL
Tags: dorm, uiuc, college



Map this on Platial
Grab this on Platial ]]>
-40.104172 -88.220623 -crschmidt -2006-04-14T08:01:01.872873+00:00 -
- -http://platial.com/place/28232 -Bagby Hot Springs, OR -Tags: 20s, rosalie, romance, childhood, hike, camping, soak, relax, beautiful, hot springs, bathhouse, favorite, popular, crowded, organized, honeymoon tub, plumbing made from hollowed out trees, hot springs, mt hood, notorious car break in spot, rash, bacteria

Map this on Platial
Grab this on Platial ]]>
-44.936000 -122.173000 -crschmidt -2006-01-03T23:10:18.553063+00:00 -
- -http://platial.com/place/43666 -Shooting Location for "The Field of Dreams" Film -Address: Dyersville, Iowa
Tags: iowa, baseball, movie locations, field of dreams, kevin costner, costner, dyersville, kinsella, james earl jones, chicago black sox, shoeless joe, joe jackson, famous farms, film, movie, cinema, shooting location

Map this on Platial
Grab this on Platial ]]>
-42.481213 -91.111679 -echinodermata -2006-03-23T11:40:17.654061+00:00 -
- -http://platial.com/place/28394 -Moffetts (Bonneville) Hot Springs, WA -Tags: soak, hot springs, relax, nature

Map this on Platial
Grab this on Platial ]]>
-45.658000 -121.962000 -crschmidt -2006-01-03T23:16:27.329816+00:00 -
- -http://platial.com/place/28251 -Austin Hot Springs, OR -Tags: soak, hot springs, relax, nature, popular, crowded

Map this on Platial
Grab this on Platial ]]>
-45.021000 -122.009000 -crschmidt -2006-01-03T23:11:04.489886+00:00 -
- -http://platial.com/place/28392 -Rock Creek Hot Springs, WA -Tags: soak, hot springs, relax, nature

Map this on Platial
Grab this on Platial ]]>
-45.723000 -121.927000 -crschmidt -2006-01-03T23:16:22.636855+00:00 -
- -http://platial.com/place/28391 -St. Martins (Wind River) Hot Springs, WA -Tags: hot springs, soak, relax, nature, wonderful

Map this on Platial
Grab this on Platial ]]>
-45.728000 -121.800000 -crschmidt -2006-01-03T23:16:20.383244+00:00 -
- -http://platial.com/place/28231 -Breitenbush Hot Springs, OR -Tags: hot springs, resort, relax, nature, beautiful, http:www.breitenbush.com, soaking

Map this on Platial
Grab this on Platial ]]>
-44.782000 -121.975000 -crschmidt -2006-01-03T23:10:16.529195+00:00 -
- -http://platial.com/place/28393 -Collins Hot Springs, WA -Tags: portland, nice, hot springs, soak

Map this on Platial
Grab this on Platial ]]>
-45.701000 -121.728000 -crschmidt -2006-01-03T23:16:24.648745+00:00 -
- -http://platial.com/place/31685 -Darwin's Ltd. -Address: 148 Mount Auburn St, Cambridge, MA
Tags: coffee, beer, sandwiches, freewifi



Map this on Platial
Grab this on Platial ]]>
-42.373974 -71.125053 -crschmidt -2006-01-10T09:24:08.152985+00:00 -
- -http://platial.com/place/28596 -Huckleberry Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.115000 -110.684000 -crschmidt -2006-01-03T23:24:32.283094+00:00 -
- -http://platial.com/place/28595 -South Entrance Hot Springs, WY -


Map this on Platial
Grab this on Platial ]]>
-44.142000 -110.656000 -crschmidt -2006-01-03T23:24:30.279497+00:00 -
- -http://platial.com/place/28594 -Crawfish Creek Hot Springs, WY -


Map this on Platial
Grab this on Platial ]]>
-44.157000 -110.699000 -crschmidt -2006-01-03T23:24:28.280271+00:00 -
- -http://platial.com/place/28593 -Crawfish Creek Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.165000 -110.723000 -crschmidt -2006-01-03T23:24:20.364077+00:00 -
- -http://platial.com/place/28592 -Snake Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.169000 -110.583000 -crschmidt -2006-01-03T23:24:12.234974+00:00 -
- -http://platial.com/place/28591 -Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.187000 -110.726000 -crschmidt -2006-01-03T23:24:10.027857+00:00 -
- -http://platial.com/place/28590 -Hot Springs on Upper Snake River, WY -
Map this on Platial
Grab this on Platial ]]>
-44.204000 -110.486000 -crschmidt -2006-01-03T23:24:07.79658+00:00 -
- -http://platial.com/place/28589 -Hot Springs on lewis Lake, WY -
Map this on Platial
Grab this on Platial ]]>
-44.276000 -110.636000 -crschmidt -2006-01-03T23:24:05.683418+00:00 -
- -http://platial.com/place/28588 -Rustic Geyser, WY -
Map this on Platial
Grab this on Platial ]]>
-44.282000 -110.506000 -crschmidt -2006-01-03T23:24:03.66329+00:00 -
- -http://platial.com/place/28587 -Bechler River Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.285000 -110.900000 -crschmidt -2006-01-03T23:24:01.611442+00:00 -
- -http://platial.com/place/28586 -Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.290000 -110.504000 -crschmidt -2006-01-03T23:23:59.658699+00:00 -
- -http://platial.com/place/28585 -Heart Lake Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.299000 -110.517000 -crschmidt -2006-01-03T23:23:57.181801+00:00 -
- -http://platial.com/place/28584 -Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.307000 -110.526000 -crschmidt -2006-01-03T23:23:55.240485+00:00 -
- -http://platial.com/place/28583 -Hot Springs on lewis Lake, WY -
Map this on Platial
Grab this on Platial ]]>
-44.309000 -110.654000 -crschmidt -2006-01-03T23:23:53.22295+00:00 -
- -http://platial.com/place/28582 -Shoshone Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.354000 -110.800000 -crschmidt -2006-01-03T23:23:51.179049+00:00 -
- -http://platial.com/place/28581 -Hot Springs on Continental Divide, WY -
Map this on Platial
Grab this on Platial ]]>
-44.401000 -110.936000 -crschmidt -2006-01-03T23:23:49.077176+00:00 -
- -http://platial.com/place/28580 -Hot Springs on Upper Firehole River, WY -
Map this on Platial
Grab this on Platial ]]>
-44.404000 -110.824000 -crschmidt -2006-01-03T23:23:47.054664+00:00 -
- -http://platial.com/place/28579 -Summit Lake Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.410000 -110.953000 -crschmidt -2006-01-03T23:23:45.039394+00:00 -
- -http://platial.com/place/28578 -Lone Star Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.414000 -110.817000 -crschmidt -2006-01-03T23:23:42.938808+00:00 -
- -http://platial.com/place/28577 -West. Thumb Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.417000 -110.570000 -crschmidt -2006-01-03T23:23:40.90238+00:00 -
- -http://platial.com/place/28576 -Lone Star Geyser, WY -
Map this on Platial
Grab this on Platial ]]>
-44.418000 -110.805000 -crschmidt -2006-01-03T23:23:38.844625+00:00 -
- -http://platial.com/place/28575 -Smoke Jumper Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.421000 -110.952000 -crschmidt -2006-01-03T23:23:36.818513+00:00 -
- -http://platial.com/place/28574 -West. Thumb Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.422000 -110.574000 -crschmidt -2006-01-03T23:23:34.767729+00:00 -
- -http://platial.com/place/28573 -Potts Hot Spring Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.433000 -110.581000 -crschmidt -2006-01-03T23:23:32.749915+00:00 -
- -http://platial.com/place/28572 -Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.433000 -110.813000 -crschmidt -2006-01-03T23:23:30.829745+00:00 -
- -http://platial.com/place/28571 -Hot Springs on Continental Divide, WY -
Map this on Platial
Grab this on Platial ]]>
-44.438000 -110.977000 -crschmidt -2006-01-03T23:23:28.730401+00:00 -
- -http://platial.com/place/28570 -SouthEastern Group, WY -
Map this on Platial
Grab this on Platial ]]>
-44.459000 -110.817000 -crschmidt -2006-01-03T23:23:26.706763+00:00 -
-
\ No newline at end of file diff --git a/pacotes/openlayers/examples/getfeatureinfo.html b/pacotes/openlayers/examples/getfeatureinfo.html deleted file mode 100644 index 90209c3..0000000 --- a/pacotes/openlayers/examples/getfeatureinfo.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - -World Map Query - - -
-
-

CIA Factbook

-

Click a country to see statistics about the country below.

-
-
-
-
- - - diff --git a/pacotes/openlayers/examples/gml-layer.html b/pacotes/openlayers/examples/gml-layer.html deleted file mode 100644 index a14dd97..0000000 --- a/pacotes/openlayers/examples/gml-layer.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/gml-serialize.html b/pacotes/openlayers/examples/gml-serialize.html deleted file mode 100644 index 69383b0..0000000 --- a/pacotes/openlayers/examples/gml-serialize.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -

OpenLayers Draw Point Example

-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-

Check the box to draw points. Uncheck to navigate normally.

- -
-
- - diff --git a/pacotes/openlayers/examples/gml/line.xml b/pacotes/openlayers/examples/gml/line.xml deleted file mode 100644 index 4f42499..0000000 --- a/pacotes/openlayers/examples/gml/line.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -3.924027,46.037889 2.193186,47.897181 - - - - - - - -0.631235,46.037889 2.193186,46.704963 - - - - - -0.631235,46.307557 -0.262215,46.577225 0.106805,46.477874 0.220349,46.293364 0.475824,46.406909 0.887424,46.350136 1.029354,46.563032 1.213864,46.648191 1.526112,46.421102 1.795780,46.066275 2.108028,46.037889 2.178993,46.250785 2.193186,46.492067 2.193186,46.492067 2.051255,46.704963 2.051255,46.704963 - - - 1 - - 0 - - - - - - - -3.924027,46.279171 -1.127992,47.897181 - - - - - -1.127992,46.279171 -1.369275,46.364329 -1.624750,46.406909 -1.866032,46.492067 -1.993770,46.704963 -2.178280,46.846894 -1.979577,47.059790 -2.164087,47.144948 -2.135700,47.215914 -2.093121,47.357844 -2.277631,47.258493 -2.391176,47.301072 -2.490527,47.315265 -2.476334,47.443003 -2.575686,47.599127 -2.703423,47.542354 -2.873740,47.471389 -3.285339,47.670092 -3.597587,47.769443 -3.824676,47.840409 -3.924027,47.897181 - - - 2 - - 0 - - - \ No newline at end of file diff --git a/pacotes/openlayers/examples/gml/multipoint.xml b/pacotes/openlayers/examples/gml/multipoint.xml deleted file mode 100644 index 803fd47..0000000 --- a/pacotes/openlayers/examples/gml/multipoint.xml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - 0.490018,45.001795 3.016384,45.839186 - - - - - - - 0.930003,45.001795 3.016384,45.541131 - - - - - - - 2.079641,45.001795 - - - - - 2.718330,45.541131 - - - - - 3.016384,45.143725 - - - - - 0.930003,45.001795 - - - - - 1 - 4 points - 1 - - - - - - - 0.490018,45.654676 1.157092,45.839186 - - - - - - - 0.490018,45.654676 - - - - - 1.157092,45.839186 - - - - - 2 - 2 points - 2 - - - \ No newline at end of file diff --git a/pacotes/openlayers/examples/gml/multipolygon.xml b/pacotes/openlayers/examples/gml/multipolygon.xml deleted file mode 100644 index bcdb39e..0000000 --- a/pacotes/openlayers/examples/gml/multipolygon.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - -1.738295,46.307557 3.754424,47.244300 - - - - - - - -1.738295,46.605612 1.767394,47.244300 - - - - - - - - - 1.313216,46.690770 1.000968,46.861087 0.887424,47.059790 1.142899,47.244300 1.355795,47.244300 1.554498,47.017211 1.710622,47.059790 1.767394,46.747542 1.313216,46.690770 1.313216,46.690770 - - - - - - - - - 0.731300,46.605612 -0.191250,46.704963 -0.191250,46.846894 0.177770,46.988824 0.447438,46.960438 0.589369,46.804315 0.688721,46.832701 0.731300,46.605612 0.731300,46.605612 - - - - - - - - - -1.610557,46.733349 -1.184765,46.704963 -1.198958,46.704963 -0.943483,46.619805 -0.915096,46.818508 -0.659621,46.775928 -0.688007,47.017211 -0.943483,47.003018 -1.127992,47.088176 -1.397661,47.102369 -1.624750,47.073983 -1.738295,46.917859 -1.610557,46.733349 - - - - - - - 1 - My first Multipolygon - 0 - - - - - - - 2.789295,46.392716 3.754424,46.903666 - - - - - - - 2.959612,46.392716 2.789295,46.775928 3.172508,46.903666 3.498949,46.903666 3.498949,46.662384 3.754424,46.563032 2.959612,46.392716 - - - - - 2 - My second Multipolygon - 0 - - - - - - - 2.207379,46.307557 2.803488,47.045597 - - - - - - - - - 2.292538,46.804315 2.207379,47.017211 2.391889,47.045597 2.562206,46.832701 2.292538,46.804315 - - - - - - - - - 2.789295,46.307557 2.789295,46.307557 2.803488,46.506260 2.618978,46.676577 2.349310,46.633998 2.448661,46.392716 2.789295,46.307557 - - - - - - - 3 - My third Multipolygon - 0 - - - \ No newline at end of file diff --git a/pacotes/openlayers/examples/gml/owls.xml b/pacotes/openlayers/examples/gml/owls.xml deleted file mode 100644 index 4a001ec..0000000 --- a/pacotes/openlayers/examples/gml/owls.xml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - -89.817223,45.005555 -74.755001,51.701388 - - - - - - -79.771668,45.891110 -79.771668,45.891110 - - - - - -79.771668,45.891110 - - - - - - - - - -83.755834,46.365277 -83.755834,46.365277 - - - owl - - - -83.755834,46.365277 - - - - - - - - - -83.808612,46.175277 -83.808612,46.175277 - - - - - -83.808612,46.175277 - - - - - - - - - -84.111112,46.309166 -84.111112,46.309166 - - - - - -84.111112,46.309166 - - - - - - - - - -83.678612,46.821110 -83.678612,46.821110 - - - - - -83.678612,46.821110 - - - - - - - - - -83.664445,46.518888 -83.664445,46.518888 - - - - - -83.664445,46.518888 - - - - - - - - - -80.613334,46.730277 -80.613334,46.730277 - - - - - -80.613334,46.730277 - - - - - - - - - -79.676946,45.428054 -79.676946,45.428054 - - - - - -79.676946,45.428054 - - - - - - - - - -83.853056,46.236944 -83.853056,46.236944 - - - - - -83.853056,46.236944 - - - - - - - - - -82.289167,45.896388 -82.289167,45.896388 - - - - - -82.289167,45.896388 - - - - - - diff --git a/pacotes/openlayers/examples/gml/point.xml b/pacotes/openlayers/examples/gml/point.xml deleted file mode 100644 index 10a4820..0000000 --- a/pacotes/openlayers/examples/gml/point.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - -0.608315,44.857522 -0.021418,45.477577 - - - - - - - -0.608315,44.857522 -0.608315,44.857522 - - - - - -0.608315,44.857522 - - - 1 - Bordeaux - 124 - - - - - - - -0.021418,45.477577 -0.021418,45.477577 - - - - - -0.021418,45.477577 - - - 2 - Barbezieux - 0 - - - \ No newline at end of file diff --git a/pacotes/openlayers/examples/gml/polygon.xml b/pacotes/openlayers/examples/gml/polygon.xml deleted file mode 100644 index e4f6903..0000000 --- a/pacotes/openlayers/examples/gml/polygon.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - -0.768746,47.003018 3.002191,47.925567 - - - - - - - -0.768746,47.003018 0.532597,47.925567 - - - - - - - - - -0.318987,47.003018 -0.768746,47.358268 -0.574463,47.684285 -0.347374,47.854602 -0.006740,47.925567 0.135191,47.726864 0.149384,47.599127 0.419052,47.670092 0.532597,47.428810 0.305508,47.443003 0.475824,47.144948 0.064225,47.201721 -0.318987,47.003018 - - - - - -0.035126,47.485582 -0.035126,47.485582 -0.049319,47.641706 -0.233829,47.655899 -0.375760,47.457196 -0.276408,47.286879 -0.035126,47.485582 - - - - - - - 1 - My Polygon with hole - 0 - - - - - - - 1.511919,47.088176 3.002191,47.882988 - - - - - - - 1.625463,47.357844 1.511919,47.741057 1.880938,47.882988 2.420275,47.797830 2.789295,47.485582 3.002191,47.457196 2.874453,47.088176 2.178993,47.343651 1.625463,47.357844 - - - - - 2 - My simple Polygon - 0 - - - - - - - 0.000000,45.000000 2.000000,47.000000 - - - - - - - - - 0.000000,45.000000 2.000000,45.000000 2.000000,47.000000 0.000000,47.000000 0.000000,45.000000 - - - - - 0.500000,45.500000 1.500000,45.500000 1.500000,46.500000 0.500000,46.500000 0.500000,45.500000 - - - - - - - 3 - my polygon with hole - 3 - - - \ No newline at end of file diff --git a/pacotes/openlayers/examples/google.html b/pacotes/openlayers/examples/google.html deleted file mode 100644 index e0eed0d..0000000 --- a/pacotes/openlayers/examples/google.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - -

OpenLayers With Google Layer Example

-
-
click to add a marker to the map
-
click to remove the marker from the map
- - diff --git a/pacotes/openlayers/examples/gutter.html b/pacotes/openlayers/examples/gutter.html deleted file mode 100644 index f8ddf64..0000000 --- a/pacotes/openlayers/examples/gutter.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - -

OpenLayers Gutter Example

-
-

- When you render tiles with certain types of symbols, there are artifacts - at tile edges that make symbology not look continuous. In the center of - the above map (when it first loads), the large orange road is split - vertically by a tile. Open the layer switcher and change to the layer - with a 15 pixel gutter to see how the symbology looks nicer. -

- - - diff --git a/pacotes/openlayers/examples/image-layer.html b/pacotes/openlayers/examples/image-layer.html deleted file mode 100644 index bcfab86..0000000 --- a/pacotes/openlayers/examples/image-layer.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - -

OpenLayers Image Layer Example

-
-

- The "City Lights" layer above is created from a single web accessible - image. If you construct it without any resolution related options, - the layer will be given a single resolution based on the extent/size. - Otherwise, it behaves much like a regular layer. This is primarily - intended to be used in an overview map - where another layer type - might not make a good overview. -

- - diff --git a/pacotes/openlayers/examples/kamap.html b/pacotes/openlayers/examples/kamap.html deleted file mode 100644 index d2798e5..0000000 --- a/pacotes/openlayers/examples/kamap.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/kamap.txt b/pacotes/openlayers/examples/kamap.txt deleted file mode 100644 index 50fa4e0..0000000 --- a/pacotes/openlayers/examples/kamap.txt +++ /dev/null @@ -1,508 +0,0 @@ -value pair. - * - * The key is the name to be used by the tile caching system to store cached - * tiles within the base cache directory. This key should be a single word - * that uniquely identifies the map. - * - * The value associated with each key is an array of three values. The first - * value is a human-readable name to be presented to the user (should the - * application choose to do so) and the second value is the path to the map - * file. It is assumed that the map file is fully configured for use with - * MapServer/MapScript as no error checking or setting of values is done. The - * third value is an array of scale values for zooming. - */ - -$aszMapFiles = array( - "world" => array( "World", "/path/to/your/mapfile", - array( 10000 ), # in openlayers, the scale array doesn't matter. - "PNG24") - -/* Add more elements to this array to offer multiple mapfiles */ - -); - -/****************************************************************************** - * figure out which map file to use and set up the necessary variables for - * the rest of the code to use. This does need to be done on every page load - * unfortunately. - * - * szMap should be set to the default map file to use but can change if - * this script is called with map=. - */ -$szMap = 'world'; - -/****************************************************************************** - * kaMap! caching - * - * this is the directory within which kaMap! will create its tile cache. The - * directory does NOT have to be web-accessible, but it must be writable by the - * web-server-user and allow creation of both directories AND files. - * - * the tile caching system will create a separate subdirectory within the base - * cache directory for each map file. Within the cache directory for each map - * file, directories will be created for each group of layers. Within the group - * directories, directories will be created at each of the configured scales - * for the application (see mapfile configuration above.) - */ -$szBaseCacheDir = "/var/cache/kamap/"; - -/***** END OF CONFIGURABLE STUFF - unless you know what you are doing *****/ -/***** *****/ -/***** *****/ -/***** *****/ -/***** END OF CONFIGURABLE STUFF - unless you know what you are doing *****/ - -if (isset($_REQUEST['map']) && isset($aszMapFiles[$_REQUEST['map']])) -{ - $szMap = $_REQUEST['map']; -} - -$szMapCacheDir = $szBaseCacheDir.$szMap."/"; -$szMapName = $aszMapFiles[$szMap][0]; -$szMapFile = $aszMapFiles[$szMap][1]; -$anScales = $aszMapFiles[$szMap][2]; -setOutputFormat($aszMapFiles[$szMap][3]); -/****************************************************************************** - * output format of the map and resulting tiles - * - * The output format used with MapServer can greatly affect appearance and - * performance. It is recommended to use an 8 bit format such as PNG - * - * NOTE: the tile caching code in tile.php is not configurable here. It - * currently assumes that it is outputting 8bit PNG files. If you change to - * PNG24 here then you will need to update tile.php to use the gd function - * imagecreatetruecolor. If you change the output format to jpeg then - * you would need to change imagepng() to imagejpeg(). A nice enhancement - * would be to make that fully configurable from here. - */ -function setOutputFormat($szFormat) -{ - switch($szFormat) { - case "PNG24": - $GLOBALS['szMapImageFormat'] = 'PNG24'; //mapscript format name - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; // appropriate GD function - $GLOBALS['szImageExtension'] = '.png'; //file extension - $GLOBALS['szImageCreateFunction'] = "imagecreatetruecolor"; //or imagecreatetruecolor if PNG24 ... - $GLOBALS['szImageOutputFunction'] = "imagepng"; //or imagegif, imagejpeg ... - $GLOBALS['szImageHeader'] = 'image/png'; //the content-type of the image - break; - case "GIF": - $GLOBALS['szMapImageFormat'] = 'GIF'; //mapscript format name - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefromgif"; // appropriate GD function - $GLOBALS['szImageExtension'] = '.gif'; //file extension - $GLOBALS['szImageCreateFunction'] = "imagecreate"; //or imagecreatetruecolor if PNG24 ... - $GLOBALS['szImageOutputFunction'] = "imagegif"; //or imagegif, imagejpeg ... - $GLOBALS['szImageHeader'] = 'image/gif'; //the content-type of the image - break; - case "JPEG": - $GLOBALS['szMapImageFormat'] = 'JPEG'; //mapscript format name - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefromjpeg"; // appropriate GD function - $GLOBALS['szImageExtension'] = '.jpg'; //file extension - $GLOBALS['szImageCreateFunction'] = "imagecreatetruecolor"; //or imagecreatetruecolor if PNG24 ... - $GLOBALS['szImageOutputFunction'] = "imagejpeg"; //or imagegif, imagejpeg ... - $GLOBALS['szImageHeader'] = 'image/jpeg'; //the content-type of the image - break; - case "PNG": - $GLOBALS['szMapImageFormat'] = 'PNG'; //mapscript format name - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; // appropriate GD function - $GLOBALS['szImageExtension'] = '.png'; //file extension - $GLOBALS['szImageCreateFunction'] = "imagecreate"; //or imagecreatetruecolor if PNG24 ... - $GLOBALS['szImageOutputFunction'] = "imagepng"; //or imagegif, imagejpeg ... - $GLOBALS['szImageHeader'] = 'image/png'; //the content-type of the image - break; - case "DITHERED": - case "PNG8": - $GLOBALS['szMapImageFormat'] = 'dithered'; - $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng"; - $GLOBALS['szImageExtension'] = '.png'; - $GLOBALS['szImageCreateFunction'] = "imagecreate"; - $GLOBALS['szImageOutputFunction'] = "imagepng"; - $GLOBALS['szImageHeader'] = 'image/png'; - break; - } -} - -/** - * create all directories in a directory tree - found on the php web site - * under the mkdir function ... - */ -function makeDirs($strPath, $mode = 0775) -{ - return is_dir($strPath) or ( makeDirs(dirname($strPath), $mode) and mkdir($strPath, $mode) ); -} - -/** - * This function replaces all special characters in the given string. - * - * @param szString string - The string to convert. - * - * @return string converted - */ -function normalizeString($szString) -{ - // Normalize string by replacing all special characters - // e.g. "http://my.host.com/cgi-bin/mywms?" - // becomes "http___my_host_com_cgi_bin_mywms_" - return preg_replace("/(\W)/", "_", $szString); -} - -/* bug 1253 - root permissions required to delete cached files */ -$orig_umask = umask(0); - -/* create the main cache directory if necessary */ -if (!@is_dir($szMapCacheDir)) - makeDirs($szMapCacheDir); - -/* get the various request parameters - * also need to make sure inputs are clean, especially those used to - * build paths and filenames - */ - /* - * the tile renderer accepts several parameters and returns a tile image from - * the cache, creating the tile only if necessary. - * - * all requests include the pixel location of the request at a certain scale - * and this script figures out the geographic location of the tile from the - * scale assuming that 0,0 in pixels is 0,0 in geographic units - * - * Request parameters are: - * - * map: the name of the map to use. This is handled by config.php. - * - * t: top pixel position - * l: left pixel position - * s: scale - * g: (optional) comma-delimited list of group names to draw - * layers: (optional) comma-delimited list of layers to draw - * force: optional. If set, force redraw of the meta tile. This was added to - * help with invalid images sometimes being generated. - * tileid: (optional) can be used instead of t+l to specify the tile coord., - * useful in regenerating the cache - */ - -$top = isset( $_REQUEST['t'] ) ? intval($_REQUEST['t']) : 0; -$left = isset( $_REQUEST['l'] ) ? intval($_REQUEST['l']) : 0; -$scale = isset( $_REQUEST['s'] ) ? $_REQUEST['s'] : $anScales[0]; -$bForce = isset($_REQUEST['force'])? true : false; -$groups = isset( $_REQUEST['g'] ) ? $_REQUEST['g'] : ""; -$layers = isset( $_REQUEST['layers'] ) ? $_REQUEST['layers'] : ""; - -// dynamic imageformat ---------------------------------------------- -//use the function in config.php to set the output format -if (isset($_REQUEST['i'])) - setOutputFormat( $_REQUEST['i'] ); -//---------------------------------------------------------------- - -/* tileid=t#####l#### can be used instead of t+l parameters. Useful in - * regenerating the cache for instance. - */ -if (isset( $_REQUEST['tileid']) && - preg_match("/t(-?\d+)l(-?\d+)/", $_REQUEST['tileid'], $aMatch) ) -{ - $top = intval($aMatch[1]); - $left = intval($aMatch[2]); -} - -/* Calculate the metatile's top-left corner coordinates. - * Include the $metaBuffer around the metatile to account for various - * rendering issues happening around the edge of a map - */ -$metaLeft = floor( ($left)/($tileWidth*$metaWidth) ) * $tileWidth * $metaWidth; -$metaTop = floor( ($top)/($tileHeight*$metaHeight) ) * $tileHeight *$metaHeight; -$szMetaTileId = "t".$metaTop."l".$metaLeft; -$metaLeft -= $metaBuffer; -$metaTop -= $metaBuffer; - -/* caching is done by scale value, then groups and layers and finally metatile - * and tile id. Create a new directory if necessary - */ -$szGroupDir = $groups != "" ? normalizeString($groups) : "def"; -$szLayerDir = $layers != "" ? normalizeString($layers) : "def"; - -$szCacheDir = $szMapCacheDir."/".$scale."/".$szGroupDir."/".$szLayerDir."/".$szMetaTileId; -if (!@is_dir($szCacheDir)) - makeDirs($szCacheDir); - -/* resolve cache hit - clear the os stat cache if necessary */ -$szTileId = "t".$top."l".$left; -$szCacheFile = $szCacheDir."/".$szTileId.$szImageExtension; -clearstatcache(); - -$szMetaDir = $szCacheDir."/meta"; -if (!@is_Dir($szMetaDir)) - makeDirs($szMetaDir); - -/* simple locking in case there are several requests for the same meta - tile at the same time - only draw it once to help with performance */ -$szLockFile = $szMetaDir."/lock_".$metaTop."_".$metaLeft; -$fpLockFile = fopen($szLockFile, "a+"); -clearstatcache(); -if (!file_exists($szCacheFile) || $bForce) -{ - flock($fpLockFile, LOCK_EX); - fwrite($fpLockFile, "."); - - //check once more to see if the cache file was created while waiting for - //the lock - clearstatcache(); - if (!file_exists($szCacheFile) || $bForce) - { - if (!extension_loaded('MapScript')) - { - dl( $szPHPMapScriptModule ); - } - if (!extension_loaded('gd')) - { - dl( $szPHPGDModule); - } - - if (!@is_Dir($szMetaDir)) - makeDirs($szMetaDir); - - $oMap = ms_newMapObj($szMapFile); - - /* Metatile width/height include 2x the metaBuffer value */ - $oMap->set('width', $tileWidth * $metaWidth + 2*$metaBuffer); - $oMap->set('height', $tileHeight * $metaHeight + 2*$metaBuffer); - - /* Tell MapServer to not render labels inside the metaBuffer area - * (new in 4.6) - * TODO: Until MapServer bugs 1353/1355 are resolved, we need to - * pass a negative value for "labelcache_map_edge_buffer" - */ - $oMap->setMetadata("labelcache_map_edge_buffer", -$metaBuffer); - - $inchesPerUnit = array(1, 12, 63360.0, 39.3701, 39370.1, 4374754); - $geoWidth = $scale/($oMap->resolution*$inchesPerUnit[$oMap->units]); - $geoHeight = $scale/($oMap->resolution*$inchesPerUnit[$oMap->units]); - - /* draw the metatile */ - $minx = $metaLeft * $geoWidth; - $maxx = $minx + $geoWidth * $oMap->width; - $maxy = -1 * $metaTop * $geoHeight; - $miny = $maxy - $geoHeight * $oMap->height; - - $nLayers = $oMap->numlayers; - $oMap->setExtent($minx,$miny,$maxx,$maxy); - $oMap->selectOutputFormat( $szMapImageFormat ); - $aszLayers = array(); - if ($groups || $layers) - { - /* Draw only specified layers instead of default from mapfile*/ - if ($layers) - { - $aszLayers = explode(",", $layers); - } - - if ($groups) - { - $aszGroups = explode(",", $groups); - } - - for($i=0;$i<$nLayers;$i++) - { - $oLayer = $oMap->getLayer($i); - if (($aszGroups && in_array($oLayer->group,$aszGroups)) || - ($aszLayers && in_array($oLayer->name,$aszLayers)) || - ($aszGroups && $oLayer->group == '' && - in_array( "__base__", $aszGroups))) - { - $oLayer->set("status", MS_ON ); - } - else - { - $oLayer->set("status", MS_OFF ); - } - } - //need transparency if groups or layers are used - $oMap->outputformat->set("transparent", MS_ON ); - } - else - { - $oMap->outputformat->set("transparent", MS_OFF ); - } - - - $szMetaImg = $szMetaDir."/t".$metaTop."l".$metaLeft.$szImageExtension; - $oImg = $oMap->draw(); - $oImg->saveImage($szMetaImg); - $oImg->free(); - eval("\$oGDImg = ".$szMapImageCreateFunction."('".$szMetaImg."');"); - if ($bDebug) - { - $blue = imagecolorallocate($oGDImg, 0, 0, 255); - imagerectangle($oGDImg, 0, 0, $tileWidth * $metaWidth - 1, $tileHeight * $metaHeight - 1, $blue ); - } - for($i=0;$i<$metaWidth;$i++) - { - for ($j=0;$j<$metaHeight;$j++) - { - eval("\$oTile = ".$szImageCreateFunction."( ".$tileWidth.",".$tileHeight." );"); - // Allocate BG color for the tile (in case the metatile has transparent BG) - $nTransparent = imagecolorallocate($oTile, $oMap->imagecolor->red, $oMap->imagecolor->green, $oMap->imagecolor->blue); - //if ($oMap->outputformat->transparent == MS_ON) - //{ - imagecolortransparent( $oTile,$nTransparent); - //} - $tileTop = $j*$tileHeight + $metaBuffer; - $tileLeft = $i*$tileWidth + $metaBuffer; - imagecopy( $oTile, $oGDImg, 0, 0, $tileLeft, $tileTop, $tileWidth, $tileHeight ); - /* debugging stuff */ - if ($bDebug) - { - $black = imagecolorallocate($oTile, 1, 1, 1); - $green = imagecolorallocate($oTile, 0, 128, 0 ); - $red = imagecolorallocate($oTile, 255, 0, 0); - imagerectangle( $oTile, 1, 1, $tileWidth-2, $tileHeight-2, $green ); - imageline( $oTile, 0, $tileHeight/2, $tileWidth-1, $tileHeight/2, $red); - imageline( $oTile, $tileWidth/2, 0, $tileWidth/2, $tileHeight-1, $red); - imagestring ( $oTile, 3, 10, 10, ($metaLeft+$tileLeft)." x ".($metaTop+$tileTop), $black ); - imagestring ( $oTile, 3, 10, 30, ($minx+$i*$geoWidth)." x ".($maxy - $j*$geoHeight), $black ); - } - $szTileImg = $szCacheDir."/t".($metaTop+$tileTop)."l".($metaLeft+$tileLeft).$szImageExtension; - eval("$szImageOutputFunction( \$oTile, '".$szTileImg."' );"); - imagedestroy($oTile); - $oTile = null; - } - } - if ($oGDImg != null) - { - imagedestroy($oGDImg); - $oGDImg = null; - } - if (!$bDebug) - { - unlink( $szMetaImg ); - } - } - //release the exclusive lock - flock($fpLockFile, LOCK_UN ); -} - -//acquire shared lock for reading to prevent a problem that could occur -//if a tile exists but is only partially generated. -flock($fpLockFile, LOCK_SH); - -$h = fopen($szCacheFile, "r"); -header("Content-Type: ".$szImageHeader); -header("Content-Length: " . filesize($szCacheFile)); -header("Expires: " . date( "D, d M Y H:i:s GMT", time() + 31536000 )); -header("Cache-Control: max-age=31536000, must-revalidate" ); -fpassthru($h); -fclose($h); - -//release lock -fclose($fpLockFile); - -/* bug 1253 - root permissions required to delete cached files */ -umask($orig_umask); - -exit; -?> diff --git a/pacotes/openlayers/examples/kml-layer-linestring.html b/pacotes/openlayers/examples/kml-layer-linestring.html deleted file mode 100644 index d8978f6..0000000 --- a/pacotes/openlayers/examples/kml-layer-linestring.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/kml-layer.html b/pacotes/openlayers/examples/kml-layer.html deleted file mode 100644 index 72053a4..0000000 --- a/pacotes/openlayers/examples/kml-layer.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/kml/lines.kml b/pacotes/openlayers/examples/kml/lines.kml deleted file mode 100644 index 6dc09d7..0000000 --- a/pacotes/openlayers/examples/kml/lines.kml +++ /dev/null @@ -1,267 +0,0 @@ - - - - KML Samples - 1 - Unleash your creativity with the help of these examples! - - - - - - - - - - - - - - Paths - 0 - Examples of paths. Note that the tessellate tag is by default - set to 0. If you want to create tessellated lines, they must be authored - (or edited) directly in KML. - - Tessellated - 0 - tag has a value of 1, the line will contour to the underlying terrain]]> - - -112.0822680013139 - 36.09825589333556 - 0 - 2889.145007690472 - 62.04855796276328 - 103.8120432044965 - - - 1 - -112.0814237830345,36.10677870477137,0 - -112.0870267752693,36.0905099328766,0 - - - - Untessellated - 0 - tag has a value of 0, the line follow a simple straight-line path from point to point]]> - - -112.0822680013139 - 36.09825589333556 - 0 - 2889.145007690472 - 62.04855796276328 - 103.8120432044965 - - - 0 - -112.080622229595,36.10673460007995,0 - -112.085242575315,36.09049598612422,0 - - - - Absolute - 0 - Transparent purple line - - -112.2719329043177 - 36.08890633450894 - 0 - 2569.386744398339 - 44.60763714063257 - -106.8161545998597 - - #transPurpleLineGreenPoly - - 1 - absolute - -112.265654928602,36.09447672602546,2357 - -112.2660384528238,36.09342608838671,2357 - -112.2668139013453,36.09251058776881,2357 - -112.2677826834445,36.09189827357996,2357 - -112.2688557510952,36.0913137941187,2357 - -112.2694810717219,36.0903677207521,2357 - -112.2695268555611,36.08932171487285,2357 - -112.2690144567276,36.08850916060472,2357 - -112.2681528815339,36.08753813597956,2357 - -112.2670588176031,36.08682685262568,2357 - -112.2657374587321,36.08646312301303,2357 - - - - Absolute Extruded - 0 - Transparent green wall with yellow outlines - - -112.2643334742529 - 36.08563154742419 - 0 - 4451.842204068102 - 44.61038665812578 - -125.7518698668815 - - #yellowLineGreenPoly - - 1 - 1 - absolute - -112.2550785337791,36.07954952145647,2357 - -112.2549277039738,36.08117083492122,2357 - -112.2552505069063,36.08260761307279,2357 - -112.2564540158376,36.08395660588506,2357 - -112.2580238976449,36.08511401044813,2357 - -112.2595218489022,36.08584355239394,2357 - -112.2608216347552,36.08612634548589,2357 - -112.262073428656,36.08626019085147,2357 - -112.2633204928495,36.08621519860091,2357 - -112.2644963846444,36.08627897945274,2357 - -112.2656969554589,36.08649599090644,2357 - - - - Relative - 0 - Black line (10 pixels wide), height tracks terrain - - -112.2580438551384 - 36.1072674824385 - 0 - 2927.61105910266 - 44.61324882043339 - 4.947421249553717 - - #thickBlackLine - - 1 - relativeToGround - -112.2532845153347,36.09886943729116,645 - -112.2540466121145,36.09919570465255,645 - -112.254734666947,36.09984998366178,645 - -112.255493345654,36.10051310621746,645 - -112.2563157098468,36.10108441943419,645 - -112.2568033076439,36.10159722088088,645 - -112.257494011321,36.10204323542867,645 - -112.2584106072308,36.10229131995655,645 - -112.2596588987972,36.10240001286358,645 - -112.2610581199487,36.10213176873407,645 - -112.2626285262793,36.10157011437219,645 - - - - Relative Extruded - 0 - Opaque blue walls with red outline, height tracks terrain - - -112.2683594333433 - 36.09884362144909 - 0 - 2184.193522571467 - 44.60855445139561 - -72.24271551768405 - - #redLineBluePoly - - 1 - 1 - relativeToGround - -112.2656634181359,36.09445214722695,630 - -112.2652238941097,36.09520916122063,630 - -112.2645079986395,36.09580763864907,630 - -112.2638827428817,36.09628572284063,630 - -112.2635746835406,36.09679275951239,630 - -112.2635711822407,36.09740038871899,630 - -112.2640296531825,36.09804913435539,630 - -112.264327720538,36.09880337400301,630 - -112.2642436562271,36.09963644790288,630 - -112.2639148687042,36.10055381117246,630 - -112.2626894973474,36.10149062823369,630 - - - - - diff --git a/pacotes/openlayers/examples/kml/mc-search.kml b/pacotes/openlayers/examples/kml/mc-search.kml deleted file mode 100644 index 576c626..0000000 --- a/pacotes/openlayers/examples/kml/mc-search.kml +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - 28 locations. Of 27,281,538 total documents, ~26,900,000 documents match <no keywords> in this region.]]> - 1 - - -82.575000 - 27.498610 - 6000000.0 - 0.0 - 0.0 - - - - - - - - - - - - - - - - -FHP: Troop F Bradenton District
FHP: Troop F Bradenton District Bradento
FHP: Troop F Bradenton District Bradenton District The Bradenton District is located at Troop F Headquarters and includes all of Manatee County. The Bradenton District ...

]]>
-#rel1.0 - - -82.575000, 27.498610 - -
- - - Pezinok
Pezinok Coor titl
Pezinok Coor title dm4616N1716Etype:cityregion:SK Infobox Slovak town image_coat_of_arms subject_name Pezinok slovak_region Bratislava Region slovak_district ...

]]>
-#rel1.0 - - 17.266666, 48.283333 - -
- - -Purcellville Urban Growth Area Management Plan
Purcellville Urban Growth Are
Purcellville Urban Growth Area Management Plan Skip Navigation Purcellville Urban Growth Area Management Plan Welcome to the Purcellville Urban Growth Area Management ...

]]>
-#rel1.0 - - -77.715000, 39.136670 - -
- - -Calaveras County Public Health
Calaveras County Public Healt
Calaveras County Public Health County of Calaveras Public Health Department West Nile Virus (WNV) WNV is a disease that is spread to ...

]]>
-#rel1.0 - - -120.583330, 38.166670 - -
- - - Kolkata Film Festival
Kolkata Film Festiva
Kolkata Film Festival '''Kolkata Film Festival''' is an annual international film festival held in Kolkata in the Indian state of West Bengal ...

]]>
-#rel1.0 - - 88.369722, 22.569722 - -
- - -South Yorkshire Strategic Health Authority - Events - Deliver...
South Yorkshire Strategic Healt
South Yorkshire Strategic Health Authority - Events - Delivering Excellence event 12th June 2003 Welcome What's new Local services Performance --> Strategy Service redesign ...

South Yorkshire Strategic Health Authority - Welcome
South Yorkshire Strategic Healt
South Yorkshire Strategic Health Authority - Welcome --> Welcome What's new Local services Performance --> Strategy Service redesign Franchise plan Local delivery plan Structure ...

South Yorkshire Strategic Health Authority - Welcome
South Yorkshire Strategic Healt
South Yorkshire Strategic Health Authority - Welcome --> Welcome What's new Local services Performance --> Strategy Service redesign Franchise plan Local delivery plan Structure ...

]]>
-#rel1.0 - - -1.250000, 53.450000 - -
- - -Frequently Asked Questions
What is Alert Gaithersburg? What is an Aler
... email address password Lost password? Gaithersburg Home Alert Home New User Learn More FAQ Support Frequently Asked Questions What is Alert Gaithersburg? What is an Alert Gaithersburg account? How does Alert Gaithersburg work? Will my cell phone work? What is text messaging and ...

Alert Gaithersburg
Alert Gaithersburg USER LOGIN emai
Alert Gaithersburg USER LOGIN email address password Lost password? Gaithersburg Home Alert Home New User Learn More FAQ Support This application requires Javascript ...

]]>
-#rel1.0 - - -77.201670, 39.143330 - -
- - -Bannock
Cycle 404 S Arthur Pocatello 232.3711 City o
Bannock Bannock County Gateway Cycle 404 S Arthur Pocatello 232.3711 City of Pocatello 902 Sherman St Pocatello 234.6237 ISU Outdoor Program Student Union Bldg Pocatello 236.3912 The ...

]]>
-#rel1.0 - - -112.444720, 42.871390 - -
- - -OMS | Avec 75 % des enfants protA©gA©s contre les parasites, ...
les parasites, le Cambodge est le premier pay
OMS | Avec 75 % des enfants protA©gA©s contre les parasites, le Cambodge est le premier pays A  atteindre l'objectif Ensemble de l'OMS Ce site seulement Page d'accueil OMS Pays ...

]]>
-#rel1.0 - - 105.000000, 13.000000 - -
- - -Google Gruppi : italia.firenze.discussioni
Gruppi : italia.firenze.discussioni Hom
Google Gruppi : italia.firenze.discussioni Home page di Gruppi | Guida | Entra Web Immagini Gruppi Directory News altro » Ricerca avanzata nei Gruppi Preferenze Membri: Entra ...

]]>
-#rel1.0 - - 11.250000, 43.766666 - -
- - -Employment Statistics & Information - Fairfax County, Virginia
Information - Fairfax County, Virginia Busines
Employment Statistics & Information - Fairfax County, Virginia Business & Nonresidential Gross Floor Area Census Information & Other Government Agencies Economic Information Employment Information General Overview Glossary Housing Immigration ...

Search Fairfax County Contacts - Fairfax County, Virginia
Search Fairfax County Contacts - Fairfa
Search Fairfax County Contacts - Fairfax County, Virginia Search Fairfax County Contacts you are here : homepage > fairfax county contacts To search for an agency ...

Other Information - Fairfax County, Virginia
Information - Fairfax County, Virginia Averag
Other Information - Fairfax County, Virginia Average Household Size Health Insurance Age Distribution Persons Speaking Languages Other than English Prior Place of Residence Educational Attainment ...

Housing Information - Fairfax County, Virginia
Information - Fairfax County, Virginia Busines
Housing Information - Fairfax County, Virginia Business & Nonresidential Gross Floor Area Census Information & Other Government Agencies Economic Information Employment Information General Overview Glossary Housing Immigration ...

Population Information - Fairfax County, Virginia
Information - Fairfax County, Virginia Busines
Population Information - Fairfax County, Virginia Business & Nonresidential Gross Floor Area Census Information & Other Government Agencies Economic Information Employment Information General Overview Glossary Housing Immigration ...

Business Services and Resources - Doing Business - Fairfax Co...
Doing Business - Fairfax County, Virginia Busines
Business Services and Resources - Doing Business - Fairfax County, Virginia Business Services & Resources you are here : homepage > doing business > business services and resources Fairfax County has a diverse and ...

Search Fairfax County Contacts - Fairfax County, Virginia
Search Fairfax County Contacts - Fairfa
Search Fairfax County Contacts - Fairfax County, Virginia Search Fairfax County Contacts you are here : homepage > fairfax county contacts To search for an agency ...

]]>
-#rel1.0 - - -77.350000, 38.850000 - -
- - -Nassau Bahamas Vacation » Crawfish Production Declines In The...
Nassau Bahamas Vacation » Crawfis
Nassau Bahamas Vacation » Crawfish Production Declines In The Bahamas Nassau Bahamas Vacation Crawfish Production Declines In The Bahamas June 15, 2006 ...

]]>
-#rel1.0 - - -77.350000, 25.083333 - -
- - -Membership Renewal Print/View
Application DuPont Front Royal E.I. Du Pont d
Membership Renewal Print/View OMB No. 2010-0032 Expiration Date 08/30/06 Performance Track Membership Renewal Application DuPont Front Royal E.I. Du Pont de Nemours and Company, Inc. Member since 2002 A030029 Facility Contact    Name: Mr. James ...

]]>
-#rel1.0 - - -78.194720, 38.918060 - -
- - -SCHUMER, CLINTON SECURE $1.5 MILLION FOR NEW BUSES IN WESTCHE...
FOR NEW BUSES IN WESTCHESTER COUNTY TOPICS Latest New
SCHUMER, CLINTON SECURE $1.5 MILLION FOR NEW BUSES IN WESTCHESTER COUNTY TOPICS Latest News Press Release Archive Special Reports Photo Downloads Schumer Around NY About Chuck | Senate Floor | Press Room | Services ...

SCHUMER, CLINTON SECURE $3 MILLION FOR NEW BUSES IN WESTCHEST...
FOR NEW BUSES IN WESTCHESTER COUNTY TOPICS Latest New
SCHUMER, CLINTON SECURE $3 MILLION FOR NEW BUSES IN WESTCHESTER COUNTY TOPICS Latest News Press Release Archive Special Reports Photo Downloads Schumer Around NY About Chuck | Senate Floor | Press Room | Services ...

]]>
-#rel1.0 - - -73.800000, 41.116670 - -
- - -Restaurant makes donation to Friends of Oswego County Hospice
to Friends of Oswego County Hospice Fulton, N
Restaurant makes donation to Friends of Oswego County Hospice Fulton, NY Front Page Viewpoints Hannibal News Phoenix News Oswego News Local News & Photos Obituaries Entertainment and Arts Church ...

Fund-raiser held for Oswego County Hospice
raiser held for Oswego County Hospice Fulton, N
Fund-raiser held for Oswego County Hospice Fulton, NY Front Page Viewpoints Hannibal News Phoenix News Oswego News Local News & Photos Obituaries Entertainment and Arts Church ...

]]>
-#rel1.0 - - -76.150000, 43.450000 - -
- - -Providence Hood River Memorial Hospital Foundation
Providence Hood River Memorial Hospital Foundatio
Providence Hood River Memorial Hospital Foundation Healthwise Medical Reference Library --> Home | Services | Physicians & Clinics | Education | Patient Information | News & Events | Foundation | Employment Site Search ...

]]>
-#rel1.0 - - -121.523610, 45.704720 - -
- - -ARC-Leavworth County: Press Release January 17, 2001
January 17, 2001 Leavenworth County Chapter Return t
ARC-Leavworth County: Press Release January 17, 2001 Press Release January 17, 2001 Leavenworth County Chapter Return to Media Page APPLICATIONS FOR NEW GAS ASSISTANCE PROGRAM NOW AVAILABLE THROUGH THE AMERICAN RED CROSS LEAVENWORTH - The ...

]]>
-#rel1.0 - - -95.033330, 39.233330 - -
- - - Andelot-Blancheville
Andelot-Blancheville French commun
Andelot-Blancheville French commune nomcommuneAndelot-Blancheville rA©gionChampagne-Ardenne dA©partementHaute-Marne arrondissementChaumont cantonCanton of Andelot-BlanchevilleAndelot-Blancheville insee52008 cp52700 maire mandat intercomm longitude05A° 17 ...

]]>
-#rel1.0 - - 5.266666, 48.216666 - -
- - -The Landmark Newspaper - Platte County (Platte City wants str...
Platte County (Platte City wants stree
The Landmark Newspaper - Platte County (Platte City wants street sweeping grant) Covering Platte County, Missouri Weekly Since 1865 Local News Between the Lines by Ivan Foley Off ...

]]>
-#rel1.0 - - -94.782220, 39.370280 - -
- - -Macomb Daily : Sports : Retiring juvenile court worker an 'in...
an 'institution in Macomb County' 08/04/04 SUBSCRIB
Macomb Daily : Sports : Retiring juvenile court worker an 'institution in Macomb County' 08/04/04 SUBSCRIBE TO SITE MENU: Select... HOME Local News State/Nation/World Sports Obituaries Election Center Newspaper In ...

]]>
-#rel1.0 - - -82.950000, 42.700000 - -
- - - FC Fakel Voronezh
FC Fakel Voronezh Football clu
FC Fakel Voronezh Football club infobox clubname Fakel image Club logo fullname Football Club Fakel Voronezh nickname founded 1947 ground Tsentralnyi Profsoyuz StadionTsentralnyi Profsoyuz ...

]]>
-#rel1.0 - - 39.170000, 51.666388 - -
- - -What's New in Loudoun County
What's New in Loudoun County Skip Navigatio
What's New in Loudoun County Skip Navigation What's New News Releases Loudoun County in the News New on the Loudoun County Website Job Announcements ...

]]>
-#rel1.0 - - -77.650000, 39.083330 - -
- - - Levee Break San Joaquin County Levee Break and Fl...
Levee Break San Joaquin County Levee Break an
Levee Break San Joaquin County Levee Break and Flooding The Governor's Office of Emergency Services activated the State Operations Center and the Inland ...

Levee Break San Joaquin County Levee Break and Fl...
Levee Break San Joaquin County Levee Break an
Levee Break San Joaquin County Levee Break and Flooding The Governor's Office of Emergency Services activated the State Operations Center and the Inland ...

]]>
-#rel1.0 - - -121.300000, 37.933330 - -
- - -Cretto
Cretto Cretto Gibellina, Sicily Italia
Cretto Cretto Gibellina, Sicily Italian artist Alberto Burri is known for a series of works titled Cretti , monochrome pieces composed of paste left to ...

]]>
-#rel1.0 - - 12.966666, 37.783333 - -
- - - Stord Sunnhordland F.K.
Stord Sunnhordland F.K. Infobo
Stord Sunnhordland F.K. Infobox Football club clubname Stord Sunnhordland F.K. image logo fullname Stord Sunnhordland Fotballklubb Norwegian nickname founded December 18 ...

]]>
-#rel1.0 - - 5.500000, 59.916666 - -
- - -RWE Aqua - Zentralklaranlage Zagreb (ZOV)
Zentralklaranlage Zagreb (ZOV) Home Englis
RWE Aqua - Zentralklaranlage Zagreb (ZOV) Home English Suchen Produkte & Services Konzern Presse/News Investor Relations Info-Welt fur Privatkunden fur Geschaftskunden fur Stadtwerke/Versorger fur ...

]]>
-#rel1.0 - - 16.000000, 45.800000 - -
- - -Open house features design ideas for new Burien Transit Center
ideas for new Burien Transit Center DO
Open house features design ideas for new Burien Transit Center DOT Home What's Happening Transportation Today In the News Hot Topics Current Projects Inside Transportation on CTV Regional ...

]]>
-#rel1.0 - - -122.345560, 47.470560 - -
- - -The Daily News: Mobile Edition
Mobile Edition The Galveston County Daily News - MOBIL
The Daily News: Mobile Edition The Galveston County Daily News - MOBILE EDITION - Today is Sunday, September 25, 2005 Buses return with tired, hot evacuees GALVESTON - Some complain about ...

]]>
-#rel1.0 - - -94.966670, 29.366670 - -
-
-
- diff --git a/pacotes/openlayers/examples/layer-opacity.html b/pacotes/openlayers/examples/layer-opacity.html deleted file mode 100644 index bd57cc0..0000000 --- a/pacotes/openlayers/examples/layer-opacity.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - -

OpenLayers Layer Opacity Example

-
-

- Note that if you also have the setOpacity method defined on the Layer - class, you can tweak the layer opacity after it has been added to the map. -

-

Opacity: - << - - >> -

-

IE users: Wait until the shade layer has finished loading to try this.

- - diff --git a/pacotes/openlayers/examples/lite.html b/pacotes/openlayers/examples/lite.html deleted file mode 100644 index d8abd1d..0000000 --- a/pacotes/openlayers/examples/lite.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/lonlatfrompx.html b/pacotes/openlayers/examples/lonlatfrompx.html deleted file mode 100644 index db1627a..0000000 --- a/pacotes/openlayers/examples/lonlatfrompx.html +++ /dev/null @@ -1,43 +0,0 @@ - - - OpenLayers Cursor Example - - - - - -

OpenLayers Cursor Example

-
- - diff --git a/pacotes/openlayers/examples/mapserver.html b/pacotes/openlayers/examples/mapserver.html deleted file mode 100644 index 518e2c5..0000000 --- a/pacotes/openlayers/examples/mapserver.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/mapserver_untiled.html b/pacotes/openlayers/examples/mapserver_untiled.html deleted file mode 100644 index 123b6cf..0000000 --- a/pacotes/openlayers/examples/mapserver_untiled.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/markerResize.html b/pacotes/openlayers/examples/markerResize.html deleted file mode 100644 index 40d9574..0000000 --- a/pacotes/openlayers/examples/markerResize.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - -

OpenLayers Example

-
-
click to resize marker
- - diff --git a/pacotes/openlayers/examples/markers.html b/pacotes/openlayers/examples/markers.html deleted file mode 100644 index b615459..0000000 --- a/pacotes/openlayers/examples/markers.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/markersTextLayer.html b/pacotes/openlayers/examples/markersTextLayer.html deleted file mode 100644 index 8fb396d..0000000 --- a/pacotes/openlayers/examples/markersTextLayer.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/mm.html b/pacotes/openlayers/examples/mm.html deleted file mode 100644 index 44e8098..0000000 --- a/pacotes/openlayers/examples/mm.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - -

OpenLayers MultiMap Example

-
-
click to add the marker to the map
-
click to remove the marker from the map
- - diff --git a/pacotes/openlayers/examples/multiserver.html b/pacotes/openlayers/examples/multiserver.html deleted file mode 100644 index 1cb98a4..0000000 --- a/pacotes/openlayers/examples/multiserver.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/mvs.html b/pacotes/openlayers/examples/mvs.html deleted file mode 100644 index 51879d1..0000000 --- a/pacotes/openlayers/examples/mvs.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/navtoolbar.html b/pacotes/openlayers/examples/navtoolbar.html deleted file mode 100644 index 70f073e..0000000 --- a/pacotes/openlayers/examples/navtoolbar.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/notile.html b/pacotes/openlayers/examples/notile.html deleted file mode 100644 index 3bbaa44..0000000 --- a/pacotes/openlayers/examples/notile.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/openmnnd.html b/pacotes/openlayers/examples/openmnnd.html deleted file mode 100644 index 9e12839..0000000 --- a/pacotes/openlayers/examples/openmnnd.html +++ /dev/null @@ -1,143 +0,0 @@ - - - - - - - -
-
    -
  • Streams: Feature Count 0
  • -
  • Plat: Feature Count 0
  • -
  • Roads: Feature Count 0
  • -
-
-
-
    -
  • - - -
  • -
  • - - -
  • -
-
-
- - diff --git a/pacotes/openlayers/examples/openstreetmap.html b/pacotes/openlayers/examples/openstreetmap.html deleted file mode 100644 index 8104392..0000000 --- a/pacotes/openlayers/examples/openstreetmap.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/outOfRangeMarkers.html b/pacotes/openlayers/examples/outOfRangeMarkers.html deleted file mode 100644 index efb8076..0000000 --- a/pacotes/openlayers/examples/outOfRangeMarkers.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - -
- - - diff --git a/pacotes/openlayers/examples/outOfRangeMarkers.txt b/pacotes/openlayers/examples/outOfRangeMarkers.txt deleted file mode 100644 index 6d88977..0000000 --- a/pacotes/openlayers/examples/outOfRangeMarkers.txt +++ /dev/null @@ -1,3 +0,0 @@ -point title description icon --4.14,37.90 Kilimanjaro Beskrivning http://www.villageografica.com/Africa-Webmap/img/marker-blue.png --3.24,34.35 Shinyanga Beskrivning http://www.villageografica.com/Africa-Webmap/img/marker-blue.png diff --git a/pacotes/openlayers/examples/overviewmap.html b/pacotes/openlayers/examples/overviewmap.html deleted file mode 100644 index d44cef5..0000000 --- a/pacotes/openlayers/examples/overviewmap.html +++ /dev/null @@ -1,47 +0,0 @@ - - - -Overview Map Example - - - - -
- - - diff --git a/pacotes/openlayers/examples/panel.html b/pacotes/openlayers/examples/panel.html deleted file mode 100644 index 9644c11..0000000 --- a/pacotes/openlayers/examples/panel.html +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - -
-
- - diff --git a/pacotes/openlayers/examples/popups.html b/pacotes/openlayers/examples/popups.html deleted file mode 100644 index 97a922e..0000000 --- a/pacotes/openlayers/examples/popups.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - - -
-
click to add Popup to map
-
click to add a Marker with an AnchoredBubble popup
-
click to modify popup's attributes
-
click to remove the popup from map
-
click to remove the markers layer
-
marker.onscreen()?
-
click to destroy the popup from map
- - diff --git a/pacotes/openlayers/examples/proxy.cgi b/pacotes/openlayers/examples/proxy.cgi deleted file mode 100644 index fca4766..0000000 --- a/pacotes/openlayers/examples/proxy.cgi +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env python - - -"""This is a blind proxy that we use to get around browser -restrictions that prevent the Javascript from loading pages not on the -same server as the Javascript. This has several problems: it's less -efficient, it might break some sites, and it's a security risk because -people can use this proxy to browse the web and possibly do bad stuff -with it. If you can get your code signed (see: -http://trac.openlayers.org/wiki/HowToSignJavascript), then you should -modify Parameters.js so that this isn't used. Otherwise, you're stuck -with it. It only loads pages via http and https, but it can load any -content type. XML and HTML are both currently used by Openlayers.""" - -import urllib -import cgi - -fs = cgi.FieldStorage() -url = fs.getvalue('url', "http://openlayers.org") - -# Designed to prevent Open Proxy type stuff. - -allowedHosts = ['www.openlayers.org', 'openlayers.org', 'octo.metacarta.com', 'merrimack.metacarta.com', 'labs.metacarta.com', 'world.freemap.in', - 'prototype.openmnnd.org'] - -try: - host = url.split("/")[2] - if allowedHosts and not host in allowedHosts: - print "Status: 502 Bad Gateway" - print "Content-Type: text/plain" - print - print "This proxy does not allow you to access that location." - - elif url.startswith("http://") or url.startswith("https://"): - - y = urllib.urlopen(url) - - headers = str(y.info()).split('\n') - for h in headers: - if h.startswith("Content-Type:"): - print h - print - - print y.read() - - y.close() - else: - print """Content-Type: text/plain - -Illegal request.""" -except Exception, E: - print "Status: 500 Unexpected Error" - print "Content-Type: text/plain" - print - print "Some unexpected error occurred. Error text was:", E diff --git a/pacotes/openlayers/examples/scroll.html b/pacotes/openlayers/examples/scroll.html deleted file mode 100644 index c5f4936..0000000 --- a/pacotes/openlayers/examples/scroll.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - OpenLayers: Home - - - - - - - - - - - - - - - - - -
-
-
-
Put an open map widget in any web page!
-
- Double-click to zoom in, and drag to pan. Hold down the shift key - and drag to zoom to a particular region. -
-
-

Get OpenLayers Now

-

- Latest stable release: Link to the hosted version | OpenLayers-2.0.tar.gz | Class Documentation | See Screenshots -

-

Latest Development Release: Test out OpenLayers 2.1-RC2! Link to 2.1-RC2 Hosted Version.

-

FOSS4G: Was the FOSS4G presentation too early for you this morning? The presentation is available in Open Office Impress format, and the examples are available as well.

-

About...

-

OpenLayers makes it easy to put a dynamic map in any web page. It can -display map tiles and markers loaded from any source. MetaCarta developed the initial version of -OpenLayers and gave it to the public to further the use of geographic -information of all kinds. OpenLayers is -completely free, Open Source JavaScript, released under the BSD License.

- -

Put a map in your page.

-

We've released a Map Viewer Service that lets you put a map in your page easily. Just put this HTML in your page:

-
-      <iframe src="http://openlayers.org/viewer/"
-        width="400px" height="200px"
-        scrolling="no"
-        marginwidth="0" marginheight="0"
-        frameborder="0">
-      </iframe>
- -

Read more examples in the 20-second tutorial. The visual appearance of the MapViewer is not yet stable. If you like it, please join the users' email list and tell us about your use.

- -

For Developers!

-

OpenLayers is a pure JavaScript library for displaying map data in most -modern web browsers, with no server-side dependencies. OpenLayers implements a -(still-developing) JavaScript -API for building rich web-based geographic applications, similar to the -Google Maps and MSN Virtual Earth APIs, with one important difference -- -OpenLayers is Free Software, developed for and by the Open Source software -community.

- -

Furthermore, OpenLayers implements industry-standard methods for geographic -data access, such as the OpenGIS Consortium's Web Mapping Service (WMS) and Web -Feature Service (WFS) protocols. Under the hood, OpenLayers is written in -object-oriented JavaScript, using Prototype.js and components from the Rico library. The OpenLayers code base already has -hundreds of unit tests, via the Test.AnotherWay -framework.

- -

As a framework, OpenLayers is intended to separate map tools from map -data so that all the tools can operate on all the data sources. This -separation breaks the proprietary silos that earlier GIS revolutions have -taught civilization to avoid. The mapping revolution on the public Web should -benefit from the experience of history.

- -

Getting the Code

- -

Releases are made available on the downloads page. -Additionally, if you wish to use OpenLayers in a web application, you can -include - - http://www.openlayers.org/api/OpenLayers.js - in your page, to always get the latest release.

- -

The code is also available in our -Subversion repository. -Using Subversion, you can keep up to the absolute bleeding edge of the code. -If you wish to report a bug in the API, and you are able to use Subversion, -please see if the bug has been fixed in Subversion first: OpenLayers is -under rapid development, so things change quickly. -

- -

If you don't have Subversion or don't want to download the code, you can -still try some live examples on -openlayers.org. If you're familiar with JavaScript, try viewing the source -of the examples to get an idea how the OpenLayers library is used.

- -

OpenLayers is still undergoing rapid development, so expect a lot to change -in the next few weeks and months. We need your support! Please check the wiki for the very latest updates and -documentation, and thank you for taking an interest.

- -
- - - - - - - - diff --git a/pacotes/openlayers/examples/select-feature.html b/pacotes/openlayers/examples/select-feature.html deleted file mode 100644 index 1548e98..0000000 --- a/pacotes/openlayers/examples/select-feature.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - -

OpenLayers Draw Feature Example

-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
- - diff --git a/pacotes/openlayers/examples/setextent.html b/pacotes/openlayers/examples/setextent.html deleted file mode 100644 index d90f7b8..0000000 --- a/pacotes/openlayers/examples/setextent.html +++ /dev/null @@ -1,29 +0,0 @@ - - -Setting a visual Extent - - - -

Setting a Visual Extent

-

- Because the ability to set the map to a given extent is limited by the - current resolutions available, zoomToExtent will not always set the map to - exactly the right extent. In order to visually annotate the actual extent, - this example, will use the Boxes layer to visually describe the desired - extent as well as setting the map extent. -

-
- - - diff --git a/pacotes/openlayers/examples/supports-vector.html b/pacotes/openlayers/examples/supports-vector.html deleted file mode 100644 index ed86aa8..0000000 --- a/pacotes/openlayers/examples/supports-vector.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - -Vector Support: -
-Supports SVG 1.1:
-
-Supports SVG DOM:
- - diff --git a/pacotes/openlayers/examples/textfile.txt b/pacotes/openlayers/examples/textfile.txt deleted file mode 100644 index f7678c4..0000000 --- a/pacotes/openlayers/examples/textfile.txt +++ /dev/null @@ -1,4 +0,0 @@ -point title description icon -10,20 my orange title my orange description -2,4 my aqua title my aqua description -42,-71 my purple title my purple description
is great. http://www.openlayers.org/api/img/zoom-world-mini.png diff --git a/pacotes/openlayers/examples/tiger.html b/pacotes/openlayers/examples/tiger.html deleted file mode 100644 index e89d6ba..0000000 --- a/pacotes/openlayers/examples/tiger.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/tms.html b/pacotes/openlayers/examples/tms.html deleted file mode 100644 index 7345a19..0000000 --- a/pacotes/openlayers/examples/tms.html +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - URL of TMS (Should end in /): layer_name
- Example: http://mapserver.refractions.net/cgi-bin/tms/, global_mosaic, jpg -
- - diff --git a/pacotes/openlayers/examples/urban.html b/pacotes/openlayers/examples/urban.html deleted file mode 100644 index 6531b10..0000000 --- a/pacotes/openlayers/examples/urban.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/ve.html b/pacotes/openlayers/examples/ve.html deleted file mode 100644 index f5d45e7..0000000 --- a/pacotes/openlayers/examples/ve.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - -

OpenLayers VE Example

-
-
click to add the marker to the map
-
click to remove the marker from the map
- - diff --git a/pacotes/openlayers/examples/vector-features.html b/pacotes/openlayers/examples/vector-features.html deleted file mode 100644 index 3b75da7..0000000 --- a/pacotes/openlayers/examples/vector-features.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - -
-

This example shows drawing simple vector features -- point, line, polygon - in different styles, created 'manually', by constructing the entire style - object, via 'copy', extending the default style object, and by - inheriting the default style from the layer.

- - diff --git a/pacotes/openlayers/examples/webcam.html b/pacotes/openlayers/examples/webcam.html deleted file mode 100644 index 5c5949a..0000000 --- a/pacotes/openlayers/examples/webcam.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - -

OpenLayers Webcam

-
- - diff --git a/pacotes/openlayers/examples/wfs-scribble.html b/pacotes/openlayers/examples/wfs-scribble.html deleted file mode 100644 index bb74143..0000000 --- a/pacotes/openlayers/examples/wfs-scribble.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - Scribble on a WFS - - - - -

Draw Lines, Save to GeoServer

-

Using GeoServer and the WFS-T support in OpenLayers, draw on a map, - save the results, reload the page and see the results still there!
- Hold shift to turn on freehand mode while drawing.

-
- Show WFS Transaction | - Export GML | - Export GeoRSS | - Save | - Refresh (removes all newly added lines)

-
- - - diff --git a/pacotes/openlayers/examples/wfs-states.html b/pacotes/openlayers/examples/wfs-states.html deleted file mode 100644 index 3531887..0000000 --- a/pacotes/openlayers/examples/wfs-states.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - WFS: United States (GeoServer) - - - - -

GeoServer WFS

-
- - diff --git a/pacotes/openlayers/examples/wfs-t.html b/pacotes/openlayers/examples/wfs-t.html deleted file mode 100644 index 7ec9fbe..0000000 --- a/pacotes/openlayers/examples/wfs-t.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - Save Roads
- Save Cities
-
- - diff --git a/pacotes/openlayers/examples/wfs.html b/pacotes/openlayers/examples/wfs.html deleted file mode 100644 index 587f1f5..0000000 --- a/pacotes/openlayers/examples/wfs.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/wkt.html b/pacotes/openlayers/examples/wkt.html deleted file mode 100644 index 8d192cb..0000000 --- a/pacotes/openlayers/examples/wkt.html +++ /dev/null @@ -1,152 +0,0 @@ - - - WKT - - - - - -

OpenLayers WKT Example

-
-
-
-

See Wikipedia - for a description and examples of WKT.

-
- -
- -
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-
- - diff --git a/pacotes/openlayers/examples/wms-untiled.html b/pacotes/openlayers/examples/wms-untiled.html deleted file mode 100644 index 37edc0e..0000000 --- a/pacotes/openlayers/examples/wms-untiled.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/wms.html b/pacotes/openlayers/examples/wms.html deleted file mode 100644 index ac39511..0000000 --- a/pacotes/openlayers/examples/wms.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/examples/wmst.html b/pacotes/openlayers/examples/wmst.html deleted file mode 100644 index d3664f0..0000000 --- a/pacotes/openlayers/examples/wmst.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -

OpenLayers Example

-

WMS-T example: update the times, and the radar image will change. Uses Layer.changeParams. Thanks to David Bitner for the inspiration, the original code, and the kick in the butt!

- -
- - - diff --git a/pacotes/openlayers/examples/worldwind.html b/pacotes/openlayers/examples/worldwind.html deleted file mode 100644 index 5af8b02..0000000 --- a/pacotes/openlayers/examples/worldwind.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -

OpenLayers Example

-
-

This is a demonstration of using Tiled WorldWind layers. WorldWind requires you to define a "LZTD" -- the 3rd param of the constructor -- and the number of zoom levels it supports. When a worldwind layer is not visible at a given tile level, and empty tile is placed there instead. Note that the maxResolution of the map times 512px, must be a multiple of a power of two different from the LZTD -- in this case, .28125 * 512 is 144, which is 36*4, and 2.25*64.

-

This example has a 'Bathy' layer, visible as you zoom out, and a 'landsat' layer, visible as you zoom in, both visible at zoom level 6.

- - diff --git a/pacotes/openlayers/examples/xhtml.html b/pacotes/openlayers/examples/xhtml.html deleted file mode 100644 index a6fc48f..0000000 --- a/pacotes/openlayers/examples/xhtml.html +++ /dev/null @@ -1,23 +0,0 @@ - - - -XHTML Example - - - -
- -

- Valid XHTML 1.0! -

- - diff --git a/pacotes/openlayers/examples/yahoo.html b/pacotes/openlayers/examples/yahoo.html deleted file mode 100644 index f0be241..0000000 --- a/pacotes/openlayers/examples/yahoo.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - -

OpenLayers Example

-
- - diff --git a/pacotes/openlayers/examples/zoomLevels.html b/pacotes/openlayers/examples/zoomLevels.html deleted file mode 100644 index 367de57..0000000 --- a/pacotes/openlayers/examples/zoomLevels.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/img/blank.gif b/pacotes/openlayers/img/blank.gif deleted file mode 100644 index 4bcc753..0000000 Binary files a/pacotes/openlayers/img/blank.gif and /dev/null differ diff --git a/pacotes/openlayers/img/close.gif b/pacotes/openlayers/img/close.gif deleted file mode 100644 index a8958de..0000000 Binary files a/pacotes/openlayers/img/close.gif and /dev/null differ diff --git a/pacotes/openlayers/img/drag-rectangle-off.png b/pacotes/openlayers/img/drag-rectangle-off.png deleted file mode 100644 index fc6daf4..0000000 Binary files a/pacotes/openlayers/img/drag-rectangle-off.png and /dev/null differ diff --git a/pacotes/openlayers/img/drag-rectangle-on.png b/pacotes/openlayers/img/drag-rectangle-on.png deleted file mode 100644 index 7f783ce..0000000 Binary files a/pacotes/openlayers/img/drag-rectangle-on.png and /dev/null differ diff --git a/pacotes/openlayers/img/east-mini.png b/pacotes/openlayers/img/east-mini.png deleted file mode 100644 index 0707567..0000000 Binary files a/pacotes/openlayers/img/east-mini.png and /dev/null differ diff --git a/pacotes/openlayers/img/layer-switcher-maximize.png b/pacotes/openlayers/img/layer-switcher-maximize.png deleted file mode 100644 index 8d7bb16..0000000 Binary files a/pacotes/openlayers/img/layer-switcher-maximize.png and /dev/null differ diff --git a/pacotes/openlayers/img/layer-switcher-minimize.png b/pacotes/openlayers/img/layer-switcher-minimize.png deleted file mode 100644 index e80bf21..0000000 Binary files a/pacotes/openlayers/img/layer-switcher-minimize.png and /dev/null differ diff --git a/pacotes/openlayers/img/marker-blue.png b/pacotes/openlayers/img/marker-blue.png deleted file mode 100644 index 83a90b4..0000000 Binary files a/pacotes/openlayers/img/marker-blue.png and /dev/null differ diff --git a/pacotes/openlayers/img/marker-gold.png b/pacotes/openlayers/img/marker-gold.png deleted file mode 100644 index 2ff9ec5..0000000 Binary files a/pacotes/openlayers/img/marker-gold.png and /dev/null differ diff --git a/pacotes/openlayers/img/marker-green.png b/pacotes/openlayers/img/marker-green.png deleted file mode 100644 index 17168f1..0000000 Binary files a/pacotes/openlayers/img/marker-green.png and /dev/null differ diff --git a/pacotes/openlayers/img/marker.png b/pacotes/openlayers/img/marker.png deleted file mode 100644 index ccd1913..0000000 Binary files a/pacotes/openlayers/img/marker.png and /dev/null differ diff --git a/pacotes/openlayers/img/measuring-stick-off.png b/pacotes/openlayers/img/measuring-stick-off.png deleted file mode 100644 index 70c2dff..0000000 Binary files a/pacotes/openlayers/img/measuring-stick-off.png and /dev/null differ diff --git a/pacotes/openlayers/img/measuring-stick-on.png b/pacotes/openlayers/img/measuring-stick-on.png deleted file mode 100644 index cdb8f34..0000000 Binary files a/pacotes/openlayers/img/measuring-stick-on.png and /dev/null differ diff --git a/pacotes/openlayers/img/north-mini.png b/pacotes/openlayers/img/north-mini.png deleted file mode 100644 index 3165058..0000000 Binary files a/pacotes/openlayers/img/north-mini.png and /dev/null differ diff --git a/pacotes/openlayers/img/panning-hand-off.png b/pacotes/openlayers/img/panning-hand-off.png deleted file mode 100644 index 4c912ac..0000000 Binary files a/pacotes/openlayers/img/panning-hand-off.png and /dev/null differ diff --git a/pacotes/openlayers/img/panning-hand-on.png b/pacotes/openlayers/img/panning-hand-on.png deleted file mode 100644 index 6094c64..0000000 Binary files a/pacotes/openlayers/img/panning-hand-on.png and /dev/null differ diff --git a/pacotes/openlayers/img/slider.png b/pacotes/openlayers/img/slider.png deleted file mode 100644 index 23afd57..0000000 Binary files a/pacotes/openlayers/img/slider.png and /dev/null differ diff --git a/pacotes/openlayers/img/south-mini.png b/pacotes/openlayers/img/south-mini.png deleted file mode 100644 index 6c4ac8a..0000000 Binary files a/pacotes/openlayers/img/south-mini.png and /dev/null differ diff --git a/pacotes/openlayers/img/west-mini.png b/pacotes/openlayers/img/west-mini.png deleted file mode 100644 index db5f420..0000000 Binary files a/pacotes/openlayers/img/west-mini.png and /dev/null differ diff --git a/pacotes/openlayers/img/zoom-minus-mini.png b/pacotes/openlayers/img/zoom-minus-mini.png deleted file mode 100644 index f9b63ab..0000000 Binary files a/pacotes/openlayers/img/zoom-minus-mini.png and /dev/null differ diff --git a/pacotes/openlayers/img/zoom-plus-mini.png b/pacotes/openlayers/img/zoom-plus-mini.png deleted file mode 100644 index eecf2eb..0000000 Binary files a/pacotes/openlayers/img/zoom-plus-mini.png and /dev/null differ diff --git a/pacotes/openlayers/img/zoom-world-mini.png b/pacotes/openlayers/img/zoom-world-mini.png deleted file mode 100644 index 2159dde..0000000 Binary files a/pacotes/openlayers/img/zoom-world-mini.png and /dev/null differ diff --git a/pacotes/openlayers/img/zoombar.png b/pacotes/openlayers/img/zoombar.png deleted file mode 100644 index 959f01a..0000000 Binary files a/pacotes/openlayers/img/zoombar.png and /dev/null differ diff --git a/pacotes/openlayers/lib/OpenLayers.js b/pacotes/openlayers/lib/OpenLayers.js deleted file mode 100644 index 43569d6..0000000 --- a/pacotes/openlayers/lib/OpenLayers.js +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/* @requires OpenLayers/BaseTypes.js - */ - -//// -/// This blob sucks in all the files in uncompressed form for ease of use -/// - -OpenLayers = new Object(); - -OpenLayers._scriptName = ( - typeof(_OPENLAYERS_SFL_) == "undefined" ? "lib/OpenLayers.js" - : "OpenLayers.js" ); - -OpenLayers._getScriptLocation = function () { - var scriptLocation = ""; - var SCRIPT_NAME = OpenLayers._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(SCRIPT_NAME); - // is it found, at the end of the URL? - if ((index > -1) && (index + SCRIPT_NAME.length == src.length)) { - scriptLocation = src.slice(0, -SCRIPT_NAME.length); - break; - } - } - } - return scriptLocation; -} - -/* - `_OPENLAYERS_SFL_` is a flag indicating this file is being included - in a Single File Library build of the OpenLayers Library. - - When we are *not* part of a SFL build we dynamically include the - OpenLayers library code. - - When we *are* part of a SFL build we do not dynamically include the - OpenLayers library code as it will be appended at the end of this file. -*/ -if (typeof(_OPENLAYERS_SFL_) == "undefined") { - /* - The original code appeared to use a try/catch block - to avoid polluting the global namespace, - we now use a anonymous function to achieve the same result. - */ - (function() { - var jsfiles=new Array( - "OpenLayers/BaseTypes.js", - "OpenLayers/Util.js", - "Rico/Corner.js", - "Rico/Color.js", - "OpenLayers/Ajax.js", - "OpenLayers/Events.js", - "OpenLayers/Map.js", - "OpenLayers/Layer.js", - "OpenLayers/Icon.js", - "OpenLayers/Marker.js", - "OpenLayers/Marker/Box.js", - "OpenLayers/Popup.js", - "OpenLayers/Tile.js", - "OpenLayers/Feature.js", - "OpenLayers/Feature/Vector.js", - "OpenLayers/Feature/WFS.js", - "OpenLayers/Tile/Image.js", - "OpenLayers/Tile/WFS.js", - "OpenLayers/Layer/Image.js", - "OpenLayers/Layer/EventPane.js", - "OpenLayers/Layer/FixedZoomLevels.js", - "OpenLayers/Layer/Google.js", - "OpenLayers/Layer/VirtualEarth.js", - "OpenLayers/Layer/Yahoo.js", - "OpenLayers/Layer/HTTPRequest.js", - "OpenLayers/Layer/Grid.js", - "OpenLayers/Layer/MapServer.js", - "OpenLayers/Layer/MapServer/Untiled.js", - "OpenLayers/Layer/KaMap.js", - "OpenLayers/Layer/MultiMap.js", - "OpenLayers/Layer/Markers.js", - "OpenLayers/Layer/Text.js", - "OpenLayers/Layer/WorldWind.js", - "OpenLayers/Layer/WMS.js", - "OpenLayers/Layer/WMS/Untiled.js", - "OpenLayers/Layer/GeoRSS.js", - "OpenLayers/Layer/Boxes.js", - "OpenLayers/Layer/Canvas.js", - "OpenLayers/Layer/TMS.js", - "OpenLayers/Popup/Anchored.js", - "OpenLayers/Popup/AnchoredBubble.js", - "OpenLayers/Handler.js", - "OpenLayers/Handler/Point.js", - "OpenLayers/Handler/Path.js", - "OpenLayers/Handler/Polygon.js", - "OpenLayers/Handler/Feature.js", - "OpenLayers/Handler/Drag.js", - "OpenLayers/Handler/Box.js", - "OpenLayers/Handler/MouseWheel.js", - "OpenLayers/Handler/Keyboard.js", - "OpenLayers/Control.js", - "OpenLayers/Control/ZoomBox.js", - "OpenLayers/Control/ZoomToMaxExtent.js", - "OpenLayers/Control/DragPan.js", - "OpenLayers/Control/Navigation.js", - "OpenLayers/Control/MouseDefaults.js", - "OpenLayers/Control/MousePosition.js", - "OpenLayers/Control/OverviewMap.js", - "OpenLayers/Control/KeyboardDefaults.js", - "OpenLayers/Control/PanZoom.js", - "OpenLayers/Control/PanZoomBar.js", - "OpenLayers/Control/ArgParser.js", - "OpenLayers/Control/Permalink.js", - "OpenLayers/Control/Scale.js", - "OpenLayers/Control/LayerSwitcher.js", - "OpenLayers/Control/DrawFeature.js", - "OpenLayers/Control/Panel.js", - "OpenLayers/Control/SelectFeature.js", - "OpenLayers/Geometry.js", - "OpenLayers/Geometry/Rectangle.js", - "OpenLayers/Geometry/Collection.js", - "OpenLayers/Geometry/Point.js", - "OpenLayers/Geometry/MultiPoint.js", - "OpenLayers/Geometry/Curve.js", - "OpenLayers/Geometry/LineString.js", - "OpenLayers/Geometry/LinearRing.js", - "OpenLayers/Geometry/Polygon.js", - "OpenLayers/Geometry/MultiLineString.js", - "OpenLayers/Geometry/MultiPolygon.js", - "OpenLayers/Geometry/Surface.js", - "OpenLayers/Renderer.js", - "OpenLayers/Renderer/Elements.js", - "OpenLayers/Renderer/SVG.js", - "OpenLayers/Renderer/VML.js", - "OpenLayers/Layer/Vector.js", - "OpenLayers/Layer/GML.js", - "OpenLayers/Format.js", - "OpenLayers/Format/GML.js", - "OpenLayers/Format/KML.js", - "OpenLayers/Format/GeoRSS.js", - "OpenLayers/Format/WFS.js", - "OpenLayers/Format/WKT.js", - "OpenLayers/Layer/WFS.js", - "OpenLayers/Control/MouseToolbar.js", - "OpenLayers/Control/NavToolbar.js", - "OpenLayers/Control/EditingToolbar.js" - ); // etc. - - var allScriptTags = ""; - var host = OpenLayers._getScriptLocation() + "lib/"; - - for (var i = 0; i < jsfiles.length; i++) { - if (/MSIE/.test(navigator.userAgent) || /Safari/.test(navigator.userAgent)) { - var currentScriptTag = ""; - 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); - })(); -} -OpenLayers.VERSION_NUMBER="$Revision: 3198 $"; diff --git a/pacotes/openlayers/lib/OpenLayers/Ajax.js b/pacotes/openlayers/lib/OpenLayers/Ajax.js deleted file mode 100644 index 32cbb65..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Ajax.js +++ /dev/null @@ -1,322 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -OpenLayers.ProxyHost = ""; -//OpenLayers.ProxyHost = "examples/proxy.cgi?url="; - -/** -* Ajax reader for OpenLayers -* -*@uri url to do remote XML http get -*@param 'get' format params (x=y&a=b...) -*@who object to handle callbacks for this request -*@complete the function to be called on success -*@failure the function to be called on failure -* -* example usage from a caller: -* -* caps: function(request) { -* -blah- -* }, -* -* OpenLayers.loadURL(url,params,this,caps); -* -* Notice the above example does not provide an error handler; a default empty -* handler is provided which merely logs the error if a failure handler is not -* supplied -* -*/ - - -/** -* @param {} request -*/ -OpenLayers.nullHandler = function(request) { - alert("Unhandled request return " + request.statusText); -}; - -/** Background load a document -* -* @param {String} uri URI of source doc -* @param {String} params Params on get (doesnt seem to work) -* @param {Object} caller object which gets callbacks -* @param {Function} onComplete callback for success -* @param {Function} onFailure callback for failure -* -* Both callbacks optional (though silly) -*/ -OpenLayers.loadURL = function(uri, params, caller, - onComplete, onFailure) { - - if (OpenLayers.ProxyHost && uri.startsWith("http")) { - uri = OpenLayers.ProxyHost + escape(uri); - } - - var success = (onComplete) ? onComplete.bind(caller) - : OpenLayers.nullHandler; - - var failure = (onFailure) ? onFailure.bind(caller) - : OpenLayers.nullHandler; - - // from prototype.js - new OpenLayers.Ajax.Request(uri, - { method: 'get', - parameters: params, - onComplete: success, - onFailure: failure - } - ); -}; - -/** Parse XML into a doc structure -* @param {String} text -* -* @returns Parsed Ajax Response ?? -* @type ? -*/ -OpenLayers.parseXMLString = function(text) { - - //MS sucks, if the server is bad it dies - var index = text.indexOf('<'); - if (index > 0) { - text = text.substring(index); - } - - var ajaxResponse = OpenLayers.Util.Try( - function() { - var xmldom = new ActiveXObject('Microsoft.XMLDOM'); - xmldom.loadXML(text); - return xmldom; - }, - function() { - return new DOMParser().parseFromString(text, 'text/xml'); - }, - function() { - var req = new XMLHttpRequest(); - req.open("GET", "data:" + "text/xml" + - ";charset=utf-8," + encodeURIComponent(text), false); - if (req.overrideMimeType) { - req.overrideMimeType("text/xml"); - } - req.send(null); - return req.responseXML; - } - ); - - return ajaxResponse; -}; - -OpenLayers.Ajax = { - emptyFunction: function () {}, - - getTransport: function() { - return OpenLayers.Util.Try( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - }, - - activeRequestCount: 0 -}; - -OpenLayers.Ajax.Responders = { - responders: [], - - register: function(responderToAdd) { - for (var i = 0; i < this.responders.length; i++) - if (responderToAdd == this.responders[i]) - return; - this.responders.push(responderToAdd); - }, - - dispatch: function(callback, request, transport, json) { - for (var i = 0; i < this.responders.length; i++) { - responder = this.responders[i]; - if (responder[callback] && typeof responder[callback] == 'function') { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) {} - } - } - } -}; - -OpenLayers.Ajax.Responders.register({ - onCreate: function() { - OpenLayers.Ajax.activeRequestCount++; - }, - - onComplete: function() { - OpenLayers.Ajax.activeRequestCount--; - } -}); - -OpenLayers.Ajax.Base = function() {}; -OpenLayers.Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - } - OpenLayers.Util.extend(this.options, options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -OpenLayers.Ajax.Request = OpenLayers.Class.create(); -OpenLayers.Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -OpenLayers.Ajax.Request.prototype = OpenLayers.Class.inherit( OpenLayers.Ajax.Base, { - initialize: function(url, options) { - this.transport = OpenLayers.Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - this.url = url; - if (this.options.method == 'get' && parameters.length > 0) - this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; - - OpenLayers.Ajax.Responders.dispatch('onCreate', this, this.transport); - - this.transport.open(this.options.method, this.url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - this.dispatchException(e); - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', 'OpenLayers']; - - if (this.options.method == 'post' && !this.options.postBody) { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - header: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) {} - }, - - evalJSON: function() { - try { - return eval(this.header('X-JSON')); - } catch (e) {} - }, - - evalResponse: function() { - try { - return eval(this.transport.responseText); - } catch (e) { - this.dispatchException(e); - } - }, - - respondToReadyState: function(readyState) { - var event = OpenLayers.Ajax.Request.Events[readyState]; - var transport = this.transport, json = this.evalJSON(); - - if (event == 'Complete') { - try { - (this.options['on' + this.transport.status] - || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] - || OpenLayers.Ajax.emptyFunction)(transport, json); - } catch (e) { - this.dispatchException(e); - } - - if ((this.header('Content-type') || '').match(/^text\/javascript/i)) - this.evalResponse(); - } - - try { - (this.options['on' + event] || OpenLayers.Ajax.emptyFunction)(transport, json); - OpenLayers.Ajax.Responders.dispatch('on' + event, this, transport, json); - } catch (e) { - this.dispatchException(e); - } - - /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ - if (event == 'Complete') - this.transport.onreadystatechange = OpenLayers.Ajax.emptyFunction; - }, - - dispatchException: function(exception) { - (this.options.onException || OpenLayers.Ajax.emptyFunction)(this, exception); - OpenLayers.Ajax.Responders.dispatch('onException', this, exception); - } -}); - -OpenLayers.Ajax.getElementsByTagNameNS = function(parentnode, nsuri, nsprefix, tagname) { - return parentnode.getElementsByTagNameNS ? - parentnode.getElementsByTagNameNS(nsuri, tagname) - : parentnode.getElementsByTagName(nsprefix + ':' + tagname); -} - -/** - * Wrapper function around XMLSerializer, which doesn't exist/work in - * IE/Safari. We need to come up with a way to serialize in those browser: - * for now, these browsers will just fail. - * #535, #536 - * - * @param {XMLNode} xmldom xml dom to serialize - */ -OpenLayers.Ajax.serializeXMLToString = function(xmldom) { - var serializer = new XMLSerializer(); - data = serializer.serializeToString(xmldom); - return data; -} diff --git a/pacotes/openlayers/lib/OpenLayers/BaseTypes.js b/pacotes/openlayers/lib/OpenLayers/BaseTypes.js deleted file mode 100644 index 5219064..0000000 --- a/pacotes/openlayers/lib/OpenLayers/BaseTypes.js +++ /dev/null @@ -1,939 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/* OpenLayers.Class metaclass */ -OpenLayers.Class = { - isPrototype: function () {}, // magic anonymous value - - create: function() { - return function() { - if (arguments && arguments[0] != OpenLayers.Class.isPrototype) - this.initialize.apply(this, arguments); - } - }, - - inherit: function () { - var superClass = arguments[0]; - var proto = new superClass(OpenLayers.Class.isPrototype); - for (var i = 1; i < arguments.length; i++) { - if (typeof arguments[i] == "function") { - var mixin = arguments[i]; - arguments[i] = new mixin(OpenLayers.Class.isPrototype); - } - OpenLayers.Util.extend(proto, arguments[i]); - - // This is a hack for IE see - // http://trac.openlayers.org/attachment/ticket/552 - // - // The problem is that ie doesnt recognize toString as a property - // so the util.extend() doesnt copy it over. we do it manually. - // - // to be revisited in 3.0 - // - if((arguments[i].hasOwnProperty && arguments[i].hasOwnProperty('toString')) || - (!arguments[i].hasOwnProperty && arguments[i].toString)) { - proto.toString = arguments[i].toString; - } - } - return proto; - } -}; - -/* - OpenLayers.Class.inherit( OpenLayers.Layer.Grid, OpenLayers.Layer.HTTPRequest, { - some stuff - }); -*/ - -/********************* - * * - * PIXEL * - * * - *********************/ - -/** - * @class - * - * This class represents a screen coordinate, in x and y coordinates - */ -OpenLayers.Pixel = OpenLayers.Class.create(); -OpenLayers.Pixel.prototype = { - - /** @type float */ - x: 0.0, - - /** @type float */ - y: 0.0, - - /** - * @constructor - * - * @param {float} x - * @param {float} y - */ - initialize: function(x, y) { - this.x = parseFloat(x); - this.y = parseFloat(y); - }, - - /** - * @return string representation of Pixel. ex: "x=200.4,y=242.2" - * @type str - */ - toString:function() { - return ("x=" + this.x + ",y=" + this.y); - }, - - /** - * @type OpenLayers.Pixel - */ - clone:function() { - return new OpenLayers.Pixel(this.x, this.y); - }, - - /** - * @param {OpenLayers.Pixel} px - * - * @return whether or not the point passed in as parameter is equal to this - * note that if px passed in is null, returns false - * @type bool - */ - equals:function(px) { - var equals = false; - if (px != null) { - equals = ((this.x == px.x && this.y == px.y) || - (isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y))); - } - return equals; - }, - - /** - * @param {int} x - * @param {int} y - * - * @return a new Pixel with this pixel's x&y augmented by the - * values passed in. - * @type OpenLayers.Pixel - */ - add:function(x, y) { - return new OpenLayers.Pixel(this.x + x, this.y + y); - }, - - /** - * @param {OpenLayers.Pixel} px - * - * @return a new Pixel with this pixel's x&y augmented by the - * x&y values of the pixel passed in. - * @type OpenLayers.Pixel - */ - offset:function(px) { - var newPx = this.clone(); - if (px) { - newPx = this.add(px.x, px.y); - } - return newPx; - }, - - /** @final @type str */ - CLASS_NAME: "OpenLayers.Pixel" -}; - - -/********************* - * * - * SIZE * - * * - *********************/ - - -/** -* @class -* -* This class represents a width and height pair -*/ -OpenLayers.Size = OpenLayers.Class.create(); -OpenLayers.Size.prototype = { - - /** @type float */ - w: 0.0, - - /** @type float */ - h: 0.0, - - - /** - * @constructor - * - * @param {float} w - * @param {float} h - */ - initialize: function(w, h) { - this.w = parseFloat(w); - this.h = parseFloat(h); - }, - - /** - * @return String representation of OpenLayers.Size object. - * (ex. "w=55,h=66") - * @type String - */ - toString:function() { - return ("w=" + this.w + ",h=" + this.h); - }, - - /** - * @return New OpenLayers.Size object with the same w and h values - * @type OpenLayers.Size - */ - clone:function() { - return new OpenLayers.Size(this.w, this.h); - }, - - /** - * @param {OpenLayers.Size} sz - * @returns Boolean value indicating whether the passed-in OpenLayers.Size - * object has the same w and h components as this - * note that if sz passed in is null, returns false - * - * @type bool - */ - equals:function(sz) { - var equals = false; - if (sz != null) { - equals = ((this.w == sz.w && this.h == sz.h) || - (isNaN(this.w) && isNaN(this.h) && isNaN(sz.w) && isNaN(sz.h))); - } - return equals; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Size" -}; - -/********************* - * * - * LONLAT * - * * - *********************/ - - -/** -* @class -* -* This class represents a longitude and latitude pair -*/ -OpenLayers.LonLat = OpenLayers.Class.create(); -OpenLayers.LonLat.prototype = { - - /** @type float */ - lon: 0.0, - - /** @type float */ - lat: 0.0, - - /** - * @constructor - * - * @param {float} lon - * @param {float} lat - */ - initialize: function(lon, lat) { - this.lon = parseFloat(lon); - this.lat = parseFloat(lat); - }, - - /** - * @return String representation of OpenLayers.LonLat object. - * (ex. "lon=5,lat=42") - * @type String - */ - toString:function() { - return ("lon=" + this.lon + ",lat=" + this.lat); - }, - - /** - * @return Shortened String representation of OpenLayers.LonLat object. - * (ex. "5, 42") - * @type String - */ - toShortString:function() { - return (this.lon + ", " + this.lat); - }, - - /** - * @return New OpenLayers.LonLat object with the same lon and lat values - * @type OpenLayers.LonLat - */ - clone:function() { - return new OpenLayers.LonLat(this.lon, this.lat); - }, - - /** - * @param {float} lon - * @param {float} lat - * - * @return A new OpenLayers.LonLat object with the lon and lat passed-in - * added to this's. - * @type OpenLayers.LonLat - */ - add:function(lon, lat) { - return new OpenLayers.LonLat(this.lon + lon, this.lat + lat); - }, - - /** - * @param {OpenLayers.LonLat} ll - * @returns Boolean value indicating whether the passed-in OpenLayers.LonLat - * object has the same lon and lat components as this - * note that if ll passed in is null, returns false - * - * @type bool - */ - equals:function(ll) { - var equals = false; - if (ll != null) { - equals = ((this.lon == ll.lon && this.lat == ll.lat) || - (isNaN(this.lon) && isNaN(this.lat) && isNaN(ll.lon) && isNaN(ll.lat))); - } - return equals; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.LonLat" -}; - -/** Alternative constructor that builds a new OpenLayers.LonLat from a -* parameter string -* -* @constructor -* -* @param {String} str Comma-separated Lon,Lat coordinate string. -* (ex. "5,40") -* -* @returns New OpenLayers.LonLat object built from the passed-in String. -* @type OpenLayers.LonLat -*/ -OpenLayers.LonLat.fromString = function(str) { - var pair = str.split(","); - return new OpenLayers.LonLat(parseFloat(pair[0]), - parseFloat(pair[1])); -}; - - - -/********************* - * * - * BOUNDS * - * * - *********************/ - - - - -/** -* @class -* -* This class represents a bounding box. -* Data stored as left, bottom, right, top floats -*/ -OpenLayers.Bounds = OpenLayers.Class.create(); -OpenLayers.Bounds.prototype = { - - /** @type float */ - left: 0.0, - - /** @type float */ - bottom: 0.0, - - /** @type float */ - right: 0.0, - - /** @type float */ - top: 0.0, - - /** - * @constructor - * - * @param {float} left - * @param {float} bottom - * @param {float} right - * @param {float} top - * - */ - initialize: function(left, bottom, right, top) { - this.left = parseFloat(left); - this.bottom = parseFloat(bottom); - this.right = parseFloat(right); - this.top = parseFloat(top); - }, - - /** - * @returns A fresh copy of the bounds - * @type OpenLayers.Bounds - */ - clone:function() { - return new OpenLayers.Bounds(this.left, this.bottom, - this.right, this.top); - }, - - /** - * @param {OpenLayers.Bounds} bounds - * @returns Boolean value indicating whether the passed-in OpenLayers.Bounds - * object has the same left, right, top, bottom components as this - * note that if bounds passed in is null, returns false - * - * @type bool - */ - equals:function(bounds) { - var equals = false; - if (bounds != null) { - equals = ((this.left == bounds.left) && - (this.right == bounds.right) && - (this.top == bounds.top) && - (this.bottom == bounds.bottom)); - } - return equals; - }, - - /** - * @return String representation of OpenLayers.Bounds object. - * (ex."left-bottom=(5,42) right-top=(10,45)") - * @type String - */ - toString:function() { - return ( "left-bottom=(" + this.left + "," + this.bottom + ")" - + " right-top=(" + this.right + "," + this.top + ")" ); - }, - - /** - * @param {int} decimal How many significant digits in the bbox coords? - * Default is 6 - * - * @returns Simple String representation of OpenLayers.Bounds object. - * (ex. "5,42,10,45") - * @type String - */ - toBBOX:function(decimal) { - if (decimal== null) { - decimal = 6; - } - var mult = Math.pow(10, decimal); - var bbox = Math.round(this.left * mult) / mult + "," + - Math.round(this.bottom * mult) / mult + "," + - Math.round(this.right * mult) / mult + "," + - Math.round(this.top * mult) / mult; - - return bbox; - }, - - /** - * @returns The width of the bounds - * @type float - */ - getWidth:function() { - return (this.right - this.left); - }, - - /** - * @returns The height of the bounds - * @type float - */ - getHeight:function() { - return (this.top - this.bottom); - }, - - /** - * @returns An OpenLayers.Size which represents the size of the box - * @type OpenLayers.Size - */ - getSize:function() { - return new OpenLayers.Size(this.getWidth(), this.getHeight()); - }, - - /** - * @returns An OpenLayers.Pixel which represents the center of the bounds - * @type OpenLayers.Pixel - */ - getCenterPixel:function() { - return new OpenLayers.Pixel( (this.left + this.right) / 2, - (this.bottom + this.top) / 2); - }, - - /** - * @returns An OpenLayers.LonLat which represents the center of the bounds - * @type OpenLayers.LonLat - */ - getCenterLonLat:function() { - return new OpenLayers.LonLat( (this.left + this.right) / 2, - (this.bottom + this.top) / 2); - }, - - /** - * @param {float} x - * @param {float} y - * - * @returns A new OpenLayers.Bounds whose coordinates are the same as this, - * but shifted by the passed-in x and y values - * @type OpenLayers.Bounds - */ - add:function(x, y) { - return new OpenLayers.Bounds(this.left + x, this.bottom + y, - this.right + x, this.top + y); - }, - - /** - * Extend the bounds to include the point, lonlat, or bounds specified. - * - * This function assumes that left this.right) ? bounds.right - : this.right; - this.top = (bounds.top > this.top) ? bounds.top - : this.top; - } - } - }, - - /** - * @param {OpenLayers.LonLat} ll - * @param {Boolean} inclusive Whether or not to include the border. - * Default is true - * - * @return Whether or not the passed-in lonlat is within this bounds - * @type Boolean - */ - containsLonLat:function(ll, inclusive) { - return this.contains(ll.lon, ll.lat, inclusive); - }, - - /** - * @param {OpenLayers.Pixel} px - * @param {Boolean} inclusive Whether or not to include the border. - * Default is true - * - * @return Whether or not the passed-in pixel is within this bounds - * @type Boolean - */ - containsPixel:function(px, inclusive) { - return this.contains(px.x, px.y, inclusive); - }, - - /** - * @param {float} x - * @param {float} y - * @param {Boolean} inclusive Whether or not to include the border. - * Default is true - * - * @return Whether or not the passed-in coordinates are within this bounds - * @type Boolean - */ - contains:function(x, y, inclusive) { - - //set default - if (inclusive == null) { - inclusive = true; - } - - var contains = false; - if (inclusive) { - contains = ((x >= this.left) && (x <= this.right) && - (y >= this.bottom) && (y <= this.top)); - } else { - contains = ((x > this.left) && (x < this.right) && - (y > this.bottom) && (y < this.top)); - } - return contains; - }, - - /** - * @param {OpenLayers.Bounds} bounds - * @param {Boolean} inclusive Whether or not to include the border. - * Default is true - * - * @return Whether or not the passed-in OpenLayers.Bounds object intersects - * this bounds. Simple math just check if either contains the other, - * allowing for partial. - * @type Boolean - */ - intersectsBounds:function(bounds, inclusive) { - - if (inclusive == null) { - inclusive = true; - } - var inBottom = (bounds.bottom == this.bottom && bounds.top == this.top) ? - true : (((bounds.bottom > this.bottom) && (bounds.bottom < this.top)) || - ((this.bottom > bounds.bottom) && (this.bottom < bounds.top))); - var inTop = (bounds.bottom == this.bottom && bounds.top == this.top) ? - true : (((bounds.top > this.bottom) && (bounds.top < this.top)) || - ((this.top > bounds.bottom) && (this.top < bounds.top))); - var inRight = (bounds.right == this.right && bounds.left == this.left) ? - true : (((bounds.right > this.left) && (bounds.right < this.right)) || - ((this.right > bounds.left) && (this.right < bounds.right))); - var inLeft = (bounds.right == this.right && bounds.left == this.left) ? - true : (((bounds.left > this.left) && (bounds.left < this.right)) || - ((this.left > bounds.left) && (this.left < bounds.right))); - - return (this.containsBounds(bounds, true, inclusive) || - bounds.containsBounds(this, true, inclusive) || - ((inTop || inBottom ) && (inLeft || inRight ))); - }, - - /** - * @param {OpenLayers.Bounds} bounds - * @param {Boolean} partial If true, only part of passed-in - * OpenLayers.Bounds needs be within this bounds. - * If false, the entire passed-in bounds must be - * within. Default is false - * @param {Boolean} inclusive Whether or not to include the border. - * Default is true - * - * @return Whether or not the passed-in OpenLayers.Bounds object is - * contained within this bounds. - * @type Boolean - */ - containsBounds:function(bounds, partial, inclusive) { - - //set defaults - if (partial == null) { - partial = false; - } - if (inclusive == null) { - inclusive = true; - } - - var inLeft; - var inTop; - var inRight; - var inBottom; - - if (inclusive) { - inLeft = (bounds.left >= this.left) && (bounds.left <= this.right); - inTop = (bounds.top >= this.bottom) && (bounds.top <= this.top); - inRight= (bounds.right >= this.left) && (bounds.right <= this.right); - inBottom = (bounds.bottom >= this.bottom) && (bounds.bottom <= this.top); - } else { - inLeft = (bounds.left > this.left) && (bounds.left < this.right); - inTop = (bounds.top > this.bottom) && (bounds.top < this.top); - inRight= (bounds.right > this.left) && (bounds.right < this.right); - inBottom = (bounds.bottom > this.bottom) && (bounds.bottom < this.top); - } - - return (partial) ? (inTop || inBottom ) && (inLeft || inRight ) - : (inTop && inLeft && inBottom && inRight); - }, - - /** - * @param {OpenLayers.LonLat} lonlat - * - * @returns The quadrant ("br" "tr" "tl" "bl") of the bounds in which - * the coordinate lies. - * @type String - */ - determineQuadrant: function(lonlat) { - - var quadrant = ""; - var center = this.getCenterLonLat(); - - quadrant += (lonlat.lat < center.lat) ? "b" : "t"; - quadrant += (lonlat.lon < center.lon) ? "l" : "r"; - - return quadrant; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Bounds" -}; - -/** Alternative constructor that builds a new OpenLayers.Bounds from a -* parameter string -* -* @constructor -* -* @param {String} str Comma-separated bounds string. (ex. "5,42,10,45") -* -* @returns New OpenLayers.Bounds object built from the passed-in String. -* @type OpenLayers.Bounds -*/ -OpenLayers.Bounds.fromString = function(str) { - var bounds = str.split(","); - return OpenLayers.Bounds.fromArray(bounds); -}; - -/** Alternative constructor that builds a new OpenLayers.Bounds -* from an array -* -* @constructor -* -* @param {Array} bbox Array of bounds values (ex. [5,42,10,45]) -* -* @returns New OpenLayers.Bounds object built from the passed-in Array. -* @type OpenLayers.Bounds -*/ -OpenLayers.Bounds.fromArray = function(bbox) { - return new OpenLayers.Bounds(parseFloat(bbox[0]), - parseFloat(bbox[1]), - parseFloat(bbox[2]), - parseFloat(bbox[3])); -}; - -/** Alternative constructor that builds a new OpenLayers.Bounds -* from an OpenLayers.Size -* -* @constructor -* -* @param {OpenLayers.Size} size -* -* @returns New OpenLayers.Bounds object built with top and left set to 0 and -* bottom right taken from the passed-in OpenLayers.Size. -* @type OpenLayers.Bounds -*/ -OpenLayers.Bounds.fromSize = function(size) { - return new OpenLayers.Bounds(0, - size.h, - size.w, - 0); -}; -/** - * @param {String} quadrant - * - * @returns The opposing quadrant ("br" "tr" "tl" "bl"). For Example, if - * you pass in "bl" it returns "tr", if you pass in "br" it - * returns "tl", etc. - * @type String - */ -OpenLayers.Bounds.oppositeQuadrant = function(quadrant) { - var opp = ""; - - opp += (quadrant.charAt(0) == 't') ? 'b' : 't'; - opp += (quadrant.charAt(1) == 'l') ? 'r' : 'l'; - - return opp; -}; - - -/********************* - * * - * ELEMENT * - * * - *********************/ - -OpenLayers.Element = { - visible: function(element) { - return OpenLayers.Util.getElement(element).style.display != 'none'; - }, - - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = OpenLayers.Util.getElement(arguments[i]); - OpenLayers.Element[OpenLayers.Element.visible(element) ? 'hide' : 'show'](element); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = OpenLayers.Util.getElement(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = OpenLayers.Util.getElement(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = OpenLayers.Util.getElement(element); - element.parentNode.removeChild(element); - }, - - getHeight: function(element) { - element = OpenLayers.Util.getElement(element); - return element.offsetHeight; - }, - - getDimensions: function(element) { - element = OpenLayers.Util.getElement(element); - if (OpenLayers.Element.getStyle(element, 'display') != 'none') - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = ''; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = 'none'; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - getStyle: function(element, style) { - element = OpenLayers.Util.getElement(element); - var value = element.style[style.camelize()]; - if (!value) { - if (document.defaultView && document.defaultView.getComputedStyle) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css.getPropertyValue(style) : null; - } else if (element.currentStyle) { - value = element.currentStyle[style.camelize()]; - } - } - - if (window.opera && OpenLayers.Util.indexOf(['left', 'top', 'right', 'bottom'],style) != -1) - if (OpenLayers.Element.getStyle(element, 'position') == 'static') value = 'auto'; - - return value == 'auto' ? null : value; - } - -}; - -/********************* - * * - * STRING * - * * - *********************/ - -/** -* @param {String} sStart -* -* @returns Whether or not this string starts with the string passed in. -* @type Boolean -*/ -String.prototype.startsWith = function(sStart) { - return (this.substr(0,sStart.length) == sStart); -}; - -/** -* @param {String} str -* -* @returns Whether or not this string contains with the string passed in. -* @type Boolean -*/ -String.prototype.contains = function(str) { - return (this.indexOf(str) != -1); -}; - -/** -* @returns A trimmed version of the string - all leading and -* trailing spaces removed -* @type String -*/ -String.prototype.trim = function() { - - var b = 0; - while(this.substr(b,1) == " ") { - b++; - } - - var e = this.length - 1; - while(this.substr(e,1) == " ") { - e--; - } - - return this.substring(b, e+1); -}; - - -String.indexOf = function(object) { - for (var i = 0; i < this.length; i++) - if (this[i] == object) return i; - return -1; -}; - -String.prototype.camelize = function() { - var oStringList = this.split('-'); - if (oStringList.length == 1) return oStringList[0]; - - var camelizedString = this.indexOf('-') == 0 - ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) - : oStringList[0]; - - for (var i = 1, len = oStringList.length; i < len; i++) { - var s = oStringList[i]; - camelizedString += s.charAt(0).toUpperCase() + s.substring(1); - } - - return camelizedString; -}; - - -/********************* - * * - * NUMBER * - * * - *********************/ - -/** NOTE: Works only with integer values does *not* work with floats! - * - * @param {int} sig - * - * @returns The number, rounded to the specified number of significant digits. - * If null, 0, or negaive value passed in, returns 0 - * @type int - */ -Number.prototype.limitSigDigs = function(sig) { - var number = (sig > 0) ? this.toString() : 0; - if (sig < number.length) { - var exp = number.length - sig; - number = Math.round( this / Math.pow(10, exp)) * Math.pow(10, exp); - } - return parseInt(number); -} - - -/********************* - * * - * FUNCTION * - * * - *********************/ - -Function.prototype.bind = function() { - var __method = this, args = [], object = arguments[0]; - for (var i = 1; i < arguments.length; i++) - args.push(arguments[i]); - return function(moreargs) { - for (var i = 0; i < arguments.length; i++) - args.push(arguments[i]); - return __method.apply(object, args); - } -}; - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Control.js b/pacotes/openlayers/lib/OpenLayers/Control.js deleted file mode 100644 index 4fe6ac8..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control.js +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** -* @class -*/ -OpenLayers.Control = OpenLayers.Class.create(); - -OpenLayers.Control.TYPE_BUTTON = 1; -OpenLayers.Control.TYPE_TOGGLE = 2; -OpenLayers.Control.TYPE_TOOL = 3; - -OpenLayers.Control.prototype = { - - /** @type String */ - id: null, - - /** this gets set in the addControl() function in OpenLayers.Map - * @type OpenLayers.Map */ - map: null, - - /** @type DOMElement */ - div: null, - - /** - * Controls can have a 'type'. The type determines the type of interactions - * which are possible with them when they are placed into a toolbar. - * @type OpenLayers.Control.TYPES - */ - type: null, - - /** This property is used for CSS related to the drawing of the Control. - * @type string - */ - displayClass: "", - - /** - * @type boolean - */ - active: null, - - /** - * @type OpenLayers.Handler - */ - handler: null, - - /** - * @constructor - * - * @param {Object} options - */ - initialize: function (options) { - // We do this before the extend so that instances can override - // className in options. - this.displayClass = this.CLASS_NAME.replace("OpenLayers.", "ol").replace(".",""); - - OpenLayers.Util.extend(this, options); - - this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); - }, - - /** - * - */ - destroy: function () { - // eliminate circular references - if (this.handler) { - this.handler.destroy(); - } - this.map = null; - }, - - /** Set the map property for the control. This is done through an accessor - * so that subclasses can override this and take special action once - * they have their map variable set. - * - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - this.map = map; - if (this.handler) { - this.handler.setMap(map); - } - }, - - /** - * @param {OpenLayers.Pixel} px - * - * @returns A reference to the DIV DOMElement containing the control - * @type DOMElement - */ - draw: function (px) { - if (this.div == null) { - this.div = OpenLayers.Util.createDiv(); - this.div.id = this.id; - this.div.className = this.displayClass; - } - if (px != null) { - this.position = px.clone(); - } - this.moveTo(this.position); - return this.div; - }, - - /** - * @param {OpenLayers.Pixel} px - */ - moveTo: function (px) { - if ((px != null) && (this.div != null)) { - this.div.style.left = px.x + "px"; - this.div.style.top = px.y + "px"; - } - }, - - /** - * @type boolean - */ - activate: function () { - if (this.active) { - return false; - } - if (this.handler) { - this.handler.activate(); - } - this.active = true; - return true; - }, - - /** - * @type boolean - */ - deactivate: function () { - if (this.active) { - if (this.handler) { - this.handler.deactivate(); - } - this.active = false; - return true; - } - return false; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control" -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Control/ArgParser.js b/pacotes/openlayers/lib/OpenLayers/Control/ArgParser.js deleted file mode 100644 index 8b31050..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/ArgParser.js +++ /dev/null @@ -1,114 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.ArgParser = OpenLayers.Class.create(); -OpenLayers.Control.ArgParser.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - - /** @type OpenLayers.LonLat */ - center: null, - - /** @type int */ - zoom: null, - - /** @type Array */ - layers: null, - - /** - * @constructor - * - * @param {DOMElement} element - * @param {String} base - */ - initialize: function(element, base) { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - }, - - /** Set the map property for the control. - * - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - OpenLayers.Control.prototype.setMap.apply(this, arguments); - - //make sure we dont already have an arg parser attached - for(var i=0; i< this.map.controls.length; i++) { - var control = this.map.controls[i]; - if ( (control != this) && - (control.CLASS_NAME == "OpenLayers.Control.ArgParser") ) { - break; - } - } - if (i == this.map.controls.length) { - - var args = OpenLayers.Util.getArgs(); - if (args.lat && args.lon) { - this.center = new OpenLayers.LonLat(parseFloat(args.lon), - parseFloat(args.lat)); - if (args.zoom) { - this.zoom = parseInt(args.zoom); - } - - // when we add a new baselayer to see when we can set the center - this.map.events.register('changebaselayer', this, - this.setCenter); - this.setCenter(); - } - - if (args.layers) { - this.layers = args.layers; - - // when we add a new layer, set its visibility - this.map.events.register('addlayer', this, - this.configureLayers); - this.configureLayers(); - } - } - }, - - /** As soon as a baseLayer has been loaded, we center and zoom - * ...and remove the handler. - */ - setCenter: function() { - - if (this.map.baseLayer) { - //dont need to listen for this one anymore - this.map.events.unregister('changebaselayer', this, - this.setCenter); - - this.map.setCenter(this.center, this.zoom); - } - }, - - /** As soon as all the layers are loaded, cycle through them and - * hide or show them. - */ - configureLayers: function() { - - if (this.layers.length == this.map.layers.length) { - this.map.events.unregister('addlayer', this, this.configureLayers); - - for(var i=0; i < this.layers.length; i++) { - - var layer = this.map.layers[i]; - var c = this.layers.charAt(i); - - if (c == "B") { - this.map.setBaseLayer(layer); - } else if ( (c == "T") || (c == "F") ) { - layer.setVisibility(c == "T"); - } - } - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.ArgParser" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/DragPan.js b/pacotes/openlayers/lib/OpenLayers/Control/DragPan.js deleted file mode 100644 index 37c24d3..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/DragPan.js +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Control.js - * @requires OpenLayers/Handler/Drag.js - */ -OpenLayers.Control.DragPan = OpenLayers.Class.create(); -OpenLayers.Control.DragPan.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - /** @type OpenLayers.Control.TYPES */ - type: OpenLayers.Control.TYPE_TOOL, - - /** - * - */ - draw: function() { - this.handler = new OpenLayers.Handler.Drag( this, - {"move": this.panMap, "up": this.panMapDone } ); - }, - - /** - * @param {OpenLayers.Pixel} xy Pixel of the up position - */ - panMap: function (xy) { - var deltaX = this.handler.start.x - xy.x; - var deltaY = this.handler.start.y - xy.y; - var size = this.map.getSize(); - var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, - size.h / 2 + deltaY); - var newCenter = this.map.getLonLatFromViewPortPx( newXY ); - this.map.setCenter(newCenter, null, true); - // this assumes xy won't be changed inside Handler.Drag - // a safe bet for now, and saves us the extra call to clone(). - this.handler.start = xy; - }, - - /** - * @param {OpenLayers.Pixel} xy Pixel of the up position - */ - panMapDone: function (xy) { - var deltaX = this.handler.start.x - xy.x; - var deltaY = this.handler.start.y - xy.y; - var size = this.map.getSize(); - var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, - size.h / 2 + deltaY); - var newCenter = this.map.getLonLatFromViewPortPx( newXY ); - this.map.setCenter(newCenter, null, false); - // this assumes xy won't be changed inside Handler.Drag - // a safe bet for now, and saves us the extra call to clone(). - this.handler.start = xy; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.DragPan" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/DrawFeature.js b/pacotes/openlayers/lib/OpenLayers/Control/DrawFeature.js deleted file mode 100644 index a502eb2..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/DrawFeature.js +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * Draws features on a vector layer when active. - * - * @class - * @requires OpenLayers/Control.js - * @requires OpenLayers/Feature/Vector.js - */ -OpenLayers.Control.DrawFeature = OpenLayers.Class.create(); -OpenLayers.Control.DrawFeature.prototype = - OpenLayers.Class.inherit(OpenLayers.Control, { - - /** - * @type OpenLayers.Layer.Vector - */ - layer: null, - - /** - * @type {Object} The functions that are sent to the handler for callback - */ - callbacks: null, - - /** - * @type {Function} Called after each feature is added - */ - featureAdded: function() {}, - - /** - * Used to set non-default properties on the control's handler - * - * @type Object - */ - handlerOptions: null, - - /** - * @param {OpenLayers.Layer.Vector} layer - * @param {OpenLayers.Handler} handler - * @param {Object} options - */ - initialize: function(layer, handler, options) { - OpenLayers.Control.prototype.initialize.apply(this, [options]); - this.callbacks = OpenLayers.Util.extend({done: this.drawFeature}, - this.callbacks); - this.layer = layer; - this.handler = new handler(this, this.callbacks, this.handlerOptions); - }, - - /** - * - */ - drawFeature: function(geometry) { - var feature = new OpenLayers.Feature.Vector(geometry); - this.layer.addFeatures([feature]); - this.featureAdded(feature); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.DrawFeature" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/EditingToolbar.js b/pacotes/openlayers/lib/OpenLayers/Control/EditingToolbar.js deleted file mode 100644 index 44d2088..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/EditingToolbar.js +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Control/Panel.js - * @requires OpenLayers/Control/Navigation.js - * @requires OpenLayers/Control/DrawFeature.js - */ -OpenLayers.Control.EditingToolbar = OpenLayers.Class.create(); -OpenLayers.Control.EditingToolbar.prototype = - OpenLayers.Class.inherit( OpenLayers.Control.Panel, { - - /** - * Create an editing toolbar for a given layer. - * @param OpenLayers.Layer.Vector layer - * @param Object options - */ - initialize: function(layer, options) { - OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]); - - this.addControls( - [ new OpenLayers.Control.Navigation() ] - ); - var controls = [ - new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Point, {'displayClass': 'olControlDrawFeaturePoint'}), - new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Path, {'displayClass': 'olControlDrawFeaturePath'}), - new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Polygon, {'displayClass': 'olControlDrawFeaturePolygon'}) - ]; - for (var i = 0; i < controls.length; i++) { - controls[i].featureAdded = function(feature) { feature.state = OpenLayers.State.INSERT; } - } - this.addControls(controls); - }, - - /** - * calls the default draw, and then activates mouse defaults. - */ - draw: function() { - var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments); - this.activateControl(this.controls[0]); - return div; - }, - - CLASS_NAME: "OpenLayers.Control.EditingToolbar" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js b/pacotes/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js deleted file mode 100644 index e34827c..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/KeyboardDefaults.js +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Control.js - * @requires OpenLayers/Handler/Keyboard.js - */ -OpenLayers.Control.KeyboardDefaults = OpenLayers.Class.create(); -OpenLayers.Control.KeyboardDefaults.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - - /** @type int */ - slideFactor: 75, - - /** - * @constructor - */ - initialize: function() { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - }, - - /** - * - */ - destroy: function() { - if (this.handler) { - this.handler.destroy(); - } - this.handler = null; - - OpenLayers.Control.prototype.destroy.apply(this, arguments); - }, - - /** - * - */ - draw: function() { - this.handler = new OpenLayers.Handler.Keyboard( this, { - "keypress": this.defaultKeyPress }); - this.activate(); - }, - - /** - * @param {Integer} code - */ - defaultKeyPress: function (code) { - switch(code) { - case OpenLayers.Event.KEY_LEFT: - this.map.pan(-this.slideFactor, 0); - break; - case OpenLayers.Event.KEY_RIGHT: - this.map.pan(this.slideFactor, 0); - break; - case OpenLayers.Event.KEY_UP: - this.map.pan(0, -this.slideFactor); - break; - case OpenLayers.Event.KEY_DOWN: - this.map.pan(0, this.slideFactor); - break; - - case 33: // Page Up - var size = this.map.getSize(); - this.map.pan(0, -0.75*size.h); - break; - case 34: // Page Down - var size = this.map.getSize(); - this.map.pan(0, 0.75*size.h); - break; - case 35: // End - var size = this.map.getSize(); - this.map.pan(0.75*size.w, 0); - break; - case 36: // Pos1 - var size = this.map.getSize(); - this.map.pan(-0.75*size.w, 0); - break; - - case 43: // + - this.map.zoomIn(); - break; - case 45: // - - this.map.zoomOut(); - break; - case 107: // + (IE only) - this.map.zoomIn(); - break; - case 109: // - (IE only) - this.map.zoomOut(); - break; - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.KeyboardDefaults" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/LayerSwitcher.js b/pacotes/openlayers/lib/OpenLayers/Control/LayerSwitcher.js deleted file mode 100644 index 2f70f70..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/LayerSwitcher.js +++ /dev/null @@ -1,498 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Control.js - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.LayerSwitcher = OpenLayers.Class.create(); -OpenLayers.Control.LayerSwitcher.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - - /** @type String */ - activeColor: "darkblue", - - - // DOM Elements - - /** @type DOMElement */ - layersDiv: null, - - /** @type DOMElement */ - baseLayersDiv: null, - - /** @type Array */ - baseLayers: null, - - - /** @type DOMElement */ - dataLbl: null, - - /** @type DOMElement */ - dataLayersDiv: null, - - /** @type Array */ - dataLayers: null, - - - /** @type DOMElement */ - minimizeDiv: null, - - /** @type DOMElement */ - maximizeDiv: null, - - /** @type Boolean */ - ascending: true, - - /** - * @constructor - */ - initialize: function(options) { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - }, - - /** - * - */ - destroy: function() { - - OpenLayers.Event.stopObservingElement(this.div); - - OpenLayers.Event.stopObservingElement(this.minimizeDiv); - OpenLayers.Event.stopObservingElement(this.maximizeDiv); - - //clear out layers info and unregister their events - this.clearLayersArray("base"); - this.clearLayersArray("data"); - - this.map.events.unregister("addlayer", this, this.redraw); - this.map.events.unregister("changelayer", this, this.redraw); - this.map.events.unregister("removelayer", this, this.redraw); - this.map.events.unregister("changebaselayer", this, this.redraw); - - OpenLayers.Control.prototype.destroy.apply(this, arguments); - }, - - /** - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - OpenLayers.Control.prototype.setMap.apply(this, arguments); - - this.map.events.register("addlayer", this, this.redraw); - this.map.events.register("changelayer", this, this.redraw); - this.map.events.register("removelayer", this, this.redraw); - this.map.events.register("changebaselayer", this, this.redraw); - }, - - /** - * @returns A reference to the DIV DOMElement containing the switcher tabs - * @type DOMElement - */ - draw: function() { - OpenLayers.Control.prototype.draw.apply(this); - - // create layout divs - this.loadContents(); - - // set mode to minimize - this.minimizeControl(); - - // populate div with current info - this.redraw(); - - return this.div; - }, - - /** user specifies either "base" or "data". we then clear all the - * corresponding listeners, the div, and reinitialize a new array. - * - * @private - * - * @param {String} layersType Ei - */ - clearLayersArray: function(layersType) { - var layers = this[layersType + "Layers"]; - if (layers) { - for(var i=0; i < layers.length; i++) { - var layer = layers[i]; - OpenLayers.Event.stopObservingElement(layer.inputElem); - OpenLayers.Event.stopObservingElement(layer.labelSpan); - } - } - this[layersType + "LayersDiv"].innerHTML = ""; - this[layersType + "Layers"] = new Array(); - }, - - - /** Goes through and takes the current state of the Map and rebuilds the - * control to display that state. Groups base layers into a radio-button - * group and lists each data layer with a checkbox. - * - * @returns A reference to the DIV DOMElement containing the control - * @type DOMElement - */ - redraw: function() { - - //clear out previous layers - this.clearLayersArray("base"); - this.clearLayersArray("data"); - - var containsOverlays = false; - - var layers = this.map.layers.slice(); - if (!this.ascending) { layers.reverse(); } - for( var i = 0; i < layers.length; i++) { - var layer = layers[i]; - var baseLayer = layer.isBaseLayer; - - if (baseLayer || layer.displayInLayerSwitcher) { - - if (!baseLayer) { - containsOverlays = true; - } - - // only check a baselayer if it is *the* baselayer, check data - // layers if they are visible - var checked = (baseLayer) ? (layer == this.map.baseLayer) - : layer.getVisibility(); - - // create input element - var inputElem = document.createElement("input"); - inputElem.id = "input_" + layer.name; - inputElem.name = (baseLayer) ? "baseLayers" : layer.name; - inputElem.type = (baseLayer) ? "radio" : "checkbox"; - inputElem.value = layer.name; - inputElem.checked = checked; - inputElem.defaultChecked = checked; - - if (!baseLayer && !layer.inRange) { - inputElem.disabled = true; - } - var context = { - 'inputElem': inputElem, - 'layer': layer, - 'layerSwitcher': this - } - OpenLayers.Event.observe(inputElem, "mouseup", - this.onInputClick.bindAsEventListener(context)); - - // create span - var labelSpan = document.createElement("span"); - if (!baseLayer && !layer.inRange) { - labelSpan.style.color = "gray"; - } - labelSpan.innerHTML = layer.name; - labelSpan.style.verticalAlign = (baseLayer) ? "bottom" - : "baseline"; - OpenLayers.Event.observe(labelSpan, "click", - this.onInputClick.bindAsEventListener(context)); - // create line break - var br = document.createElement("br"); - - - var groupArray = (baseLayer) ? this.baseLayers - : this.dataLayers; - groupArray.push({ - 'layer': layer, - 'inputElem': inputElem, - 'labelSpan': labelSpan - }); - - - var groupDiv = (baseLayer) ? this.baseLayersDiv - : this.dataLayersDiv; - groupDiv.appendChild(inputElem); - groupDiv.appendChild(labelSpan); - groupDiv.appendChild(br); - } - } - - // if no overlays, dont display the overlay label - this.dataLbl.style.display = (containsOverlays) ? "" : "none"; - - return this.div; - }, - - /** A label has been clicked, check or uncheck its corresponding input - * - * @private - * - * @context - * {DOMElement} inputElem - * {OpenLayers.Control.LayerSwitcher} layerSwitcher - * {OpenLayers.Layer} layer - * - * @param {Event} e - */ - - onInputClick: function(e) { - - if (!this.inputElem.disabled) { - if (this.inputElem.type == "radio") { - this.inputElem.checked = true; - this.layer.map.setBaseLayer(this.layer, true); - this.layer.map.events.triggerEvent("changebaselayer"); - } else { - this.inputElem.checked = !this.inputElem.checked; - this.layerSwitcher.updateMap(); - } - } - OpenLayers.Event.stop(e); - }, - - /** Need to update the map accordingly whenever user clicks in either of - * the layers. - * - * @private - * - * @param {Event} e - */ - onLayerClick: function(e) { - this.updateMap(); - }, - - - /** Cycles through the loaded data and base layer input arrays and makes - * the necessary calls to the Map object such that that the map's - * visual state corresponds to what the user has selected in the control - * - * @private - */ - updateMap: function() { - - // set the newly selected base layer - for(var i=0; i < this.baseLayers.length; i++) { - var layerEntry = this.baseLayers[i]; - if (layerEntry.inputElem.checked) { - this.map.setBaseLayer(layerEntry.layer, false); - } - } - - // set the correct visibilities for the overlays - for(var i=0; i < this.dataLayers.length; i++) { - var layerEntry = this.dataLayers[i]; - layerEntry.layer.setVisibility(layerEntry.inputElem.checked, true); - } - - }, - - /** Set up the labels and divs for the control - * - * @param {Event} e - */ - maximizeControl: function(e) { - - //HACK HACK HACK - find a way to auto-size this layerswitcher - this.div.style.width = "20em"; - this.div.style.height = ""; - - this.showControls(false); - - if (e != null) { - OpenLayers.Event.stop(e); - } - }, - - /** Hide all the contents of the control, shrink the size, - * add the maximize icon - * - * @param {Event} e - */ - minimizeControl: function(e) { - - this.div.style.width = "0px"; - this.div.style.height = "0px"; - - this.showControls(true); - - if (e != null) { - OpenLayers.Event.stop(e); - } - }, - - /** Hide/Show all LayerSwitcher controls depending on whether we are - * minimized or not - * - * @private - * - * @param {Boolean} minimize - */ - showControls: function(minimize) { - - this.maximizeDiv.style.display = minimize ? "" : "none"; - this.minimizeDiv.style.display = minimize ? "none" : ""; - - this.layersDiv.style.display = minimize ? "none" : ""; - }, - - /** Set up the labels and divs for the control - * - */ - loadContents: function() { - - //configure main div - this.div.style.position = "absolute"; - this.div.style.top = "25px"; - this.div.style.right = "0px"; - this.div.style.left = ""; - this.div.style.fontFamily = "sans-serif"; - this.div.style.fontWeight = "bold"; - this.div.style.marginTop = "3px"; - this.div.style.marginLeft = "3px"; - this.div.style.marginBottom = "3px"; - this.div.style.fontSize = "smaller"; - this.div.style.color = "white"; - this.div.style.backgroundColor = "transparent"; - - OpenLayers.Event.observe(this.div, "mouseup", - this.mouseUp.bindAsEventListener(this)); - OpenLayers.Event.observe(this.div, "click", - this.ignoreEvent); - OpenLayers.Event.observe(this.div, "mousedown", - this.mouseDown.bindAsEventListener(this)); - OpenLayers.Event.observe(this.div, "dblclick", this.ignoreEvent); - - - // layers list div - this.layersDiv = document.createElement("div"); - this.layersDiv.id = "layersDiv"; - this.layersDiv.style.paddingTop = "5px"; - this.layersDiv.style.paddingLeft = "10px"; - this.layersDiv.style.paddingBottom = "5px"; - this.layersDiv.style.paddingRight = "75px"; - this.layersDiv.style.backgroundColor = this.activeColor; - - // had to set width/height to get transparency in IE to work. - // thanks -- http://jszen.blogspot.com/2005/04/ie6-opacity-filter-caveat.html - // - this.layersDiv.style.width = "100%"; - this.layersDiv.style.height = "100%"; - - - var baseLbl = document.createElement("div"); - baseLbl.innerHTML = "Base Layer"; - baseLbl.style.marginTop = "3px"; - baseLbl.style.marginLeft = "3px"; - baseLbl.style.marginBottom = "3px"; - - this.baseLayersDiv = document.createElement("div"); - this.baseLayersDiv.style.paddingLeft = "10px"; - /*OpenLayers.Event.observe(this.baseLayersDiv, "click", - this.onLayerClick.bindAsEventListener(this)); - */ - - - this.dataLbl = document.createElement("div"); - this.dataLbl.innerHTML = "Overlays"; - this.dataLbl.style.marginTop = "3px"; - this.dataLbl.style.marginLeft = "3px"; - this.dataLbl.style.marginBottom = "3px"; - - this.dataLayersDiv = document.createElement("div"); - this.dataLayersDiv.style.paddingLeft = "10px"; - - if (this.ascending) { - this.layersDiv.appendChild(baseLbl); - this.layersDiv.appendChild(this.baseLayersDiv); - this.layersDiv.appendChild(this.dataLbl); - this.layersDiv.appendChild(this.dataLayersDiv); - } else { - this.layersDiv.appendChild(this.dataLbl); - this.layersDiv.appendChild(this.dataLayersDiv); - this.layersDiv.appendChild(baseLbl); - this.layersDiv.appendChild(this.baseLayersDiv); - } - - this.div.appendChild(this.layersDiv); - - OpenLayers.Rico.Corner.round(this.div, {corners: "tl bl", - bgColor: "transparent", - color: this.activeColor, - blend: false}); - - OpenLayers.Rico.Corner.changeOpacity(this.layersDiv, 0.75); - - var imgLocation = OpenLayers.Util.getImagesLocation(); - var sz = new OpenLayers.Size(18,18); - - // maximize button div - var img = imgLocation + 'layer-switcher-maximize.png'; - this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv( - "OpenLayers_Control_MaximizeDiv", - null, - sz, - img, - "absolute"); - this.maximizeDiv.style.top = "5px"; - this.maximizeDiv.style.right = "0px"; - this.maximizeDiv.style.left = ""; - this.maximizeDiv.style.display = "none"; - OpenLayers.Event.observe(this.maximizeDiv, - "click", - this.maximizeControl.bindAsEventListener(this)); - - this.div.appendChild(this.maximizeDiv); - - // minimize button div - var img = imgLocation + 'layer-switcher-minimize.png'; - var sz = new OpenLayers.Size(18,18); - this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv( - "OpenLayers_Control_MinimizeDiv", - null, - sz, - img, - "absolute"); - this.minimizeDiv.style.top = "5px"; - this.minimizeDiv.style.right = "0px"; - this.minimizeDiv.style.left = ""; - this.minimizeDiv.style.display = "none"; - OpenLayers.Event.observe(this.minimizeDiv, - "click", - this.minimizeControl.bindAsEventListener(this)); - - this.div.appendChild(this.minimizeDiv); - }, - - /** - * @private - * - * @param {Event} evt - */ - ignoreEvent: function(evt) { - OpenLayers.Event.stop(evt); - }, - - /** Register a local 'mouseDown' flag so that we'll know whether or not - * to ignore a mouseUp event - * - * @private - * - * @param {Event} evt - */ - mouseDown: function(evt) { - this.mouseDown = true; - this.ignoreEvent(evt); - }, - - /** If the 'mouseDown' flag has been set, that means that the drag was - * started from within the LayerSwitcher control, and thus we can - * ignore the mouseup. Otherwise, let the Event continue. - * - * @private - * - * @param {Event} evt - */ - mouseUp: function(evt) { - if (this.mouseDown) { - this.mouseDown = false; - this.ignoreEvent(evt); - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.LayerSwitcher" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/LayerTabs.js b/pacotes/openlayers/lib/OpenLayers/Control/LayerTabs.js deleted file mode 100644 index 911d918..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/LayerTabs.js +++ /dev/null @@ -1,226 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/license.txt for the full - * text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.LayerTabs = Class.create(); - -/** color used in the UI to show a layer is active/displayed -* -* @final -* @type String -*/ -OpenLayers.Control.LayerTabs.ACTIVE_COLOR = "darkblue"; - -/** color used in the UI to show a layer is deactivated/hidden -* -* @final -* @type String -*/ -OpenLayers.Control.LayerTabs.NONACTIVE_COLOR = "lightblue"; - - -OpenLayers.Control.LayerTabs.prototype = - Object.extend( new OpenLayers.Control(), { - - /** @type String */ - activeColor: "", - - /** @type String */ - nonActiveColor: "", - - /** @type String */ - mode: "checkbox", - - /** - * @constructor - */ - initialize: function(options) { - this.activeColor = OpenLayers.Control.LayerTabs.ACTIVE_COLOR; - this.nonActiveColor = OpenLayers.Control.LayerTabs.NONACTIVE_COLOR; - this.backdrops = []; - OpenLayers.Control.prototype.initialize.apply(this, arguments); - }, - - /** - * @returns A reference to the DIV DOMElement containing the switcher tabs - * @type DOMElement - */ - draw: function() { - // initialize our internal div - OpenLayers.Control.prototype.draw.apply(this); - - this.div.style.position = "absolute"; - this.div.style.top = "10px"; - this.div.style.right = "0px"; - this.div.style.left = ""; - this.div.style.fontFamily = "sans-serif"; - this.div.style.color = "white"; - this.div.style.fontWeight = "bold"; - this.div.style.marginTop = "3px"; - this.div.style.marginLeft = "3px"; - this.div.style.marginBottom = "3px"; - this.div.style.fontSize="smaller"; - this.div.style.width = "10em"; - - this.map.events.register("addlayer", this, this.redraw); - this.map.events.register("removelayer", this, this.redraw); - return this.redraw(); - }, - - /** - * @returns A reference to the DIV DOMElement containing the switcher tabs - * @type DOMElement - */ - redraw: function() { - - //clear out previous incarnation of LayerTabs tabs - this.div.innerHTML = ""; - var visible = false; - for( var i = 0; i < this.map.layers.length; i++) { - if (visible && this.mode == "radio") { - this.map.layers[i].setVisibility(false); - } else { - visible = this.map.layers[i].getVisibility(); - } - this.addTab(this.map.layers[i]); - } - - return this.div; - }, - - /** - * @param {Event} evt - */ - singleClick: function(evt) { - var div = Event.element(evt); - - // See comment about OL #57 fix below. - // If the click occurred on the corner spans we need - // to make sure we act on the actual label tab instead. - div = div.labelElement || div; - - var layer = div.layer; - if (this.mode == "radio") { - for(var i=0; i < this.backdrops.length; i++) { - this.setTabActivation(this.backdrops[i], false); - this.backdrops[i].layer.setVisibility(false); - } - this.setTabActivation(div, true); - layer.setVisibility(true); - } else { - var visible = layer.getVisibility(); - - this.setTabActivation(div, !visible); - layer.setVisibility(!visible); - } - Event.stop(evt); - }, - - /** - * @private - * - * @param {Event} evt - */ - ignoreEvent: function(evt) { - Event.stop(evt); - return false; - }, - - /** - * @private - * - * @param {OpenLayers.Layer} layer - */ - addTab: function(layer) { - - // Outer DIV - for Rico Corners - // - var backdropLabelOuter = document.createElement('div'); - backdropLabelOuter.id = "LayerTabs_" + layer.name + "_Tab"; - backdropLabelOuter.style.marginTop = "4px"; - backdropLabelOuter.style.marginBottom = "4px"; - - this._setEventHandlers(backdropLabelOuter); - - // Inner Label - for Rico Corners - // - var backdropLabel = document.createElement('p'); - backdropLabel.innerHTML = layer.name; - backdropLabel.style.marginTop = "0px"; - backdropLabel.style.marginBottom = "0px"; - backdropLabel.style.paddingLeft = "10px"; - backdropLabel.style.paddingRight = "10px"; - - // add reference to layer onto the div for use in event handlers - backdropLabel.layer = layer; - - // set event handlers - this._setEventHandlers(backdropLabel); - - // add label to div - backdropLabelOuter.appendChild(backdropLabel); - - this.backdrops.push(backdropLabel); - - // add div to main LayerTabs Div - this.div.appendChild(backdropLabelOuter); - - Rico.Corner.round(backdropLabelOuter, {corners: "tl bl", - bgColor: "transparent", - color: "white", - blend: false}); - - // extend the event handlers to operate on the - // rounded corners as well. (Fixes OL #57.) - var spanElements=backdropLabel.parentNode.getElementsByTagName("span"); - - for (var currIdx = 0; currIdx < spanElements.length; currIdx++) { - this._setEventHandlers(spanElements[currIdx], backdropLabel); - } - - this.setTabActivation(backdropLabel, layer.getVisibility()); - }, - - /* - @private - - @param {DOMElement} div - @param {Boolean} activate - */ - _setEventHandlers : function(element, labelDiv) { - - // We only want to respond to a mousedown event. - element.onclick = this.singleClick.bindAsEventListener(this); - element.ondblclick = this.singleClick.bindAsEventListener(this); - element.onmouseup = this.ignoreEvent.bindAsEventListener(this); - element.onmousedown = this.ignoreEvent.bindAsEventListener(this); - - // If we are operating on a corner span we need to store a - // reference to the actual tab. (See comment about OL #57 fix above.) - if (labelDiv) { - element.labelElement = labelDiv; - } - }, - - /** - * @private - * - * @param {DOMElement} div - * @param {Boolean} activate - */ - setTabActivation:function(div, activate) { - var color = (activate) ? this.activeColor : this.nonActiveColor; - Rico.Corner.changeColor(div, color); - }, - - - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.LayerTabs" -}); - diff --git a/pacotes/openlayers/lib/OpenLayers/Control/MouseDefaults.js b/pacotes/openlayers/lib/OpenLayers/Control/MouseDefaults.js deleted file mode 100644 index d659db5..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/MouseDefaults.js +++ /dev/null @@ -1,314 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.MouseDefaults = OpenLayers.Class.create(); -OpenLayers.Control.MouseDefaults.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - - /** WARNING WARNING WARNING!!! - This class is DEPRECATED in 2.4 and will be removed by 3.0. - If you need this functionality, use Control.Navigation instead!!! */ - - /** @type Boolean */ - performedDrag: false, - - /** @type function */ - wheelObserver: null, - - /** - * @constructor - */ - initialize: function() { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - }, - - /** - * - */ - destroy: function() { - - if (this.handler) { - this.handler.destroy(); - } - this.handler = null; - - this.map.events.unregister( "click", this, this.defaultClick ); - this.map.events.unregister( "dblclick", this, this.defaultDblClick ); - this.map.events.unregister( "mousedown", this, this.defaultMouseDown ); - this.map.events.unregister( "mouseup", this, this.defaultMouseUp ); - this.map.events.unregister( "mousemove", this, this.defaultMouseMove ); - this.map.events.unregister( "mouseout", this, this.defaultMouseOut ); - - //unregister mousewheel events specifically on the window and document - OpenLayers.Event.stopObserving(window, "DOMMouseScroll", - this.wheelObserver); - OpenLayers.Event.stopObserving(window, "mousewheel", - this.wheelObserver); - OpenLayers.Event.stopObserving(document, "mousewheel", - this.wheelObserver); - this.wheelObserver = null; - - OpenLayers.Control.prototype.destroy.apply(this, arguments); - }, - - /** - * - */ - draw: function() { - this.map.events.register( "click", this, this.defaultClick ); - this.map.events.register( "dblclick", this, this.defaultDblClick ); - this.map.events.register( "mousedown", this, this.defaultMouseDown ); - this.map.events.register( "mouseup", this, this.defaultMouseUp ); - this.map.events.register( "mousemove", this, this.defaultMouseMove ); - this.map.events.register( "mouseout", this, this.defaultMouseOut ); - - this.registerWheelEvents(); - - }, - - /** - * - */ - registerWheelEvents: function() { - - this.wheelObserver = this.onWheelEvent.bindAsEventListener(this); - - //register mousewheel events specifically on the window and document - OpenLayers.Event.observe(window, "DOMMouseScroll", this.wheelObserver); - OpenLayers.Event.observe(window, "mousewheel", this.wheelObserver); - OpenLayers.Event.observe(document, "mousewheel", this.wheelObserver); - }, - - /** - * @param {Event} evt - * - * @type Boolean - */ - defaultClick: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - var notAfterDrag = !this.performedDrag; - this.performedDrag = false; - return notAfterDrag; - }, - - /** - * @param {Event} evt - */ - defaultDblClick: function (evt) { - var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); - this.map.setCenter(newCenter, this.map.zoom + 1); - OpenLayers.Event.stop(evt); - return false; - }, - - /** - * @param {Event} evt - */ - defaultMouseDown: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - this.mouseDragStart = evt.xy.clone(); - this.performedDrag = false; - if (evt.shiftKey) { - this.map.div.style.cursor = "crosshair"; - this.zoomBox = OpenLayers.Util.createDiv('zoomBox', - this.mouseDragStart, - null, - null, - "absolute", - "2px solid red"); - this.zoomBox.style.backgroundColor = "white"; - this.zoomBox.style.filter = "alpha(opacity=50)"; // IE - this.zoomBox.style.opacity = "0.50"; - this.zoomBox.style.fontSize = "1px"; - this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.viewPortDiv.appendChild(this.zoomBox); - } - document.onselectstart=function() { return false; } - OpenLayers.Event.stop(evt); - }, - - /** - * @param {Event} evt - */ - defaultMouseMove: function (evt) { - // record the mouse position, used in onWheelEvent - this.mousePosition = evt.xy.clone(); - - if (this.mouseDragStart != null) { - if (this.zoomBox) { - var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); - var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); - this.zoomBox.style.width = Math.max(1, deltaX) + "px"; - this.zoomBox.style.height = Math.max(1, deltaY) + "px"; - if (evt.xy.x < this.mouseDragStart.x) { - this.zoomBox.style.left = evt.xy.x+"px"; - } - if (evt.xy.y < this.mouseDragStart.y) { - this.zoomBox.style.top = evt.xy.y+"px"; - } - } else { - var deltaX = this.mouseDragStart.x - evt.xy.x; - var deltaY = this.mouseDragStart.y - evt.xy.y; - var size = this.map.getSize(); - var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, - size.h / 2 + deltaY); - var newCenter = this.map.getLonLatFromViewPortPx( newXY ); - this.map.setCenter(newCenter, null, true); - this.mouseDragStart = evt.xy.clone(); - this.map.div.style.cursor = "move"; - } - this.performedDrag = true; - } - }, - - /** - * @param {Event} evt - */ - defaultMouseUp: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - if (this.zoomBox) { - this.zoomBoxEnd(evt); - } else { - if (this.performedDrag) { - this.map.setCenter(this.map.center); - } - } - document.onselectstart=null; - this.mouseDragStart = null; - this.map.div.style.cursor = ""; - }, - - /** - * @param {Event} evt - */ - defaultMouseOut: function (evt) { - if (this.mouseDragStart != null && - OpenLayers.Util.mouseLeft(evt, this.map.div)) { - if (this.zoomBox) { - this.removeZoomBox(); - } - this.mouseDragStart = null; - } - }, - - - /** User spun scroll wheel up - * - */ - defaultWheelUp: function(evt) { - if (this.map.getZoom() <= this.map.getNumZoomLevels()) { - this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), - this.map.getZoom() + 1); - } - }, - - /** User spun scroll wheel down - * - */ - defaultWheelDown: function(evt) { - if (this.map.getZoom() > 0) { - this.map.setCenter(this.map.getLonLatFromPixel(evt.xy), - this.map.getZoom() - 1); - } - }, - - /** Zoombox function. - * - */ - zoomBoxEnd: function(evt) { - if (this.mouseDragStart != null) { - if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 || - Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) { - var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); - var end = this.map.getLonLatFromViewPortPx( evt.xy ); - var top = Math.max(start.lat, end.lat); - var bottom = Math.min(start.lat, end.lat); - var left = Math.min(start.lon, end.lon); - var right = Math.max(start.lon, end.lon); - var bounds = new OpenLayers.Bounds(left, bottom, right, top); - this.map.zoomToExtent(bounds); - } else { - var end = this.map.getLonLatFromViewPortPx( evt.xy ); - this.map.setCenter(new OpenLayers.LonLat( - (end.lon), - (end.lat) - ), this.map.getZoom() + 1); - } - this.removeZoomBox(); - } - }, - - /** - * Remove the zoombox from the screen and nullify our reference to it. - */ - removeZoomBox: function() { - this.map.viewPortDiv.removeChild(this.zoomBox); - this.zoomBox = null; - }, - - -/** - * Mouse ScrollWheel code thanks to http://adomas.org/javascript-mouse-wheel/ - */ - - - /** Catch the wheel event and handle it xbrowserly - * - * @param {Event} e - */ - onWheelEvent: function(e){ - - // first determine whether or not the wheeling was inside the map - var inMap = false; - var elem = OpenLayers.Event.element(e); - while(elem != null) { - if (this.map && elem == this.map.div) { - inMap = true; - break; - } - elem = elem.parentNode; - } - - if (inMap) { - - var delta = 0; - if (!e) { - e = window.event; - } - if (e.wheelDelta) { - delta = e.wheelDelta/120; - if (window.opera) { - delta = -delta; - } - } else if (e.detail) { - delta = -e.detail / 3; - } - if (delta) { - // add the mouse position to the event because mozilla has a bug - // with clientX and clientY (see https://bugzilla.mozilla.org/show_bug.cgi?id=352179) - // getLonLatFromViewPortPx(e) returns wrong values - e.xy = this.mousePosition; - - if (delta < 0) { - this.defaultWheelDown(e); - } else { - this.defaultWheelUp(e); - } - } - - //only wheel the map, not the window - OpenLayers.Event.stop(e); - } - }, - - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.MouseDefaults" -}); - diff --git a/pacotes/openlayers/lib/OpenLayers/Control/MousePosition.js b/pacotes/openlayers/lib/OpenLayers/Control/MousePosition.js deleted file mode 100644 index d69b953..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/MousePosition.js +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.MousePosition = OpenLayers.Class.create(); -OpenLayers.Control.MousePosition.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - - /** @type DOMElement */ - element: null, - - /** @type String */ - prefix: '', - - /** @type String */ - separator: ', ', - - /** @type String */ - suffix: '', - - /** @type int */ - numdigits: 5, - - /** @type int */ - granularity: 10, - - /** @type OpenLayers.LonLat */ - lastXy: null, - - /** - * @constructor - * - * @param {DOMElement} options Options for control. - */ - initialize: function(options) { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - }, - - /** - * @type DOMElement - */ - draw: function() { - OpenLayers.Control.prototype.draw.apply(this, arguments); - - if (!this.element) { - this.div.left = ""; - this.div.top = ""; - this.div.className = this.displayClass; - this.element = this.div; - } - - this.redraw(); - return this.div; - }, - - /** - * - */ - redraw: function(evt) { - - var lonLat; - - if (evt == null) { - lonLat = new OpenLayers.LonLat(0, 0); - } else { - if (this.lastXy == null || - Math.abs(evt.xy.x - this.lastXy.x) > this.granularity || - Math.abs(evt.xy.y - this.lastXy.y) > this.granularity) - { - this.lastXy = evt.xy; - return; - } - - lonLat = this.map.getLonLatFromPixel(evt.xy); - this.lastXy = evt.xy; - } - - var digits = parseInt(this.numdigits); - var newHtml = - this.prefix + - lonLat.lon.toFixed(digits) + - this.separator + - lonLat.lat.toFixed(digits) + - this.suffix; - - if (newHtml != this.element.innerHTML) { - this.element.innerHTML = newHtml; - } - }, - - /** - * - */ - setMap: function() { - OpenLayers.Control.prototype.setMap.apply(this, arguments); - this.map.events.register( 'mousemove', this, this.redraw); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.MousePosition" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/MouseToolbar.js b/pacotes/openlayers/lib/OpenLayers/Control/MouseToolbar.js deleted file mode 100644 index f0eb9e0..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/MouseToolbar.js +++ /dev/null @@ -1,327 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Control.js - * @requires OpenLayers/Control/MouseDefaults.js - */ -OpenLayers.Control.MouseToolbar = OpenLayers.Class.create(); -OpenLayers.Control.MouseToolbar.X = 6; -OpenLayers.Control.MouseToolbar.Y = 300; -OpenLayers.Control.MouseToolbar.prototype = - OpenLayers.Class.inherit( OpenLayers.Control.MouseDefaults, { - - /** WARNING WARNING WARNING!!! - This class is DEPRECATED in 2.4 and will be removed by 3.0. - If you need this functionality, use Control.NavToolbar instead!!! */ - - mode: null, - - buttons: null, - - direction: "vertical", - - /** @type String */ - buttonClicked: null, - - initialize: function(position, direction) { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - this.position = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X, - OpenLayers.Control.MouseToolbar.Y); - if (position) { - this.position = position; - } - if (direction) { - this.direction = direction; - } - this.measureDivs = []; - }, - - /** - * - */ - destroy: function() { - for( var btnId in this.buttons) { - var btn = this.buttons[btnId]; - btn.map = null; - btn.events.destroy(); - } - OpenLayers.Control.MouseDefaults.prototype.destroy.apply(this, - arguments); - }, - - draw: function() { - OpenLayers.Control.prototype.draw.apply(this, arguments); - OpenLayers.Control.MouseDefaults.prototype.draw.apply(this, arguments); - this.buttons = new Object(); - var sz = new OpenLayers.Size(28,28); - var centered = new OpenLayers.Pixel(OpenLayers.Control.MouseToolbar.X,0); - this._addButton("zoombox", "drag-rectangle-off.png", "drag-rectangle-on.png", centered, sz, "Shift->Drag to zoom to area"); - centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0)); - this._addButton("pan", "panning-hand-off.png", "panning-hand-on.png", centered, sz, "Drag the map to pan."); - centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0)); - this.switchModeTo("pan"); - - return this.div; - }, - - _addButton:function(id, img, activeImg, xy, sz, title) { - var imgLocation = OpenLayers.Util.getImagesLocation() + img; - var activeImgLocation = OpenLayers.Util.getImagesLocation() + activeImg; - // var btn = new ol.AlphaImage("_"+id, imgLocation, xy, sz); - var btn = OpenLayers.Util.createAlphaImageDiv( - "OpenLayers_Control_MouseToolbar_" + id, - xy, sz, imgLocation, "absolute"); - - //we want to add the outer div - this.div.appendChild(btn); - btn.imgLocation = imgLocation; - btn.activeImgLocation = activeImgLocation; - - btn.events = new OpenLayers.Events(this, btn, null, true); - btn.events.register("mousedown", this, this.buttonDown); - btn.events.register("mouseup", this, this.buttonUp); - btn.events.register("dblclick", this, OpenLayers.Event.stop); - btn.action = id; - btn.title = title; - btn.alt = title; - btn.map = this.map; - - //we want to remember/reference the outer div - this.buttons[id] = btn; - return btn; - }, - - /** - * @param {Event} evt - */ - buttonDown: function(evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - this.buttonClicked = evt.element.action; - OpenLayers.Event.stop(evt); - }, - - /** - * @param {Event} evt - */ - buttonUp: function(evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - if (this.buttonClicked != null) { - if (this.buttonClicked == evt.element.action) { - this.switchModeTo(evt.element.action); - } - OpenLayers.Event.stop(evt); - this.buttonClicked = null; - } - }, - - /** - * @param {Event} evt - */ - defaultDblClick: function (evt) { - this.switchModeTo("pan"); - this.performedDrag = false; - var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); - this.map.setCenter(newCenter, this.map.zoom + 1); - OpenLayers.Event.stop(evt); - return false; - }, - - /** - * @param {Event} evt - */ - defaultMouseDown: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - this.mouseDragStart = evt.xy.clone(); - this.performedDrag = false; - this.startViaKeyboard = false; - if (evt.shiftKey && this.mode !="zoombox") { - this.switchModeTo("zoombox"); - this.startViaKeyboard = true; - } else if (evt.altKey && this.mode !="measure") { - this.switchModeTo("measure"); - } else if (!this.mode) { - this.switchModeTo("pan"); - } - - switch (this.mode) { - case "zoombox": - this.map.div.style.cursor = "crosshair"; - this.zoomBox = OpenLayers.Util.createDiv('zoomBox', - this.mouseDragStart, - null, - null, - "absolute", - "2px solid red"); - this.zoomBox.style.backgroundColor = "white"; - this.zoomBox.style.filter = "alpha(opacity=50)"; // IE - this.zoomBox.style.opacity = "0.50"; - this.zoomBox.style.fontSize = "1px"; - this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.viewPortDiv.appendChild(this.zoomBox); - this.performedDrag = true; - break; - case "measure": - var distance = ""; - if (this.measureStart) { - measureEnd = this.map.getLonLatFromViewPortPx(this.mouseDragStart); - distance = OpenLayers.Util.distVincenty(this.measureStart, measureEnd); - distance = Math.round(distance * 100) / 100; - distance = distance + "km"; - this.measureStartBox = this.measureBox; - } - this.measureStart = this.map.getLonLatFromViewPortPx(this.mouseDragStart);; - this.measureBox = OpenLayers.Util.createDiv(null, - this.mouseDragStart.add( - -2-parseInt(this.map.layerContainerDiv.style.left), - -2-parseInt(this.map.layerContainerDiv.style.top)), - null, - null, - "absolute"); - this.measureBox.style.width="4px"; - this.measureBox.style.height="4px"; - this.measureBox.style.fontSize = "1px"; - this.measureBox.style.backgroundColor="red"; - this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.layerContainerDiv.appendChild(this.measureBox); - if (distance) { - this.measureBoxDistance = OpenLayers.Util.createDiv(null, - this.mouseDragStart.add( - -2-parseInt(this.map.layerContainerDiv.style.left), - 2-parseInt(this.map.layerContainerDiv.style.top)), - null, - null, - "absolute"); - - this.measureBoxDistance.innerHTML = distance; - this.measureBoxDistance.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.layerContainerDiv.appendChild(this.measureBoxDistance); - this.measureDivs.push(this.measureBoxDistance); - } - this.measureBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.layerContainerDiv.appendChild(this.measureBox); - this.measureDivs.push(this.measureBox); - break; - default: - this.map.div.style.cursor = "move"; - break; - } - document.onselectstart = function() { return false; } - OpenLayers.Event.stop(evt); - }, - - switchModeTo: function(mode) { - if (mode != this.mode) { - - - if (this.mode && this.buttons[this.mode]) { - OpenLayers.Util.modifyAlphaImageDiv(this.buttons[this.mode], null, null, null, this.buttons[this.mode].imgLocation); - } - if (this.mode == "measure" && mode != "measure") { - for(var i = 0; i < this.measureDivs.length; i++) { - if (this.measureDivs[i]) { - this.map.layerContainerDiv.removeChild(this.measureDivs[i]); - } - } - this.measureDivs = []; - this.measureStart = null; - } - this.mode = mode; - if (this.buttons[mode]) { - OpenLayers.Util.modifyAlphaImageDiv(this.buttons[mode], null, null, null, this.buttons[mode].activeImgLocation); - } - switch (this.mode) { - case "zoombox": - this.map.div.style.cursor = "crosshair"; - break; - default: - this.map.div.style.cursor = ""; - break; - } - - } - }, - - leaveMode: function() { - this.switchModeTo("pan"); - }, - - /** - * @param {Event} evt - */ - defaultMouseMove: function (evt) { - if (this.mouseDragStart != null) { - switch (this.mode) { - case "zoombox": - var deltaX = Math.abs(this.mouseDragStart.x - evt.xy.x); - var deltaY = Math.abs(this.mouseDragStart.y - evt.xy.y); - this.zoomBox.style.width = Math.max(1, deltaX) + "px"; - this.zoomBox.style.height = Math.max(1, deltaY) + "px"; - if (evt.xy.x < this.mouseDragStart.x) { - this.zoomBox.style.left = evt.xy.x+"px"; - } - if (evt.xy.y < this.mouseDragStart.y) { - this.zoomBox.style.top = evt.xy.y+"px"; - } - break; - default: - var deltaX = this.mouseDragStart.x - evt.xy.x; - var deltaY = this.mouseDragStart.y - evt.xy.y; - var size = this.map.getSize(); - var newXY = new OpenLayers.Pixel(size.w / 2 + deltaX, - size.h / 2 + deltaY); - var newCenter = this.map.getLonLatFromViewPortPx( newXY ); - this.map.setCenter(newCenter, null, true); - this.mouseDragStart = evt.xy.clone(); - } - this.performedDrag = true; - } - }, - - /** - * @param {Event} evt - */ - defaultMouseUp: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - switch (this.mode) { - case "zoombox": - this.zoomBoxEnd(evt); - if (this.startViaKeyboard) this.leaveMode(); - break; - case "pan": - if (this.performedDrag) { - this.map.setCenter(this.map.center); - } - } - document.onselectstart = null; - this.mouseDragStart = null; - this.map.div.style.cursor = "default"; - }, - - /** - * @param {Event} evt - */ - defaultMouseOut: function (evt) { - if (this.mouseDragStart != null - && OpenLayers.Util.mouseLeft(evt, this.map.div)) { - if (this.zoomBox) { - this.removeZoomBox(); - if (this.startViaKeyboard) this.leaveMode(); - } - this.mouseDragStart = null; - this.map.div.style.cursor = "default"; - } - }, - - defaultClick: function (evt) { - if (this.performedDrag) { - this.performedDrag = false; - return false; - } - } -}); - diff --git a/pacotes/openlayers/lib/OpenLayers/Control/NavToolbar.js b/pacotes/openlayers/lib/OpenLayers/Control/NavToolbar.js deleted file mode 100644 index 68d0e2a..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/NavToolbar.js +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Control/Panel.js - * @requires OpenLayers/Control/Navigation.js - * @requires OpenLayers/Control/ZoomBox.js - */ -OpenLayers.Control.NavToolbar = OpenLayers.Class.create(); -OpenLayers.Control.NavToolbar.prototype = - OpenLayers.Class.inherit( OpenLayers.Control.Panel, { - - /** - * Add our two mousedefaults controls. - */ - initialize: function(options) { - OpenLayers.Control.Panel.prototype.initialize.apply(this, arguments); - this.addControls([ - new OpenLayers.Control.Navigation(), - new OpenLayers.Control.ZoomBox() - ]); - }, - - /** - * calls the default draw, and then activates mouse defaults. - */ - draw: function() { - var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments); - this.activateControl(this.controls[0]); - return div; - }, - - CLASS_NAME: "OpenLayers.Control.NavToolbar" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/Navigation.js b/pacotes/openlayers/lib/OpenLayers/Control/Navigation.js deleted file mode 100644 index 00deec2..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/Navigation.js +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Control/ZoomBox.js - * @requires OpenLayers/Control/DragPan.js - * @requires OpenLayers/Handler/MouseWheel.js - */ -OpenLayers.Control.Navigation = OpenLayers.Class.create(); -OpenLayers.Control.Navigation.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - - /** @type OpenLayers.Control.ZoomBox */ - dragPan: null, - - /** @type OpenLayers.Control.ZoomBox */ - zoomBox: null, - - /** @type OpenLayers.Handler.MouseWheel */ - wheelHandler: null, - - activate: function() { - this.dragPan.activate(); - this.wheelHandler.activate(); - this.zoomBox.activate(); - return OpenLayers.Control.prototype.activate.apply(this,arguments); - }, - - deactivate: function() { - this.zoomBox.deactivate(); - this.dragPan.deactivate(); - this.wheelHandler.deactivate(); - return OpenLayers.Control.prototype.deactivate.apply(this,arguments); - }, - - draw: function() { - this.map.events.register( "dblclick", this, this.defaultDblClick ); - this.dragPan = new OpenLayers.Control.DragPan({map: this.map}); - this.zoomBox = new OpenLayers.Control.ZoomBox( - {map: this.map, keyMask: OpenLayers.Handler.MOD_SHIFT}); - this.dragPan.draw(); - this.zoomBox.draw(); - this.wheelHandler = new OpenLayers.Handler.MouseWheel( - this, {"up" : this.wheelUp, - "down": this.wheelDown} ); - this.activate(); - }, - - /** - * @param {Event} evt - */ - defaultDblClick: function (evt) { - var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); - this.map.setCenter(newCenter, this.map.zoom + 1); - OpenLayers.Event.stop(evt); - return false; - }, - - wheelChange: function(evt, deltaZ) { - var newZoom = this.map.getZoom() + deltaZ; - if (!this.map.isValidZoomLevel(newZoom)) return; - - var size = this.map.getSize(); - var deltaX = size.w/2 - evt.xy.x; - var deltaY = evt.xy.y - size.h/2; - var newRes = this.map.baseLayer.resolutions[newZoom]; - var zoomPoint = this.map.getLonLatFromPixel(evt.xy); - var newCenter = new OpenLayers.LonLat( - zoomPoint.lon + deltaX * newRes, - zoomPoint.lat + deltaY * newRes ); - this.map.setCenter( newCenter, newZoom ); - }, - - /** User spun scroll wheel up - * - */ - wheelUp: function(evt) { - this.wheelChange(evt, 1); - }, - - /** User spun scroll wheel down - * - */ - wheelDown: function(evt) { - this.wheelChange(evt, -1); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.Navigation" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/OverviewMap.js b/pacotes/openlayers/lib/OpenLayers/Control/OverviewMap.js deleted file mode 100644 index 531c9fe..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/OverviewMap.js +++ /dev/null @@ -1,609 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ -/** - * @fileoverview Locator Map Control - * @author Tim Schaub - */ - -/** - * @class - * - * @requires OpenLayers/Control.js - * @requires OpenLayers/BaseTypes.js - * @requires OpenLayers/Events.js - */ -OpenLayers.Control.OverviewMap = OpenLayers.Class.create(); - -OpenLayers.Control.OverviewMap.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - - /** For div.id - * @type String */ - id: "OverviewMap", - - /** @type DOMElement */ - element: null, - - /** - * The overvew map itself. - * @type OpenLayers.Map - */ - ovmap: null, - - /** - * The overvew map size in pixels. Note that this is the size of the map - * itself - the element that contains the map (default class name - * olControlOverviewMapElement) may have padding or other style attributes - * added via CSS. - * @type OpenLayers.Size - */ - size: new OpenLayers.Size(180, 90), - - /** - * Ordered list of layers in the overview map. If none are sent at - * construction, then the default below is used. - * - * @type Array(OpenLayers.Layer) - */ - layers: null, - - /** - * The ratio of the overview map resolution to the main map resolution - * at which to zoom farther out on the overview map. - * @type Float - */ - minRatio: 8, - - /** - * The ratio of the overview map resolution to the main map resolution - * at which to zoom farther in on the overview map. - * @type Float - */ - maxRatio: 32, - - /** - * An object containing any non-default properties to be sent to the - * overview map's map constructor. These should include any non-default - * options that the main map was constructed with. - * @type: Object - */ - mapOptions: null, - - /** - * @constructor - * @param {Object} options Hashtable of options to set on the overview map - */ - initialize: function(options) { - this.layers = new Array(); - OpenLayers.Control.prototype.initialize.apply(this, [options]); - }, - - /** - * - */ - destroy: function() { - if (!this.mapDiv) { // we've already been destroyed - return; - } - this.mapDiv.removeChild(this.extentRectangle); - this.extentRectangle = null; - this.rectEvents.destroy(); - this.rectEvents = null; - - this.ovmap.destroy(); - this.ovmap = null; - - this.element.removeChild(this.mapDiv); - this.mapDiv = null; - this.mapDivEvents.destroy(); - this.mapDivEvents = null; - - this.div.removeChild(this.element); - this.element = null; - this.elementEvents.destroy(); - this.elementEvents = null; - - if (this.maximizeDiv) { - OpenLayers.Event.stopObservingElement(this.maximizeDiv); - this.div.removeChild(this.maximizeDiv); - this.maximizeDiv = null; - } - - if (this.minimizeDiv) { - OpenLayers.Event.stopObservingElement(this.minimizeDiv); - this.div.removeChild(this.minimizeDiv); - this.minimizeDiv = null; - } - - this.map.events.unregister('moveend', this, this.update); - this.map.events.unregister("changebaselayer", this, - this.baseLayerDraw); - - OpenLayers.Control.prototype.destroy.apply(this, arguments); - }, - - /** - * @type DOMElement - */ - draw: function() { - OpenLayers.Control.prototype.draw.apply(this, arguments); - if(!(this.layers.length > 0)) { - if (this.map.baseLayer) { - var layer = this.map.baseLayer.clone(); - this.layers = [layer]; - } else { - this.map.events.register("changebaselayer", this, this.baseLayerDraw); - return this.div; - } - } - - // create overview map DOM elements - this.element = document.createElement('div'); - this.element.className = this.displayClass + 'Element'; - this.element.style.display = 'none'; - - this.mapDiv = document.createElement('div'); - this.mapDiv.style.width = this.size.w + 'px'; - this.mapDiv.style.height = this.size.h + 'px'; - this.mapDiv.style.position = 'relative'; - this.mapDiv.style.overflow = 'hidden'; - this.mapDiv.id = OpenLayers.Util.createUniqueID('overviewMap'); - - this.extentRectangle = document.createElement('div'); - this.extentRectangle.style.position = 'absolute'; - this.extentRectangle.style.zIndex = 1000; //HACK - this.extentRectangle.style.overflow = 'hidden'; - this.extentRectangle.style.backgroundImage = 'url(' + - OpenLayers.Util.getImagesLocation() + - 'blank.gif)'; - this.extentRectangle.className = this.displayClass+'ExtentRectangle'; - this.mapDiv.appendChild(this.extentRectangle); - - this.element.appendChild(this.mapDiv); - - this.div.appendChild(this.element); - - this.map.events.register('moveend', this, this.update); - - // Set up events. The image div recenters the map on click. - // The extent rectangle can be dragged to recenter the map. - // If the mousedown happened elsewhere, then mousemove and mouseup - // should slip through. - this.elementEvents = new OpenLayers.Events(this, this.element); - this.elementEvents.register('mousedown', this, function(e) { - OpenLayers.Event.stop(e); - }); - this.elementEvents.register('click', this, function(e) { - OpenLayers.Event.stop(e); - }); - this.elementEvents.register('dblclick', this, function(e) { - OpenLayers.Event.stop(e); - }); - this.rectEvents = new OpenLayers.Events(this, this.extentRectangle, - null, true); - this.rectEvents.register('mouseout', this, this.rectMouseOut); - this.rectEvents.register('mousedown', this, this.rectMouseDown); - this.rectEvents.register('mousemove', this, this.rectMouseMove); - this.rectEvents.register('mouseup', this, this.rectMouseUp); - this.rectEvents.register('click', this, function(e) { - OpenLayers.Event.stop(e); - }); - this.rectEvents.register('dblclick', this, this.rectDblClick ); - this.mapDivEvents = new OpenLayers.Events(this, this.mapDiv); - this.mapDivEvents.register('click', this, this.mapDivClick); - - // Optionally add min/max buttons if the control will go in the - // map viewport. - if(!this.outsideViewport) { - this.div.className = this.displayClass + 'Container'; - var imgLocation = OpenLayers.Util.getImagesLocation(); - // maximize button div - var img = imgLocation + 'layer-switcher-maximize.png'; - this.maximizeDiv = OpenLayers.Util.createAlphaImageDiv( - this.displayClass + 'MaximizeButton', - null, - new OpenLayers.Size(18,18), - img, - 'absolute'); - this.maximizeDiv.style.display = 'none'; - this.maximizeDiv.className = this.displayClass + 'MaximizeButton'; - OpenLayers.Event.observe(this.maximizeDiv, - 'click', - this.maximizeControl.bindAsEventListener(this)); - OpenLayers.Event.observe(this.maximizeDiv, - 'dblclick', - function(e) { - OpenLayers.Event.stop(e); - }); - this.div.appendChild(this.maximizeDiv); - - // minimize button div - var img = imgLocation + 'layer-switcher-minimize.png'; - this.minimizeDiv = OpenLayers.Util.createAlphaImageDiv( - 'OpenLayers_Control_minimizeDiv', - null, - new OpenLayers.Size(18,18), - img, - 'absolute'); - this.minimizeDiv.style.display = 'none'; - this.minimizeDiv.className = this.displayClass + 'MinimizeButton'; - OpenLayers.Event.observe(this.minimizeDiv, - 'click', - this.minimizeControl.bindAsEventListener(this)); - OpenLayers.Event.observe(this.minimizeDiv, - 'dblclick', - function(e) { - OpenLayers.Event.stop(e); - }); - this.div.appendChild(this.minimizeDiv); - - this.minimizeControl(); - } else { - // show the overview map - this.element.style.display = ''; - } - if(this.map.getExtent()) { - this.update(); - } - return this.div; - }, - - baseLayerDraw: function() { - this.draw(); - this.map.events.unregister("changebaselayer", this, this.baseLayerDraw); - }, - - /** - * @param {OpenLayers.Event} evt - */ - rectMouseOut: function (evt) { - if(this.rectDragStart != null) { - if(this.performedRectDrag) { - this.rectMouseMove(evt); - var rectPxBounds = this.getRectPxBounds(); - // if we're off of the overview map, update the main map - // otherwise, keep moving the rect - if((rectPxBounds.top <= 0) || (rectPxBounds.left <= 0) || - (rectPxBounds.bottom >= this.size.h - this.hComp) || - (rectPxBounds.right >= this.size.w - this.wComp)) { - this.updateMapToRect(); - } else { - return; - } - } - document.onselectstart = null; - this.rectDragStart = null; - } - }, - - /** - * @param {OpenLayers.Event} evt - */ - rectMouseDown: function (evt) { - if(!OpenLayers.Event.isLeftClick(evt)) return; - this.rectDragStart = evt.xy.clone(); - this.performedRectDrag = false; - OpenLayers.Event.stop(evt); - }, - - /** - * @param {OpenLayers.Event} evt - */ - rectMouseMove: function(evt) { - if(this.rectDragStart != null) { - var deltaX = this.rectDragStart.x - evt.xy.x; - var deltaY = this.rectDragStart.y - evt.xy.y; - var rectPxBounds = this.getRectPxBounds(); - var rectTop = rectPxBounds.top; - var rectLeft = rectPxBounds.left; - var rectHeight = Math.abs(rectPxBounds.getHeight()); - var rectWidth = rectPxBounds.getWidth(); - // don't allow dragging off of parent element - var newTop = Math.max(0, (rectTop - deltaY)); - newTop = Math.min(newTop, - this.ovmap.size.h - this.hComp - rectHeight); - var newLeft = Math.max(0, (rectLeft - deltaX)); - newLeft = Math.min(newLeft, - this.ovmap.size.w - this.wComp - rectWidth); - this.setRectPxBounds(new OpenLayers.Bounds(newLeft, - newTop + rectHeight, - newLeft + rectWidth, - newTop)); - this.rectDragStart = evt.xy.clone(); - this.performedRectDrag = true; - OpenLayers.Event.stop(evt); - } - }, - - /** - * @param {OpenLayers.Event} evt - */ - rectMouseUp: function(evt) { - if(!OpenLayers.Event.isLeftClick(evt)) return; - if(this.performedRectDrag) { - this.updateMapToRect(); - OpenLayers.Event.stop(evt); - } - document.onselectstart = null; - this.rectDragStart = null; - }, - - /** - * @param {OpenLayers.Event} evt - */ - rectDblClick: function(evt) { - this.performedRectDrag = false; - OpenLayers.Event.stop(evt); - this.updateOverview(); - }, - - /** - * @param {OpenLayers.Event} evt - */ - mapDivClick: function(evt) { - var pxBounds = this.getRectPxBounds(); - var pxCenter = pxBounds.getCenterPixel(); - var deltaX = evt.xy.x - pxCenter.x; - var deltaY = evt.xy.y - pxCenter.y; - var top = pxBounds.top; - var left = pxBounds.left; - var height = Math.abs(pxBounds.getHeight()); - var width = pxBounds.getWidth(); - var newTop = Math.max(0, (top + deltaY)); - newTop = Math.min(newTop, this.ovmap.size.h - height); - var newLeft = Math.max(0, (left + deltaX)); - newLeft = Math.min(newLeft, this.ovmap.size.w - width); - this.setRectPxBounds(new OpenLayers.Bounds(newLeft, - newTop + height, - newLeft + width, - newTop)); - this.updateMapToRect(); - OpenLayers.Event.stop(evt); - }, - - /** Set up the labels and divs for the control - * - * @param {OpenLayers.Event} e - */ - maximizeControl: function(e) { - this.element.style.display = ''; - this.showToggle(false); - if (e != null) { - OpenLayers.Event.stop(e); - } - }, - - /** Hide all the contents of the control, shrink the size, - * add the maximize icon - * - * @param {OpenLayers.Event} e - */ - minimizeControl: function(e) { - this.element.style.display = 'none'; - this.showToggle(true); - if (e != null) { - OpenLayers.Event.stop(e); - } - }, - - /** Hide/Show all LayerSwitcher controls depending on whether we are - * minimized or not - * - * @private - * - * @param {Boolean} minimize - */ - showToggle: function(minimize) { - this.maximizeDiv.style.display = minimize ? '' : 'none'; - this.minimizeDiv.style.display = minimize ? 'none' : ''; - }, - - /** - * Update the overview map after layers move. - */ - update: function() { - if(this.ovmap == null) { - this.createMap(); - } - - if(!this.isSuitableOverview()) { - this.updateOverview(); - } - - // update extent rectangle - this.updateRectToMap(); - }, - - /** - * Determines if the overview map is suitable given the extent and - * resolution of the main map. - */ - isSuitableOverview: function() { - var mapExtent = this.map.getExtent(); - var maxExtent = this.map.maxExtent; - var testExtent = new OpenLayers.Bounds( - Math.max(mapExtent.left, maxExtent.left), - Math.max(mapExtent.bottom, maxExtent.bottom), - Math.min(mapExtent.right, maxExtent.right), - Math.min(mapExtent.top, maxExtent.top)); - var resRatio = this.ovmap.getResolution() / this.map.getResolution(); - return ((resRatio > this.minRatio) && - (resRatio <= this.maxRatio) && - (this.ovmap.getExtent().containsBounds(testExtent))); - }, - - updateOverview: function() { - var mapRes = this.map.getResolution(); - var targetRes = this.ovmap.getResolution(); - var resRatio = targetRes / mapRes; - if(resRatio > this.maxRatio) { - // zoom in overview map - targetRes = this.minRatio * mapRes; - } else if(resRatio <= this.minRatio) { - // zoom out overview map - targetRes = this.maxRatio * mapRes; - } - this.ovmap.setCenter(this.map.center, - this.ovmap.getZoomForResolution(targetRes)); - this.updateRectToMap(); - }, - - createMap: function() { - // create the overview map - var options = OpenLayers.Util.extend( - {controls: [], maxResolution: 'auto'}, this.mapOptions); - this.ovmap = new OpenLayers.Map(this.mapDiv.id, options); - this.ovmap.addLayers(this.layers); - this.ovmap.zoomToMaxExtent(); - // check extent rectangle border width - this.wComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle, - 'border-left-width')) + - parseInt(OpenLayers.Element.getStyle(this.extentRectangle, - 'border-right-width')); - this.wComp = (this.wComp) ? this.wComp : 2; - this.hComp = parseInt(OpenLayers.Element.getStyle(this.extentRectangle, - 'border-top-width')) + - parseInt(OpenLayers.Element.getStyle(this.extentRectangle, - 'border-bottom-width')); - this.hComp = (this.hComp) ? this.hComp : 2; - }, - - /** - * Updates the extent rectangle position and size to match the map extent - */ - updateRectToMap: function() { - // The base layer for overview map needs to be in the same projection - // as the base layer for the main map. This should be made more robust. - if(this.map.units != 'degrees') { - if(this.ovmap.getProjection() && (this.map.getProjection() != this.ovmap.getProjection())) { - alert('The overview map only works when it is in the same projection as the main map'); - } - } - var pxBounds = this.getRectBoundsFromMapBounds(this.map.getExtent()); - if (pxBounds) { - this.setRectPxBounds(pxBounds); - } - }, - - /** - * Updates the map extent to match the extent rectangle position and size - */ - updateMapToRect: function() { - var pxBounds = this.getRectPxBounds(); - var lonLatBounds = this.getMapBoundsFromRectBounds(pxBounds); - this.map.setCenter(lonLatBounds.getCenterLonLat(), this.map.zoom); - }, - - /** - * Get extent rectangle pixel bounds - * @returns An OpenLayers.Bounds wich is the extent rectangle's pixel - * bounds (relative to the parent element) - */ - getRectPxBounds: function() { - var top = parseInt(this.extentRectangle.style.top); - var left = parseInt(this.extentRectangle.style.left); - var height = parseInt(this.extentRectangle.style.height); - var width = parseInt(this.extentRectangle.style.width); - return new OpenLayers.Bounds(left, top + height, left + width, top); - }, - - /** - * Set extent rectangle pixel bounds. - * @param {OpenLayers.Bounds} pxBounds - */ - setRectPxBounds: function(pxBounds) { - var top = Math.max(pxBounds.top, 0); - var left = Math.max(pxBounds.left, 0); - var bottom = Math.min(pxBounds.top + Math.abs(pxBounds.getHeight()), - this.ovmap.size.h - this.hComp); - var right = Math.min(pxBounds.left + pxBounds.getWidth(), - this.ovmap.size.w - this.wComp); - this.extentRectangle.style.top = parseInt(top) + 'px'; - this.extentRectangle.style.left = parseInt(left) + 'px'; - this.extentRectangle.style.height = parseInt(Math.max(bottom - top, 0))+ 'px'; - this.extentRectangle.style.width = parseInt(Math.max(right - left, 0)) + 'px'; - }, - - /** - * @param {OpenLayers.Bounds} lonLatBounds - * - * @returns An OpenLayers.Bounds which is the passed-in map lon/lat extent - * translated into pixel bounds for the overview map - * @type OpenLayers.Bounds - */ - getRectBoundsFromMapBounds: function(lonLatBounds) { - var leftBottomLonLat = new OpenLayers.LonLat(lonLatBounds.left, - lonLatBounds.bottom); - var rightTopLonLat = new OpenLayers.LonLat(lonLatBounds.right, - lonLatBounds.top); - var leftBottomPx = this.getOverviewPxFromLonLat(leftBottomLonLat); - var rightTopPx = this.getOverviewPxFromLonLat(rightTopLonLat); - var bounds = null; - if (leftBottomPx && rightTopPx) { - bounds = new OpenLayers.Bounds(leftBottomPx.x, leftBottomPx.y, - rightTopPx.x, rightTopPx.y); - } - return bounds; - }, - - /** - * @param {OpenLayers.Bounds} pxBounds - * - * @returns An OpenLayers.Bounds which is the passed-in overview rect bounds - * translated into lon/lat bounds for the overview map - * @type OpenLayers.Bounds - */ - getMapBoundsFromRectBounds: function(pxBounds) { - var leftBottomPx = new OpenLayers.Pixel(pxBounds.left, - pxBounds.bottom); - var rightTopPx = new OpenLayers.Pixel(pxBounds.right, - pxBounds.top); - var leftBottomLonLat = this.getLonLatFromOverviewPx(leftBottomPx); - var rightTopLonLat = this.getLonLatFromOverviewPx(rightTopPx); - return new OpenLayers.Bounds(leftBottomLonLat.lon, leftBottomLonLat.lat, - rightTopLonLat.lon, rightTopLonLat.lat); - }, - - /** - * @param {OpenLayers.Pixel} overviewMapPx - * - * @returns An OpenLayers.LonLat which is the passed-in overview map - * OpenLayers.Pixel, translated into lon/lat by the overview map - * @type OpenLayers.LonLat - */ - getLonLatFromOverviewPx: function(overviewMapPx) { - var size = this.ovmap.size; - var res = this.ovmap.getResolution(); - var center = this.ovmap.getExtent().getCenterLonLat(); - - var delta_x = overviewMapPx.x - (size.w / 2); - var delta_y = overviewMapPx.y - (size.h / 2); - - return new OpenLayers.LonLat(center.lon + delta_x * res , - center.lat - delta_y * res); - }, - - /** - * @param {OpenLayers.LonLat} lonlat - * - * @returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, - * translated into overview map pixels - * @type OpenLayers.Pixel - */ - getOverviewPxFromLonLat: function(lonlat) { - var res = this.ovmap.getResolution(); - var extent = this.ovmap.getExtent(); - var px = null; - if (extent) { - px = new OpenLayers.Pixel( - Math.round(1/res * (lonlat.lon - extent.left)), - Math.round(1/res * (extent.top - lonlat.lat))); - } - return px; - }, - - /** @final @type String */ - CLASS_NAME: 'OpenLayers.Control.OverviewMap' - -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/PanZoom.js b/pacotes/openlayers/lib/OpenLayers/Control/PanZoom.js deleted file mode 100644 index 5fcea52..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/PanZoom.js +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.PanZoom = OpenLayers.Class.create(); -OpenLayers.Control.PanZoom.X = 4; -OpenLayers.Control.PanZoom.Y = 4; -OpenLayers.Control.PanZoom.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - - /** @type int */ - slideFactor: 50, - - /** @type Array of Button Divs */ - buttons: null, - - /** @type OpenLayers.Pixel */ - position: null, - - /** - * @constructor - */ - initialize: function() { - this.position = new OpenLayers.Pixel(OpenLayers.Control.PanZoom.X, - OpenLayers.Control.PanZoom.Y); - OpenLayers.Control.prototype.initialize.apply(this, arguments); - }, - - /** - * - */ - destroy: function() { - OpenLayers.Control.prototype.destroy.apply(this, arguments); - while(this.buttons.length) { - var btn = this.buttons.shift(); - btn.map = null; - OpenLayers.Event.stopObservingElement(btn); - } - this.buttons = null; - this.position = null; - }, - - /** - * @param {OpenLayers.Pixel} px - * - * @returns A reference to the container div for the PanZoom control - * @type DOMElement - */ - draw: function(px) { - // initialize our internal div - OpenLayers.Control.prototype.draw.apply(this, arguments); - px = this.position; - - // place the controls - this.buttons = new Array(); - - var sz = new OpenLayers.Size(18,18); - var centered = new OpenLayers.Pixel(px.x+sz.w/2, px.y); - - this._addButton("panup", "north-mini.png", centered, sz); - px.y = centered.y+sz.h; - this._addButton("panleft", "west-mini.png", px, sz); - this._addButton("panright", "east-mini.png", px.add(sz.w, 0), sz); - this._addButton("pandown", "south-mini.png", - centered.add(0, sz.h*2), sz); - this._addButton("zoomin", "zoom-plus-mini.png", - centered.add(0, sz.h*3+5), sz); - this._addButton("zoomworld", "zoom-world-mini.png", - centered.add(0, sz.h*4+5), sz); - this._addButton("zoomout", "zoom-minus-mini.png", - centered.add(0, sz.h*5+5), sz); - return this.div; - }, - - /** - * @param {String} id - * @param {String} img - * @param {OpenLayers.Pixel} xy - * @param {OpenLayers.Size} sz - * - * @returns A Div (an alphaImageDiv, to be precise) that contains the - * image of the button, and has all the proper event handlers - * set. - * @type DOMElement - */ - _addButton:function(id, img, xy, sz) { - var imgLocation = OpenLayers.Util.getImagesLocation() + img; - var btn = OpenLayers.Util.createAlphaImageDiv( - "OpenLayers_Control_PanZoom_" + id, - xy, sz, imgLocation, "absolute"); - - //we want to add the outer div - this.div.appendChild(btn); - - OpenLayers.Event.observe(btn, "mousedown", - this.buttonDown.bindAsEventListener(btn)); - OpenLayers.Event.observe(btn, "mouseup", - this.doubleClick.bindAsEventListener(btn)); - OpenLayers.Event.observe(btn, "dblclick", - this.doubleClick.bindAsEventListener(btn)); - OpenLayers.Event.observe(btn, "click", - this.doubleClick.bindAsEventListener(btn)); - btn.action = id; - btn.map = this.map; - btn.slideFactor = this.slideFactor; - - //we want to remember/reference the outer div - this.buttons.push(btn); - return btn; - }, - - /** - * @param {Event} evt - * - * @type Boolean - */ - doubleClick: function (evt) { - OpenLayers.Event.stop(evt); - return false; - }, - - /** - * @param {Event} evt - */ - buttonDown: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - - switch (this.action) { - case "panup": - this.map.pan(0, -50); - break; - case "pandown": - this.map.pan(0, 50); - break; - case "panleft": - this.map.pan(-50, 0); - break; - case "panright": - this.map.pan(50, 0); - break; - case "zoomin": - this.map.zoomIn(); - break; - case "zoomout": - this.map.zoomOut(); - break; - case "zoomworld": - this.map.zoomToMaxExtent(); - break; - } - - OpenLayers.Event.stop(evt); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.PanZoom" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/PanZoomBar.js b/pacotes/openlayers/lib/OpenLayers/Control/PanZoomBar.js deleted file mode 100644 index 21422d0..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/PanZoomBar.js +++ /dev/null @@ -1,253 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Control/PanZoom.js - */ -OpenLayers.Control.PanZoomBar = OpenLayers.Class.create(); -OpenLayers.Control.PanZoomBar.prototype = - OpenLayers.Class.inherit( OpenLayers.Control.PanZoom, { - - /** @type int */ - zoomStopWidth: 18, - - /** @type int */ - zoomStopHeight: 11, - - /** @type DOMElement */ - slider: null, - - /** @type OpenLayers.Events */ - sliderEvents: null, - - /** @type DOMElement */ - zoomBarDiv: null, - - /** @type OpenLayers.Events */ - divEvents: null, - - initialize: function() { - OpenLayers.Control.PanZoom.prototype.initialize.apply(this, arguments); - }, - - /** - * - */ - destroy: function() { - - this.div.removeChild(this.slider); - this.slider = null; - - this.sliderEvents.destroy(); - this.sliderEvents = null; - - this.div.removeChild(this.zoombarDiv); - this.zoomBarDiv = null; - - this.divEvents.destroy(); - this.divEvents = null; - - this.map.events.unregister("zoomend", this, this.moveZoomBar); - this.map.events.unregister("changebaselayer", this, this.redraw) - - OpenLayers.Control.PanZoom.prototype.destroy.apply(this, arguments); - }, - - /** - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - OpenLayers.Control.PanZoom.prototype.setMap.apply(this, arguments); - this.map.events.register("changebaselayer", this, this.redraw); - }, - - /** clear the div and start over. - * - */ - redraw: function() { - if (this.div != null) { - this.div.innerHTML = ""; - } - this.draw(); - }, - - /** - * @param {OpenLayers.Pixel} px - */ - draw: function(px) { - // initialize our internal div - OpenLayers.Control.prototype.draw.apply(this, arguments); - px = this.position.clone(); - - // place the controls - this.buttons = new Array(); - - var sz = new OpenLayers.Size(18,18); - var centered = new OpenLayers.Pixel(px.x+sz.w/2, px.y); - - this._addButton("panup", "north-mini.png", centered, sz); - px.y = centered.y+sz.h; - this._addButton("panleft", "west-mini.png", px, sz); - this._addButton("panright", "east-mini.png", px.add(sz.w, 0), sz); - this._addButton("pandown", "south-mini.png", centered.add(0, sz.h*2), sz); - this._addButton("zoomin", "zoom-plus-mini.png", centered.add(0, sz.h*3+5), sz); - centered = this._addZoomBar(centered.add(0, sz.h*4 + 5)); - this._addButton("zoomout", "zoom-minus-mini.png", centered, sz); - return this.div; - }, - - /** - * @param {OpenLayers.Pixel} location where zoombar drawing is to start. - */ - _addZoomBar:function(centered) { - var imgLocation = OpenLayers.Util.getImagesLocation(); - - var id = "OpenLayers_Control_PanZoomBar_Slider" + this.map.id; - var zoomsToEnd = this.map.getNumZoomLevels() - 1 - this.map.getZoom(); - var slider = OpenLayers.Util.createAlphaImageDiv(id, - centered.add(-1, zoomsToEnd * this.zoomStopHeight), - new OpenLayers.Size(20,9), - imgLocation+"slider.png", - "absolute"); - this.slider = slider; - - this.sliderEvents = new OpenLayers.Events(this, slider, null, true); - this.sliderEvents.register("mousedown", this, this.zoomBarDown); - this.sliderEvents.register("mousemove", this, this.zoomBarDrag); - this.sliderEvents.register("mouseup", this, this.zoomBarUp); - this.sliderEvents.register("dblclick", this, this.doubleClick); - this.sliderEvents.register("click", this, this.doubleClick); - - sz = new OpenLayers.Size(); - sz.h = this.zoomStopHeight * this.map.getNumZoomLevels(); - sz.w = this.zoomStopWidth; - var div = null - - if (OpenLayers.Util.alphaHack()) { - var id = "OpenLayers_Control_PanZoomBar" + this.map.id; - div = OpenLayers.Util.createAlphaImageDiv(id, centered, - new OpenLayers.Size(sz.w, - this.zoomStopHeight), - imgLocation + "zoombar.png", - "absolute", null, "crop"); - div.style.height = sz.h; - } else { - div = OpenLayers.Util.createDiv( - 'OpenLayers_Control_PanZoomBar_Zoombar' + this.map.id, - centered, - sz, - imgLocation+"zoombar.png"); - } - - this.zoombarDiv = div; - - this.divEvents = new OpenLayers.Events(this, div, null, true); - this.divEvents.register("mousedown", this, this.divClick); - this.divEvents.register("mousemove", this, this.passEventToSlider); - this.divEvents.register("dblclick", this, this.doubleClick); - this.divEvents.register("click", this, this.doubleClick); - - this.div.appendChild(div); - - this.startTop = parseInt(div.style.top); - this.div.appendChild(slider); - - this.map.events.register("zoomend", this, this.moveZoomBar); - - centered = centered.add(0, - this.zoomStopHeight * this.map.getNumZoomLevels()); - return centered; - }, - /* - * @param evt - * This function is used to pass events that happen on the div, or the map, - * through to the slider, which then does its moving thing. - */ - passEventToSlider:function(evt) { - this.sliderEvents.handleBrowserEvent(evt); - }, - - /* - * divClick: Picks up on clicks directly on the zoombar div - * and sets the zoom level appropriately. - */ - divClick: function (evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - var y = evt.xy.y; - var top = OpenLayers.Util.pagePosition(evt.object)[1]; - var levels = Math.floor((y - top)/this.zoomStopHeight); - this.map.zoomTo((this.map.getNumZoomLevels() -1) - levels); - OpenLayers.Event.stop(evt); - }, - - /* - * @param evt - * event listener for clicks on the slider - */ - zoomBarDown:function(evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - this.map.events.register("mousemove", this, this.passEventToSlider); - this.map.events.register("mouseup", this, this.passEventToSlider); - this.mouseDragStart = evt.xy.clone(); - this.zoomStart = evt.xy.clone(); - this.div.style.cursor = "move"; - // reset the div offsets just in case the div moved - this.zoombarDiv.offsets = null; - OpenLayers.Event.stop(evt); - }, - - /* - * @param evt - * This is what happens when a click has occurred, and the client is dragging. - * Here we must ensure that the slider doesn't go beyond the bottom/top of the - * zoombar div, as well as moving the slider to its new visual location - */ - zoomBarDrag:function(evt) { - if (this.mouseDragStart != null) { - var deltaY = this.mouseDragStart.y - evt.xy.y - var offsets = OpenLayers.Util.pagePosition(this.zoombarDiv); - if ((evt.clientY - offsets[1]) > 0 && - (evt.clientY - offsets[1]) < parseInt(this.zoombarDiv.style.height) - 2) { - var newTop = parseInt(this.slider.style.top) - deltaY; - this.slider.style.top = newTop+"px"; - } - this.mouseDragStart = evt.xy.clone(); - OpenLayers.Event.stop(evt); - } - }, - - /* - * @param evt - * Perform cleanup when a mouseup event is received -- discover new zoom level - * and switch to it. - */ - zoomBarUp:function(evt) { - if (!OpenLayers.Event.isLeftClick(evt)) return; - if (this.zoomStart) { - this.div.style.cursor=""; - this.map.events.unregister("mouseup", this, this.passEventToSlider); - this.map.events.unregister("mousemove", this, this.passEventToSlider); - var deltaY = this.zoomStart.y - evt.xy.y - this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight)); - this.moveZoomBar(); - this.mouseDragStart = null; - OpenLayers.Event.stop(evt); - } - }, - - /* - * Change the location of the slider to match the current zoom level. - */ - moveZoomBar:function() { - var newTop = - ((this.map.getNumZoomLevels()-1) - this.map.getZoom()) * - this.zoomStopHeight + this.startTop + 1; - this.slider.style.top = newTop + "px"; - }, - - CLASS_NAME: "OpenLayers.Control.PanZoomBar" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/Panel.js b/pacotes/openlayers/lib/OpenLayers/Control/Panel.js deleted file mode 100644 index 2bdec1f..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/Panel.js +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.Panel = OpenLayers.Class.create(); -OpenLayers.Control.Panel.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - /** - * @type Array(OpenLayers.Control) - */ - controls: null, - - /** - * The control which is activated when the control is activated (turned - * on), which also happens at instantiation. - * @type OpenLayers.Control - */ - defaultControl: null, - - /** - * @constructor - * - * @param {DOMElement} element - * @param {String} base - */ - initialize: function(element) { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - this.controls = []; - }, - - destroy: function() { - OpenLayers.Control.prototype.destroy.apply(this, arguments); - for(var i = this.controls.length - 1 ; i >= 0; i--) { - OpenLayers.Event.stopObservingElement(this.controls[i].panel_div); - this.controls[i].panel_div = null; - } - }, - - activate: function() { - if (OpenLayers.Control.prototype.activate.apply(this, arguments)) { - for(var i = 0; i < this.controls.length; i++) { - if (this.controls[i] == this.defaultControl) { - this.controls[i].activate(); - } - } - this.redraw(); - return true; - } else { - return false; - } - }, - - deactivate: function() { - if (OpenLayers.Control.prototype.deactivate.apply(this, arguments)) { - for(var i = 0; i < this.controls.length; i++) { - this.controls[i].deactivate(); - } - this.redraw(); - return true; - } else { - return false; - } - }, - - /** - * @type DOMElement - */ - draw: function() { - OpenLayers.Control.prototype.draw.apply(this, arguments); - for (var i = 0; i < this.controls.length; i++) { - this.map.addControl(this.controls[i]); - this.controls[i].deactivate(); - } - this.activate(); - return this.div; - }, - - /** - * @private - */ - redraw: function() { - this.div.innerHTML = ""; - if (this.active) { - for (var i = 0; i < this.controls.length; i++) { - var element = this.controls[i].panel_div; - if (this.controls[i].active) { - element.className = this.controls[i].displayClass + "ItemActive"; - } else { - element.className = this.controls[i].displayClass + "ItemInactive"; - } - this.div.appendChild(element); - } - } - }, - - activateControl: function (control) { - if (!this.active) { return false; } - if (control.type == OpenLayers.Control.TYPE_BUTTON) { - control.trigger(); - return; - } - for (var i = 0; i < this.controls.length; i++) { - if (this.controls[i] == control) { - control.activate(); - } else { - this.controls[i].deactivate(); - } - } - this.redraw(); - }, - - /** - * To build a toolbar, you add a set of controls to it. addControls - * lets you add a single control or a list of controls to the - * Control Panel. - * @param OpenLayers.Control - */ - addControls: function(controls) { - if (!(controls instanceof Array)) { - controls = [controls]; - } - this.controls = this.controls.concat(controls); - - // Give each control a panel_div which will be used later. - // Access to this div is via the panel_div attribute of the - // control added to the panel. - // Also, stop mousedowns and clicks, but don't stop mouseup, - // since they need to pass through. - for (var i = 0; i < controls.length; i++) { - var element = document.createElement("div"); - var textNode = document.createTextNode(" "); - controls[i].panel_div = element; - OpenLayers.Event.observe(controls[i].panel_div, "click", - this.onClick.bind(this, controls[i])); - OpenLayers.Event.observe(controls[i].panel_div, "mousedown", - OpenLayers.Event.stop.bindAsEventListener()); - } - - if (this.map) { // map.addControl() has already been called on the panel - for (var i = 0; i < controls.length; i++) { - this.map.addControl(controls[i]); - controls[i].deactivate(); - } - this.redraw(); - } - }, - - onClick: function (ctrl, evt) { - OpenLayers.Event.stop(evt ? evt : window.event); - this.activateControl(ctrl); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.Panel" -}); - diff --git a/pacotes/openlayers/lib/OpenLayers/Control/Permalink.js b/pacotes/openlayers/lib/OpenLayers/Control/Permalink.js deleted file mode 100644 index d2a8f20..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/Permalink.js +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.Permalink = OpenLayers.Class.create(); -OpenLayers.Control.Permalink.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - - /** @type DOMElement */ - element: null, - - /** @type String */ - base: '', - - /** - * @constructor - * - * @param {DOMElement} element - * @param {String} base - */ - initialize: function(element, base) { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - this.element = OpenLayers.Util.getElement(element); - if (base) { - this.base = base; - } - }, - - /** - * - */ - destroy: function() { - if (this.element.parentNode == this.div) { - this.div.removeChild(this.element); - } - this.element = null; - - this.map.events.unregister('moveend', this, this.updateLink); - - OpenLayers.Control.prototype.destroy.apply(this, arguments); - }, - - /** Set the map property for the control. - * - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - OpenLayers.Control.prototype.setMap.apply(this, arguments); - - //make sure we have an arg parser attached - for(var i=0; i< this.map.controls.length; i++) { - var control = this.map.controls[i]; - if (control.CLASS_NAME == "OpenLayers.Control.ArgParser") { - break; - } - } - if (i == this.map.controls.length) { - this.map.addControl(new OpenLayers.Control.ArgParser()); - } - - }, - - /** - * @type DOMElement - */ - draw: function() { - OpenLayers.Control.prototype.draw.apply(this, arguments); - - if (!this.element) { - this.div.className = this.displayClass; - this.element = document.createElement("a"); - this.element.style.fontSize="smaller"; - this.element.innerHTML = "Permalink"; - this.element.href=""; - this.div.appendChild(this.element); - } - this.map.events.register('moveend', this, this.updateLink); - return this.div; - }, - - /** - * - */ - updateLink: function() { - var center = this.map.getCenter(); - var zoom = "zoom=" + this.map.getZoom(); - var lat = "lat=" + Math.round(center.lat*100000)/100000; - var lon = "lon=" + Math.round(center.lon*100000)/100000; - - var layers = "layers="; - for(var i=0; i< this.map.layers.length; i++) { - var layer = this.map.layers[i]; - - if (layer.isBaseLayer) { - layers += (layer == this.map.baseLayer) ? "B" : "0"; - } else { - layers += (layer.getVisibility()) ? "T" : "F"; - } - } - var href = this.base + "?" + lat + "&" + lon + "&" + zoom + - "&" + layers; - this.element.href = href; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.Permalink" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/Scale.js b/pacotes/openlayers/lib/OpenLayers/Control/Scale.js deleted file mode 100644 index 16fa87f..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/Scale.js +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.Scale = OpenLayers.Class.create(); -OpenLayers.Control.Scale.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - /** @type DOMElement */ - element: null, - - /** - * @constructor - * - * @param {DOMElement} element - * @param {String} base - */ - initialize: function(element) { - OpenLayers.Control.prototype.initialize.apply(this, arguments); - this.element = OpenLayers.Util.getElement(element); - }, - - /** - * @type DOMElement - */ - draw: function() { - OpenLayers.Control.prototype.draw.apply(this, arguments); - if (!this.element) { - this.element = document.createElement("div"); - this.div.className = this.displayClass; - this.element.style.fontSize="smaller"; - this.div.appendChild(this.element); - } - this.map.events.register( 'moveend', this, this.updateScale); - this.updateScale(); - return this.div; - }, - - /** - * - */ - updateScale: function() { - var scale = this.map.getScale(); - if (!scale) return; - - if (scale >= 9500 && scale <= 950000) { - scale = Math.round(scale / 1000) + "K"; - } else if (scale >= 950000) { - scale = Math.round(scale / 1000000) + "M"; - } else { - scale = Math.round(scale); - } - - this.element.innerHTML = "Scale = 1 : " + scale; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.Scale" -}); - diff --git a/pacotes/openlayers/lib/OpenLayers/Control/SelectFeature.js b/pacotes/openlayers/lib/OpenLayers/Control/SelectFeature.js deleted file mode 100644 index 3376cf9..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/SelectFeature.js +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * Draws features on a vector layer when active. - * - * @class - * @requires OpenLayers/Control.js - * @requires OpenLayers/Feature/Vector.js - */ -OpenLayers.Control.SelectFeature = OpenLayers.Class.create(); -OpenLayers.Control.SelectFeature.prototype = - OpenLayers.Class.inherit(OpenLayers.Control, { - - /** - * @type {Boolean} Allow selection of multiple geometries - */ - multiple: false, - - /** - * @type {Boolean} Select on mouse over and deselect on mouse out. If - * true, this ignores clicks and only listens to mouse moves. - */ - hover: false, - - /** - * @type {Function} Optional function to be called when a feature is selected. - * The function should expect to be called with a feature. - */ - onSelect: function() {}, - - /** - * @type {Function} Optional function to be called when a feature is unselected. - * The function should expect to be called with a feature. - */ - onUnselect: function() {}, - - /** - * @type {OpenLayers.Layer.Vector} - */ - layer: null, - - /** - * @type {Object} The functions that are sent to the handler for callback - */ - callbacks: null, - - /** - * @type {Object} Hash of styles - */ - selectStyle: OpenLayers.Feature.Vector.style['select'], - - /** - * @type {OpenLayers.Handler.Feature} - * @private - */ - handler: null, - - /** - * @param {OpenLayers.Layer.Vector} layer - * @param {OpenLayers.Handler} handler - * @param {Object} options - */ - initialize: function(layer, options) { - OpenLayers.Control.prototype.initialize.apply(this, [options]); - this.callbacks = OpenLayers.Util.extend({ - down: this.downFeature, - over: this.overFeature, - out: this.outFeature - }, this.callbacks); - this.layer = layer; - this.handler = new OpenLayers.Handler.Feature(this, layer, this.callbacks); - }, - - /** - * Called when the feature handler detects a mouse-down on a feature - * @param {OpenLayers.Vector.Feature} - */ - downFeature: function(feature) { - if(this.hover) { - return; - } - if (this.multiple) { - if(OpenLayers.Util.indexOf(this.layer.selectedFeatures, feature) > -1) { - this.unselect(feature); - } else { - this.select(feature); - } - } else { - if(OpenLayers.Util.indexOf(this.layer.selectedFeatures, feature) > -1) { - this.unselect(feature); - } else { - if (this.layer.selectedFeatures) { - for (var i = 0; i < this.layer.selectedFeatures.length; i++) { - this.unselect(this.layer.selectedFeatures[i]); - } - } - this.select(feature); - } - } - }, - - /** - * Called when the feature handler detects a mouse-over on a feature. - * Only responds if this.hover is true. - * @param {OpenLayers.Feature.Vector} - */ - overFeature: function(feature) { - if(!this.hover) { - return; - } - if(!(OpenLayers.Util.indexOf(this.layer.selectedFeatures, feature) > -1)) { - this.select(feature); - } - }, - - /** - * Called when the feature handler detects a mouse-out on a feature. - * Only responds if this.hover is true. - * @param {OpenLayers.Feature.Vector} - */ - outFeature: function(feature) { - if(!this.hover) { - return; - } - this.unselect(feature); - }, - - /** - * Add feature to the layer's selectedFeature array, render the feature as - * selected, and call the onSelect function. - * @param {OpenLayers.Feature.Vector} feature - */ - select: function(feature) { - // Store feature style for restoration later - if(feature.originalStyle == null) { - feature.originalStyle = feature.style; - } - this.layer.selectedFeatures.push(feature); - this.layer.drawFeature(feature, this.selectStyle); - this.onSelect(feature); - }, - - /** - * Remove feature from the layer's selectedFeature array, render the feature as - * normal, and call the onUnselect function. - * @param {OpenLayers.Feature.Vector} feature - */ - unselect: function(feature) { - // Store feature style for restoration later - if(feature.originalStyle == null) { - feature.originalStyle = feature.style; - } - this.layer.drawFeature(feature, feature.originalStyle); - OpenLayers.Util.removeItem(this.layer.selectedFeatures, feature); - this.onUnselect(feature); - }, - - /** Set the map property for the control. - * - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - this.handler.setMap(map); - OpenLayers.Control.prototype.setMap.apply(this, arguments); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.SelectFeature" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/ZoomBox.js b/pacotes/openlayers/lib/OpenLayers/Control/ZoomBox.js deleted file mode 100644 index 516fe83..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/ZoomBox.js +++ /dev/null @@ -1,42 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Control.js - * @requires OpenLayers/Handler/Box.js - */ -OpenLayers.Control.ZoomBox = OpenLayers.Class.create(); -OpenLayers.Control.ZoomBox.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - /** @type OpenLayers.Control.TYPE_* */ - type: OpenLayers.Control.TYPE_TOOL, - - /** - * - */ - draw: function() { - this.handler = new OpenLayers.Handler.Box( this, - {done: this.zoomBox}, {keyMask: this.keyMask} ); - }, - - zoomBox: function (position) { - if (position instanceof OpenLayers.Bounds) { - var minXY = this.map.getLonLatFromPixel( - new OpenLayers.Pixel(position.left, position.bottom)); - var maxXY = this.map.getLonLatFromPixel( - new OpenLayers.Pixel(position.right, position.top)); - var bounds = new OpenLayers.Bounds(minXY.lon, minXY.lat, - maxXY.lon, maxXY.lat); - this.map.zoomToExtent(bounds); - } else { // it's a pixel - this.map.setCenter(this.map.getLonLatFromPixel(position), - this.map.getZoom() + 1); - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.ZoomBox" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js b/pacotes/openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js deleted file mode 100644 index 4984348..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Control/ZoomToMaxExtent.js +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * Imlements a very simple button control. - * @requires OpenLayers/Control.js - */ -OpenLayers.Control.ZoomToMaxExtent = OpenLayers.Class.create(); -OpenLayers.Control.ZoomToMaxExtent.prototype = - OpenLayers.Class.inherit( OpenLayers.Control, { - /** @type OpenLayers.Control.TYPE_* */ - type: OpenLayers.Control.TYPE_BUTTON, - - trigger: function() { - if (this.map) { - this.map.zoomToMaxExtent(); - } - }, - /** @final @type String */ - CLASS_NAME: "OpenLayers.Control.ZoomToMaxExtent" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Events.js b/pacotes/openlayers/lib/OpenLayers/Events.js deleted file mode 100644 index 976040d..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Events.js +++ /dev/null @@ -1,561 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @requires OpenLayers/Util.js - * - * @class (Not really a class, but kind of) - * - */ -OpenLayers.Event = { - - /** A hashtable cache of the event observers. - * Keyed by element._eventCacheID - * - * @type Object - */ - observers: false, - - /** @final @type int */ - KEY_BACKSPACE: 8, - - /** @final @type int */ - KEY_TAB: 9, - - /** @final @type int */ - KEY_RETURN: 13, - - /** @final @type int */ - KEY_ESC: 27, - - /** @final @type int */ - KEY_LEFT: 37, - - /** @final @type int */ - KEY_UP: 38, - - /** @final @type int */ - KEY_RIGHT: 39, - - /** @final @type int */ - KEY_DOWN: 40, - - /** @final @type int */ - KEY_DELETE: 46, - - - /** - * @param {Event} event - * - * @returns The element that caused the alert - * @type DOMElement - */ - element: function(event) { - return event.target || event.srcElement; - }, - - /** - * @param {Event} event - * - * @returns Whether or not the event was the result of a left click - * @type boolean - */ - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - /** Stops an event from propagating. - * - * @param {Event} event - * @param {Boolean} allowDefault If true, we stop the event chain but - * still allow the default browser - * behaviour (text selection, radio-button - * clicking, etc) - * Default false - */ - stop: function(event, allowDefault) { - - if (!allowDefault) { - if (event.preventDefault) { - event.preventDefault(); - } else { - event.returnValue = false; - } - } - - if (event.stopPropagation) { - event.stopPropagation(); - } else { - event.cancelBubble = true; - } - }, - - /** - * @param {Event} event - * @param {String} tagName - * - * @returns The first node with the given tagName, starting from the node - * the event was triggered on and traversing the DOM upwards - * @type DOMElement - */ - findElement: function(event, tagName) { - var element = OpenLayers.Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - /** - * @param {DOMElement || String} elementParam - * @param {String} name - * @param {function} observer - * @param {Boolean} useCapture - * - */ - observe: function(elementParam, name, observer, useCapture) { - var element = OpenLayers.Util.getElement(elementParam); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.attachEvent)) { - name = 'keydown'; - } - - //if observers cache has not yet been created, create it - if (!this.observers) { - this.observers = new Object(); - } - - //if not already assigned, make a new unique cache ID - if (!element._eventCacheID) { - var idPrefix = "eventCacheID_"; - if (element.id) { - idPrefix = element.id + "_" + idPrefix; - } - element._eventCacheID = OpenLayers.Util.createUniqueID(idPrefix); - } - - var cacheID = element._eventCacheID; - - //if there is not yet a hash entry for this element, add one - if (!this.observers[cacheID]) { - this.observers[cacheID] = new Array(); - } - - //add a new observer to this element's list - this.observers[cacheID].push({ - 'element': element, - 'name': name, - 'observer': observer, - 'useCapture': useCapture - }); - - //add the actual browser event listener - if (element.addEventListener) { - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - element.attachEvent('on' + name, observer); - } - }, - - /** Given the id of an element to stop observing, cycle through the - * element's cached observers, calling stopObserving on each one, - * skipping those entries which can no longer be removed. - * - * @param {DOMElement || String} elementParam - */ - stopObservingElement: function(elementParam) { - var element = OpenLayers.Util.getElement(elementParam); - var cacheID = element._eventCacheID; - - this._removeElementObservers(OpenLayers.Event.observers[cacheID]); - }, - - /** - * @private - * - * @param {Array(Object)} elementObservers Array of (element, name, - * observer, usecapture) objects, - * taken directly from hashtable - */ - _removeElementObservers: function(elementObservers) { - if (elementObservers) { - for(var i = elementObservers.length-1; i >= 0; i--) { - var entry = elementObservers[i]; - var args = new Array(entry.element, - entry.name, - entry.observer, - entry.useCapture); - var removed = OpenLayers.Event.stopObserving.apply(this, args); - } - } - }, - - /** - * @param {DOMElement || String} elementParam - * @param {String} name - * @param {function} observer - * @param {Boolean} useCapture - * - * @returns Whether or not the event observer was removed - * @type Boolean - */ - stopObserving: function(elementParam, name, observer, useCapture) { - useCapture = useCapture || false; - - var element = OpenLayers.Util.getElement(elementParam); - var cacheID = element._eventCacheID; - - if (name == 'keypress') { - if ( navigator.appVersion.match(/Konqueror|Safari|KHTML/) || - element.detachEvent) { - name = 'keydown'; - } - } - - // find element's entry in this.observers cache and remove it - var foundEntry = false; - var elementObservers = OpenLayers.Event.observers[cacheID]; - if (elementObservers) { - - // find the specific event type in the element's list - var i=0; - while(!foundEntry && i < elementObservers.length) { - var cacheEntry = elementObservers[i]; - - if ((cacheEntry.name == name) && - (cacheEntry.observer == observer) && - (cacheEntry.useCapture == useCapture)) { - - elementObservers.splice(i, 1); - if (elementObservers.length == 0) { - delete OpenLayers.Event.observers[cacheID]; - } - foundEntry = true; - break; - } - i++; - } - } - - //actually remove the event listener from browser - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element && element.detachEvent) { - element.detachEvent('on' + name, observer); - } - return foundEntry; - }, - - /** Cycle through all the element entries in the events cache and call - * stopObservingElement on each. - */ - unloadCache: function() { - if (OpenLayers.Event.observers) { - for (var cacheID in OpenLayers.Event.observers) { - var elementObservers = OpenLayers.Event.observers[cacheID]; - OpenLayers.Event._removeElementObservers.apply(this, - [elementObservers]); - } - OpenLayers.Event.observers = false; - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Event" -}; - -/* prevent memory leaks in IE */ -OpenLayers.Event.observe(window, 'unload', OpenLayers.Event.unloadCache, false); - -if (window.Event) { - OpenLayers.Util.extend(window.Event, OpenLayers.Event); -} else { - var Event = OpenLayers.Event; -} - -/** - * @class - */ -OpenLayers.Events = OpenLayers.Class.create(); -OpenLayers.Events.prototype = { - - /** @final @type Array: supported events */ - BROWSER_EVENTS: [ - "mouseover", "mouseout", - "mousedown", "mouseup", "mousemove", - "click", "dblclick", - "resize", "focus", "blur" - ], - - /** Hashtable of Array(Function): events listener functions - * @type Object */ - listeners: null, - - /** @type Object: the code object issuing application events */ - object: null, - - /** @type DOMElement: the DOM element receiving browser events */ - element: null, - - /** @type Array: list of support application events */ - eventTypes: null, - - /** - * @type Function: bound event handler attached to elements - * @private - */ - eventHandler: null, - - /** @type Boolean */ - fallThrough: null, - - /** - * @constructor - * - * @param {OpenLayers.Map} object The js object to which this Events object - * is being added - * @param {DOMElement} element A dom element to respond to browser events - * @param {Array} eventTypes Array of custom application events - * @param {Boolean} fallThrough Allow events to fall through after these - * have been handled? - */ - initialize: function (object, element, eventTypes, fallThrough) { - this.object = object; - this.element = element; - this.eventTypes = eventTypes; - this.fallThrough = fallThrough; - this.listeners = new Object(); - - // keep a bound copy of handleBrowserEvent() so that we can - // pass the same function to both Event.observe() and .stopObserving() - this.eventHandler = this.handleBrowserEvent.bindAsEventListener(this); - - // if eventTypes is specified, create a listeners list for each - // custom application event. - if (this.eventTypes != null) { - for (var i = 0; i < this.eventTypes.length; i++) { - this.listeners[ this.eventTypes[i] ] = new Array(); - } - } - - // if a dom element is specified, add a listeners list - // for browser events on the element and register them - if (this.element != null) { - this.attachToElement(element); - } - }, - - /** - * - */ - destroy: function () { - if (this.element) { - OpenLayers.Event.stopObservingElement(this.element); - } - this.element = null; - - this.listeners = null; - this.object = null; - this.eventTypes = null; - this.fallThrough = null; - this.eventHandler = null; - }, - - /** - * @param {HTMLDOMElement} element a DOM element to attach browser events to - */ - attachToElement: function (element) { - for (var i = 0; i < this.BROWSER_EVENTS.length; i++) { - var eventType = this.BROWSER_EVENTS[i]; - - // every browser event has a corresponding application event - // (whether it's listened for or not). - if (this.listeners[eventType] == null) { - this.listeners[eventType] = new Array(); - } - - // use Prototype to register the event cross-browser - OpenLayers.Event.observe(element, eventType, this.eventHandler); - } - // disable dragstart in IE so that mousedown/move/up works normally - OpenLayers.Event.observe(element, "dragstart", OpenLayers.Event.stop); - }, - - /** - * @param {String} type Name of the event to register - * @param {Object} obj The object to bind the context to for the callback#. - * If no object is specified, default is the Events's - * 'object' property. - * @param {Function} func The callback function. If no callback is - * specified, this function does nothing. - * - * #When the event is triggered, the 'func' function will be called, in the - * context of 'obj'. Imagine we were to register an event, specifying an - * OpenLayers.Bounds Object as 'obj'. When the event is triggered, the - * context in the callback function will be our Bounds object. This means - * that within our callback function, we can access the properties and - * methods of the Bounds object through the "this" variable. So our - * callback could execute something like: - * - * leftStr = "Left: " + this.left; - * - * or - * - * centerStr = "Center: " + this.getCenterLonLat(); - * - */ - register: function (type, obj, func) { - - if (func != null) { - if (obj == null) { - obj = this.object; - } - var listeners = this.listeners[type]; - if (listeners != null) { - listeners.push( {obj: obj, func: func} ); - } - } - }, - - /** - * TODO: get rid of this in 3.0 - Decide whether listeners should be - * called in the order they were registered or in reverse order. - * - * @param {String} type Name of the event to register - * @param {Object} obj The object to bind the context to for the callback#. - * If no object is specified, default is the Events's - * 'object' property. - * @param {Function} func The callback function. If no callback is - * specified, this function does nothing. - */ - registerPriority: function (type, obj, func) { - - if (func != null) { - if (obj == null) { - obj = this.object; - } - var listeners = this.listeners[type]; - if (listeners != null) { - listeners.unshift( {obj: obj, func: func} ); - } - } - }, - - /** - * @param {String} type - * @param {Object} obj If none specified, defaults to this.object - * @param {Function} func - */ - unregister: function (type, obj, func) { - if (obj == null) { - obj = this.object; - } - var listeners = this.listeners[type]; - if (listeners != null) { - for (var i = 0; i < listeners.length; i++) { - if (listeners[i].obj == obj && listeners[i].func == func) { - listeners.splice(i, 1); - break; - } - } - } - }, - - /** Remove all listeners for a given event type. If type is not registered, - * does nothing. - * - * @param {String} type - */ - remove: function(type) { - if (this.listeners[type] != null) { - this.listeners[type] = new Array(); - } - }, - - /** Trigger a specified registered event - * - * @param {String} type - * @param {Event} evt - */ - triggerEvent: function (type, evt) { - - // prep evt object with object & div references - if (evt == null) { - evt = new Object(); - } - evt.object = this.object; - evt.element = this.element; - - // execute all callbacks registered for specified type - // get a clone of the listeners array to - // allow for splicing during callbacks - var listeners = (this.listeners[type]) ? - this.listeners[type].slice() : null; - if ((listeners != null) && (listeners.length > 0)) { - for (var i = 0; i < listeners.length; i++) { - var callback = listeners[i]; - var continueChain; - if (callback.obj != null) { - // use the 'call' method to bind the context to callback.obj - continueChain = callback.func.call(callback.obj, evt); - } else { - continueChain = callback.func(evt); - } - - if ((continueChain != null) && (continueChain == false)) { - // if callback returns false, execute no more callbacks. - break; - } - } - // don't fall through to other DOM elements - if (!this.fallThrough) { - OpenLayers.Event.stop(evt, true); - } - } - }, - - /** Basically just a wrapper to the triggerEvent() function, but takes - * care to set a property 'xy' on the event with the current mouse - * position. - * - * @private - * - * @param {Event} evt - */ - handleBrowserEvent: function (evt) { - evt.xy = this.getMousePosition(evt); - this.triggerEvent(evt.type, evt) - }, - - /** - * @private - * - * @param {Event} evt - * - * @returns The current xy coordinate of the mouse, adjusted for offsets - * @type OpenLayers.Pixel - */ - getMousePosition: function (evt) { - if (!this.element.offsets) { - this.element.offsets = OpenLayers.Util.pagePosition(this.element); - this.element.offsets[0] += (document.documentElement.scrollLeft - || document.body.scrollLeft); - this.element.offsets[1] += (document.documentElement.scrollTop - || document.body.scrollTop); - } - return new OpenLayers.Pixel( - (evt.clientX + (document.documentElement.scrollLeft - || document.body.scrollLeft)) - this.element.offsets[0], - (evt.clientY + (document.documentElement.scrollTop - || document.body.scrollTop)) - this.element.offsets[1] - ); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Events" -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Feature.js b/pacotes/openlayers/lib/OpenLayers/Feature.js deleted file mode 100644 index 38bf7f2..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Feature.js +++ /dev/null @@ -1,162 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Util.js - * @requires OpenLayers/Marker.js - */ -OpenLayers.Feature = OpenLayers.Class.create(); -OpenLayers.Feature.prototype= { - - /** @type OpenLayers.Events */ - events:null, - - /** @type OpenLayers.Layer */ - layer: null, - - /** @type String */ - id: null, - - /** @type OpenLayers.LonLat */ - lonlat:null, - - /** @type Object */ - data:null, - - /** @type OpenLayers.Marker */ - marker: null, - - /** @type OpenLayers.Popup */ - popup: null, - - /** - * @constructor - * - * @param {OpenLayers.Layer} layer - * @param {OpenLayers.LonLat} lonlat - * @param {Object} data - */ - initialize: function(layer, lonlat, data) { - this.layer = layer; - this.lonlat = lonlat; - this.data = (data != null) ? data : new Object(); - this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); - }, - - /** - * - */ - destroy: function() { - - //remove the popup from the map - if ((this.layer != null) && (this.layer.map != null)) { - if (this.popup != null) { - this.layer.map.removePopup(this.popup); - } - } - - if (this.events) { - this.events.destroy(); - } - this.events = null; - - this.layer = null; - this.id = null; - this.lonlat = null; - this.data = null; - if (this.marker != null) { - this.destroyMarker(this.marker); - this.marker = null; - } - if (this.popup != null) { - this.destroyPopup(this.popup); - this.popup = null; - } - }, - - /** - * @returns Whether or not the feature is currently visible on screen - * (based on its 'lonlat' property) - * @type Boolean - */ - onScreen:function() { - - var onScreen = false; - if ((this.layer != null) && (this.layer.map != null)) { - var screenBounds = this.layer.map.getExtent(); - onScreen = screenBounds.containsLonLat(this.lonlat); - } - return onScreen; - }, - - - /** - * @returns A Marker Object created from the 'lonlat' and 'icon' properties - * set in this.data. If no 'lonlat' is set, returns null. If no - * 'icon' is set, OpenLayers.Marker() will load the default image. - * - * Note: this.marker is set to return value - * - * @type OpenLayers.Marker - */ - createMarker: function() { - - var marker = null; - - if (this.lonlat != null) { - this.marker = new OpenLayers.Marker(this.lonlat, this.data.icon); - } - return this.marker; - }, - - /** If user overrides the createMarker() function, s/he should be able - * to also specify an alternative function for destroying it - */ - destroyMarker: function() { - this.marker.destroy(); - }, - - /** - * @param {Boolean} closeBox create popup with closebox or not - * @returns A Popup Object created from the 'lonlat', 'popupSize', - * and 'popupContentHTML' properties set in this.data. It uses - * this.marker.icon as default anchor. - * - * If no 'lonlat' is set, returns null. - * If no this.marker has been created, no anchor is sent. - * - * Note: this.popup is set to return value - * - * @type OpenLayers.Popup.AnchoredBubble - */ - createPopup: function(closeBox) { - - if (this.lonlat != null) { - - var id = this.id + "_popup"; - var anchor = (this.marker) ? this.marker.icon : null; - - this.popup = new OpenLayers.Popup.AnchoredBubble(id, - this.lonlat, - this.data.popupSize, - this.data.popupContentHTML, - anchor, closeBox); - } - return this.popup; - }, - - - /** As with the marker, if user overrides the createPopup() function, s/he - * should also be able to override the destruction - */ - destroyPopup: function() { - this.popup.destroy() - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Feature" -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Feature/Vector.js b/pacotes/openlayers/lib/OpenLayers/Feature/Vector.js deleted file mode 100644 index 8e2bc93..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Feature/Vector.js +++ /dev/null @@ -1,250 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -// TRASH THIS -OpenLayers.State = { - /** states */ - UNKNOWN: 'Unknown', - INSERT: 'Insert', - UPDATE: 'Update', - DELETE: 'Delete' -} - -/** - * @class - * - * @requires OpenLayers/Feature.js - * @requires OpenLayers/Util.js - */ -OpenLayers.Feature.Vector = OpenLayers.Class.create(); -OpenLayers.Feature.Vector.prototype = - OpenLayers.Class.inherit( OpenLayers.Feature, { - - /** @type String */ - fid: null, - - /** @type OpenLayers.Geometry */ - geometry:null, - - /** @type Object */ - attributes: null, - - /** @type String */ - state: null, - - /** @type Object */ - style: null, - - /** - * Create a vector feature. - * @constructor - * - * @param {OpenLayers.Geometry} geometry - * @param {Object} data - */ - initialize: function(geometry, data, style) { - OpenLayers.Feature.prototype.initialize.apply(this, [null, null, data]); - this.lonlat = null; - this.geometry = geometry; - this.state = null; - this.attributes = new Object(); - if (data) { - this.attributes = OpenLayers.Util.extend(this.attributes, data); - } - this.style = style ? style : null; - }, - - /** - * - */ - destroy: function() { - if (this.layer) { - this.layer.removeFeatures(this); - this.layer = null; - } - - this.geometry = null; - OpenLayers.Feature.prototype.destroy.apply(this, arguments); - }, - - /** - * @returns An exact clone of this OpenLayers.Feature - * @type OpenLayers.Feature - */ - clone: function (obj) { - if (obj == null) { - obj = new OpenLayers.Feature(null, this.geometry.clone(), this.data); - } - - // catch any randomly tagged-on properties - OpenLayers.Util.applyDefaults(obj, this); - - return obj; - }, - - /** - * HACK - we need to rewrite this for non-point geometry - * @returns null - we need to rewrite this for non-point geometry - * @type Boolean - */ - onScreen:function() { - return null; - }, - - /** - * - * HACK - we need to decide if all vector features should be able to - * create markers - * - * @returns null - * - * @type OpenLayers.Marker - */ - createMarker: function() { - return null; - }, - - /** - * HACK - we need to decide if all vector features should be able to - * delete markers - * - * If user overrides the createMarker() function, s/he should be able - * to also specify an alternative function for destroying it - */ - destroyMarker: function() { - // pass - }, - - /** - * HACK - we need to decide if all vector features should be able to - * create popups - * - * @returns null - */ - createPopup: function() { - return null; - }, - - /** - * @param {OpenLayers.LonLat} lonlat - * @param {float} toleranceLon Optional tolerance in Geometric Coords - * @param {float} toleranceLat Optional tolerance in Geographic Coords - * - * @returns Whether or not the feature is at the specified location - * @type Boolean - */ - atPoint: function(lonlat, toleranceLon, toleranceLat) { - var atPoint = false; - if(this.geometry) { - atPoint = this.geometry.atPoint(lonlat, toleranceLon, - toleranceLat); - } - return atPoint; - }, - - /** - * - * HACK - we need to decide if all vector features should be able to - * delete popups - */ - destroyPopup: function() { - // pass - }, - - /** - * Sets the new state - * @param {String} state - */ - toState: function(state) { - if (state == OpenLayers.State.UPDATE) { - switch (this.state) { - case OpenLayers.State.UNKNOWN: - case OpenLayers.State.DELETE: - this.state = state; - break; - case OpenLayers.State.UPDATE: - case OpenLayers.State.INSERT: - break; - } - } else if (state == OpenLayers.State.INSERT) { - switch (this.state) { - case OpenLayers.State.UNKNOWN: - break; - default: - this.state = state; - break; - } - } else if (state == OpenLayers.State.DELETE) { - switch (this.state) { - case OpenLayers.State.INSERT: - // the feature should be destroyed - break; - case OpenLayers.State.DELETE: - break; - case OpenLayers.State.UNKNOWN: - case OpenLayers.State.UPDATE: - this.state = state; - break; - } - } else if (state == OpenLayers.State.UNKNOWN) { - this.state = state; - } - }, - - CLASS_NAME: "OpenLayers.Feature.Vector" -}); - - -// styles for feature rendering -OpenLayers.Feature.Vector.style = { - 'default': { - fillColor: "#ee9900", - fillOpacity: 0.4, - hoverFillColor: "white", - hoverFillOpacity: 0.8, - strokeColor: "#ee9900", - strokeOpacity: 1, - strokeWidth: 1, - hoverStrokeColor: "red", - hoverStrokeOpacity: 1, - hoverStrokeWidth: 0.2, - pointRadius: 6, - hoverPointRadius: 1, - hoverPointUnit: "%", - pointerEvents: "visiblePainted" - }, - 'select': { - fillColor: "blue", - fillOpacity: 0.4, - hoverFillColor: "white", - hoverFillOpacity: 0.8, - strokeColor: "blue", - strokeOpacity: 1, - strokeWidth: 2, - hoverStrokeColor: "red", - hoverStrokeOpacity: 1, - hoverStrokeWidth: 0.2, - pointRadius: 6, - hoverPointRadius: 1, - hoverPointUnit: "%", - pointerEvents: "visiblePainted", - cursor: "pointer" - }, - 'temporary': { - fillColor: "yellow", - fillOpacity: 0.2, - hoverFillColor: "white", - hoverFillOpacity: 0.8, - strokeColor: "yellow", - strokeOpacity: 1, - strokeWidth: 4, - hoverStrokeColor: "red", - hoverStrokeOpacity: 1, - hoverStrokeWidth: 0.2, - pointRadius: 6, - hoverPointRadius: 1, - hoverPointUnit: "%", - pointerEvents: "visiblePainted" - } -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Feature/WFS.js b/pacotes/openlayers/lib/OpenLayers/Feature/WFS.js deleted file mode 100644 index 58acfc3..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Feature/WFS.js +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Feature.js - */ -OpenLayers.Feature.WFS = OpenLayers.Class.create(); -OpenLayers.Feature.WFS.prototype = - OpenLayers.Class.inherit( OpenLayers.Feature, { - - /** - * @constructor - * - * @param {OpenLayers.Layer} layer - * @param {XMLNode} xmlNode - */ - initialize: function(layer, xmlNode) { - var newArguments = arguments; - var data = this.processXMLNode(xmlNode); - newArguments = new Array(layer, data.lonlat, data) - OpenLayers.Feature.prototype.initialize.apply(this, newArguments); - this.createMarker(); - this.layer.addMarker(this.marker); - }, - - destroy: function() { - if (this.marker != null) { - this.layer.removeMarker(this.marker); - } - OpenLayers.Feature.prototype.destroy.apply(this, arguments); - }, - - /** - * @param {XMLNode} xmlNode - * - * @returns Data Object with 'id', 'lonlat', and private properties set - * @type Object - */ - processXMLNode: function(xmlNode) { - //this should be overridden by subclasses - // must return an Object with 'id' and 'lonlat' values set - var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, "http://www.opengis.net/gml", "gml", "Point"); - var text = OpenLayers.Util.getXmlNodeValue(OpenLayers.Ajax.getElementsByTagNameNS(point[0], "http://www.opengis.net/gml","gml", "coordinates")[0]); - var floats = text.split(","); - return {lonlat: new OpenLayers.LonLat(parseFloat(floats[0]), - parseFloat(floats[1])), - id: null}; - - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Feature.WFS" -}); - - - - - diff --git a/pacotes/openlayers/lib/OpenLayers/Format.js b/pacotes/openlayers/lib/OpenLayers/Format.js deleted file mode 100644 index fd55265..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Format.js +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Base class for format reading/writing. - * @requires OpenLayers/Util.js - */ -OpenLayers.Format = OpenLayers.Class.create(); -OpenLayers.Format.prototype = { - - initialize: function(options) { - OpenLayers.Util.extend(this, options); - }, - - /** - * Read data from a string, and return a list of features. - * - * @param {string} data data to read/parse. - */ - read: function(data) { - alert("Read not implemented."); - }, - - /** - * Accept Feature Collection, and return a string. - * - * @param {Array} List of features to serialize into a string. - */ - write: function(features) { - alert("Write not implemented."); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Format" - -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Format/GML.js b/pacotes/openlayers/lib/OpenLayers/Format/GML.js deleted file mode 100644 index 4ebe1cc..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Format/GML.js +++ /dev/null @@ -1,441 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Read/WRite GML. - * @requires OpenLayers/Format.js - * @requires OpenLayers/Feature/Vector.js - * @requires OpenLayers/Ajax.js - * @requires OpenLayers/Geometry.js - */ -OpenLayers.Format.GML = OpenLayers.Class.create(); -OpenLayers.Format.GML.prototype = - OpenLayers.Class.inherit( OpenLayers.Format, { - - featureNS: "http://mapserver.gis.umn.edu/mapserver", - - featureName: "featureMember", - - layerName: "features", - - geometryName: "geometry", - - collectionName: "FeatureCollection", - - gmlns: "http://www.opengis.net/gml", - - - /** - * Extract attributes from GML. Most of the time, - * this is a significant time usage, due to the need - * to recursively descend the XML to search for attributes. - * - * @type Boolean */ - extractAttributes: true, - - /** - * Read data from a string, and return a list of features. - * - * @param {string|XMLNode} data data to read/parse. - */ - read: function(data) { - if (typeof data == "string") { - data = OpenLayers.parseXMLString(data); - } - var featureNodes = OpenLayers.Ajax.getElementsByTagNameNS(data, this.gmlns, "gml", this.featureName); - if (featureNodes.length == 0) { return []; } - - // Determine dimension of the FeatureCollection. Ie, dim=2 means (x,y) coords - // dim=3 means (x,y,z) coords - // GML3 can have 2 or 3 dimensions. GML2 only 2. - var dim; - var coordNodes = OpenLayers.Ajax.getElementsByTagNameNS(featureNodes[0], this.gmlns, "gml", "posList"); - if (coordNodes.length == 0) { - coordNodes = OpenLayers.Ajax.getElementsByTagNameNS(featureNodes[0], this.gmlns, "gml", "pos"); - } - if (coordNodes.length > 0) { - dim = coordNodes[0].getAttribute("srsDimension"); - } - this.dim = (dim == "3" || dim == 3) ? 3 : 2; - - var features = []; - - // Process all the featureMembers - for (var i = 0; i < featureNodes.length; i++) { - var feature = this.parseFeature(featureNodes[i]); - - if (feature) { - features.push(feature); - } - } - return features; - }, - - /** - * This function is the core of the GML parsing code in OpenLayers. - * It creates the geometries that are then attached to the returned - * feature, and calls parseAttributes() to get attribute data out. - * @param DOMElement xmlNode - */ - parseFeature: function(xmlNode) { - var geom; - var p; // [points,bounds] - - var feature = new OpenLayers.Feature.Vector(); - - // match MultiPolygon - if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "MultiPolygon").length != 0) { - var multipolygon = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "MultiPolygon")[0]; - feature.fid = multipolygon.parentNode.parentNode.getAttribute('fid'); - - geom = new OpenLayers.Geometry.MultiPolygon(); - var polygons = OpenLayers.Ajax.getElementsByTagNameNS(multipolygon, - this.gmlns, "gml", "Polygon"); - for (var i = 0; i < polygons.length; i++) { - polygon = this.parsePolygonNode(polygons[i],geom); - geom.addComponents(polygon); - } - } - // match MultiLineString - else if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "MultiLineString").length != 0) { - var multilinestring = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "MultiLineString")[0]; - feature.fid = multilinestring.parentNode.parentNode.getAttribute('fid'); - - geom = new OpenLayers.Geometry.MultiLineString(); - var lineStrings = OpenLayers.Ajax.getElementsByTagNameNS(multilinestring, this.gmlns, "gml", "LineString"); - - for (var i = 0; i < lineStrings.length; i++) { - p = this.parseCoords(lineStrings[i]); - if(p.points){ - var lineString = new OpenLayers.Geometry.LineString(p.points); - geom.addComponents(lineString); - // TBD Bounds only set for one of multiple geometries - } - } - } - // match MultiPoint - else if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "MultiPoint").length != 0) { - var multiPoint = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "MultiPoint")[0]; - feature.fid = multiPoint.parentNode.parentNode.getAttribute('fid'); - - geom = new OpenLayers.Geometry.MultiPoint(); - - var points = OpenLayers.Ajax.getElementsByTagNameNS(multiPoint, this.gmlns, "gml", "Point"); - - for (var i = 0; i < points.length; i++) { - p = this.parseCoords(points[i]); - geom.addComponents(p.points[0]); - // TBD Bounds only set for one of multiple geometries - } - } - // match Polygon - else if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "Polygon").length != 0) { - var polygon = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "Polygon")[0]; - feature.fid = polygon.parentNode.parentNode.getAttribute('fid'); - - geom = this.parsePolygonNode(polygon); - } - // match LineString - else if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "LineString").length != 0) { - var lineString = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "LineString")[0]; - feature.fid = lineString.parentNode.parentNode.getAttribute('fid'); - - p = this.parseCoords(lineString); - if (p.points) { - geom = new OpenLayers.Geometry.LineString(p.points); - // TBD Bounds only set for one of multiple geometries - } - } - // match Point - else if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "Point").length != 0) { - var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.gmlns, "gml", "Point")[0]; - feature.fid = point.parentNode.parentNode.getAttribute('fid'); - - p = this.parseCoords(point); - if (p.points) { - geom = p.points[0]; - // TBD Bounds only set for one of multiple geometries - } - } - - feature.geometry = geom; - if (this.extractAttributes) { - feature.attributes = this.parseAttributes(xmlNode); - } - - return feature; - }, - - /** - * recursive function parse the attributes of a GML node. - * Searches for any child nodes which aren't geometries, - * and gets their value. - * @param DOMElement xmlNode - */ - parseAttributes: function(xmlNode) { - var nodes = xmlNode.childNodes; - var attributes = {}; - for(var i = 0; i < nodes.length; i++) { - var name = nodes[i].nodeName; - var value = OpenLayers.Util.getXmlNodeValue(nodes[i]); - // Ignore Geometry attributes - // match ".//gml:pos|.//gml:posList|.//gml:coordinates" - if((name.search(":pos")!=-1) - ||(name.search(":posList")!=-1) - ||(name.search(":coordinates")!=-1)){ - continue; - } - - // Check for a leaf node - if((nodes[i].childNodes.length == 1 && nodes[i].childNodes[0].nodeName == "#text") - || (nodes[i].childNodes.length == 0 && nodes[i].nodeName!="#text")) { - attributes[name] = value; - } - OpenLayers.Util.extend(attributes, this.parseAttributes(nodes[i])) - } - return attributes; - }, - - /** - * - * @param {XMLNode} xmlNode - * - * @return {OpenLayers.Geometry.Polygon} polygon geometry - */ - parsePolygonNode: function(polygonNode) { - var linearRings = OpenLayers.Ajax.getElementsByTagNameNS(polygonNode, - this.gmlns, "gml", "LinearRing"); - - var rings = []; - var p; - var polyBounds; - for (var i = 0; i < linearRings.length; i++) { - p = this.parseCoords(linearRings[i]); - ring1 = new OpenLayers.Geometry.LinearRing(p.points); - rings.push(ring1); - } - - var poly = new OpenLayers.Geometry.Polygon(rings); - return poly; - }, - - /** - * Extract Geographic coordinates from an XML node. - * @private - * @param {XMLNode} xmlNode - * - * @return an array of OpenLayers.Geometry.Point points. - * @type Array - */ - parseCoords: function(xmlNode) { - var x, y, left, bottom, right, top, bounds; - var p = []; // return value = [points,bounds] - - if (xmlNode) { - p.points = []; - - // match ".//gml:pos|.//gml:posList|.//gml:coordinates" - // Note: GML2 coordinates are of the form:x y,x y,x y - // GML2 can also be of the form 12 - // GML3 posList is of the form:x y x y. OR x y z x y z. - - // GML3 Line or Polygon - var coordNodes = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "posList"); - - // GML3 Point - if (coordNodes.length == 0) { - coordNodes = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "pos"); - } - - // GML2 - if (coordNodes.length == 0) { - coordNodes = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.gmlns, "gml", "coordinates"); - } - - // TBD: Need to handle an array of coordNodes not just coordNodes[0] - - var coordString = OpenLayers.Util.getXmlNodeValue(coordNodes[0]); - - // Extract an array of Numbers from CoordString - var nums = (coordString) ? coordString.split(/[, \n\t]+/) : []; - - // Remove elements caused by leading and trailing white space - while (nums[0] == "") - nums.shift(); - - while (nums[nums.length-1] == "") - nums.pop(); - - for(i = 0; i < nums.length; i = i + this.dim) { - x = parseFloat(nums[i]); - y = parseFloat(nums[i+1]); - p.points.push(new OpenLayers.Geometry.Point(x, y)); - } - } - return p; - }, - - /** - * Accept Feature Collection, and return a string. - * - * @param {Array} List of features to serialize into a string. - */ - write: function(features) { - var featureCollection = document.createElementNS("http://www.opengis.net/wfs", "wfs:" + this.collectionName); - for (var i=0; i < features.length; i++) { - featureCollection.appendChild(this.createFeatureXML(features[i])); - } - return featureCollection; - }, - - /** - * Accept an OpenLayers.Feature.Vector, and build a geometry for it. - * - * @param OpenLayers.Feature.Vector feature - * @returns DOMElement - */ - createFeatureXML: function(feature) { - var geometryNode = this.buildGeometryNode(feature.geometry); - var geomContainer = document.createElementNS(this.featureNS, "feature:"+this.geometryName); - geomContainer.appendChild(geometryNode); - var featureNode = document.createElementNS(this.gmlns, "gml:" + this.featureName); - var featureContainer = document.createElementNS(this.featureNS, "feature:"+this.layerName); - featureContainer.appendChild(geomContainer); - for(var attr in feature.attributes) { - var attrText = document.createTextNode(feature.attributes[attr]); - var nodename = attr; - if (attr.search(":") != -1) { - nodename = attr.split(":")[1]; - } - var attrContainer = document.createElementNS(this.featureNS, "feature:"+nodename); - attrContainer.appendChild(attrText); - featureContainer.appendChild(attrContainer); - } - featureNode.appendChild(featureContainer); - return featureNode; - }, - - /** - * builds a GML file with a given geometry - * - * @param {OpenLayers.Geometry} geometry - */ - buildGeometryNode: function(geometry) { - // TBD test if geoserver can be given a Multi-geometry for a simple-geometry data store - // ie if multipolygon can be sent for a polygon feature type - var gml = ""; - // match MultiPolygon or Polygon - if (geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPolygon" - || geometry.CLASS_NAME == "OpenLayers.Geometry.Polygon") { - gml = document.createElementNS(this.gmlns, 'gml:MultiPolygon'); - - // TBD retrieve the srs from layer - // srsName is non-standard, so not including it until it's right. - //gml.setAttribute("srsName", "http://www.opengis.net/gml/srs/epsg.xml#4326"); - - var polygonMember = document.createElementNS(this.gmlns, 'gml:polygonMember'); - - var polygon = document.createElementNS(this.gmlns, 'gml:Polygon'); - var outerRing = document.createElementNS(this.gmlns, 'gml:outerBoundaryIs'); - var linearRing = document.createElementNS(this.gmlns, 'gml:LinearRing'); - - // TBD manage polygons with holes - linearRing.appendChild(this.buildCoordinatesNode(geometry.components[0])); - outerRing.appendChild(linearRing); - polygon.appendChild(outerRing); - polygonMember.appendChild(polygon); - - gml.appendChild(polygonMember); - } - // match MultiLineString or LineString - else if (geometry.CLASS_NAME == "OpenLayers.Geometry.MultiLineString" - || geometry.CLASS_NAME == "OpenLayers.Geometry.LineString") { - gml = document.createElementNS(this.gmlns, 'gml:MultiLineString'); - - // TBD retrieve the srs from layer - // srsName is non-standard, so not including it until it's right. - //gml.setAttribute("srsName", "http://www.opengis.net/gml/srs/epsg.xml#4326"); - - var lineStringMember = document.createElementNS(this.gmlns, 'gml:lineStringMember'); - - var lineString = document.createElementNS(this.gmlns, 'gml:LineString'); - - lineString.appendChild(this.buildCoordinatesNode(geometry)); - lineStringMember.appendChild(lineString); - - gml.appendChild(lineStringMember); - } - // match MultiPoint or Point - else if (geometry.CLASS_NAME == "OpenLayers.Geometry.Point" || - geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPoint") { - // TBD retrieve the srs from layer - // srsName is non-standard, so not including it until it's right. - //gml.setAttribute("srsName", "http://www.opengis.net/gml/srs/epsg.xml#4326"); - - gml = document.createElementNS(this.gmlns, 'gml:MultiPoint'); - var parts = ""; - if (geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPoint") { - parts = geometry.components; - } else { - parts = [geometry]; - } - - for (var i = 0; i < parts.length; i++) { - var pointMember = document.createElementNS(this.gmlns, 'gml:pointMember'); - var point = document.createElementNS(this.gmlns, 'gml:Point'); - point.appendChild(this.buildCoordinatesNode(parts[i])); - pointMember.appendChild(point); - gml.appendChild(pointMember); - } - } - return gml; - }, - - /** - * builds the coordinates XmlNode - * ... - * - * @param {OpenLayers.Geometry} geometry - * @return {XmlNode} created xmlNode - */ - buildCoordinatesNode: function(geometry) { - var coordinatesNode = document.createElementNS(this.gmlns, "gml:coordinates"); - coordinatesNode.setAttribute("decimal", "."); - coordinatesNode.setAttribute("cs", ","); - coordinatesNode.setAttribute("ts", " "); - - var points = null; - if (geometry.components) { - points = geometry.components; - } - - var path = ""; - if (points) { - for (var i = 0; i < points.length; i++) { - path += points[i].x + "," + points[i].y + " "; - } - } else { - path += geometry.x + "," + geometry.y + " "; - } - - var txtNode = document.createTextNode(path); - coordinatesNode.appendChild(txtNode); - - return coordinatesNode; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Format.GML" - -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Format/GeoRSS.js b/pacotes/openlayers/lib/OpenLayers/Format/GeoRSS.js deleted file mode 100644 index 52ebbf8..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Format/GeoRSS.js +++ /dev/null @@ -1,111 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Write-only GeoRSS. - * @requires OpenLayers/Format.js - */ -OpenLayers.Format.GeoRSS = OpenLayers.Class.create(); -OpenLayers.Format.GeoRSS.prototype = - OpenLayers.Class.inherit( OpenLayers.Format, { - - rssns: "http://backend.userland.com/rss2", - - featureNS: "http://mapserver.gis.umn.edu/mapserver", - - georssns: "http://www.georss.org/georss", - - /** - * Accept Feature Collection, and return a string. - * - * @param {Array} List of features to serialize into a string. - */ - write: function(features) { - var featureCollection = document.createElementNS(this.rssns, "rss"); - for (var i=0; i < features.length; i++) { - featureCollection.appendChild(this.createFeatureXML(features[i])); - } - return featureCollection; - }, - - /** - * Accept an OpenLayers.Feature.Vector, and build a geometry for it. - * - * @param OpenLayers.Feature.Vector feature - * @returns DOMElement - */ - createFeatureXML: function(feature) { - var geometryNode = this.buildGeometryNode(feature.geometry); - var featureNode = document.createElementNS(this.rssns, "item"); - var titleNode = document.createElementNS(this.rssns, "title"); - titleNode.appendChild(document.createTextNode(feature.attributes.title ? feature.attributes.title : "")); - var descNode = document.createElementNS(this.rssns, "description"); - descNode.appendChild(document.createTextNode(feature.attributes.description ? feature.attributes.description : "")); - featureNode.appendChild(titleNode); - featureNode.appendChild(descNode); - for(var attr in feature.attributes) { - var attrText = document.createTextNode(feature.attributes[attr]); - var nodename = attr; - if (attr.search(":") != -1) { - nodename = attr.split(":")[1]; - } - var attrContainer = document.createElementNS(this.featureNS, "feature:"+nodename); - attrContainer.appendChild(attrText); - featureNode.appendChild(attrContainer); - } - featureNode.appendChild(geometryNode); - return featureNode; - }, - - /** - * builds a GeoRSS node with a given geometry - * - * @param {OpenLayers.Geometry} geometry - */ - buildGeometryNode: function(geometry) { - var gml = ""; - // match MultiPolygon or Polygon - if (geometry.CLASS_NAME == "OpenLayers.Geometry.Polygon") { - gml = document.createElementNS(this.georssns, 'georss:polygon'); - - gml.appendChild(this.buildCoordinatesNode(geometry.components[0])); - } - // match MultiLineString or LineString - else if (geometry.CLASS_NAME == "OpenLayers.Geometry.LineString") { - gml = document.createElementNS(this.georssns, 'georss:line'); - - gml.appendChild(this.buildCoordinatesNode(geometry)); - } - // match MultiPoint or Point - else if (geometry.CLASS_NAME == "OpenLayers.Geometry.Point") { - gml = document.createElementNS(this.georssns, 'georss:point'); - gml.appendChild(this.buildCoordinatesNode(geometry)); - } else { - alert("Couldn't parse " + geometry.CLASS_NAME); - } - return gml; - }, - - buildCoordinatesNode: function(geometry) { - var points = null; - - if (geometry.components) { - points = geometry.components; - } - - var path = ""; - if (points) { - for (var i = 0; i < points.length; i++) { - path += points[i].y + " " + points[i].x + " "; - } - } else { - path += geometry.y + " " + geometry.x + " "; - } - return document.createTextNode(path); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Format.GeoRSS" - -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Format/KML.js b/pacotes/openlayers/lib/OpenLayers/Format/KML.js deleted file mode 100644 index 8bd2f75..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Format/KML.js +++ /dev/null @@ -1,170 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Read only KML. - * @requires OpenLayers/Format.js - * @requires OpenLayers/Feature/Vector.js - * @requires OpenLayers/Ajax.js - */ -OpenLayers.Format.KML = OpenLayers.Class.create(); -OpenLayers.Format.KML.prototype = - OpenLayers.Class.inherit( OpenLayers.Format, { - - featureNS: "http://mapserver.gis.umn.edu/mapserver", - - collectionName: "FeatureCollection", - - kmlns: "http://earth.google.com/kml/2.0", - - /** - * Read data from a string, and return a list of features. - * - * @param {string|XMLNode} data data to read/parse. - */ - read: function(data) { - if (typeof data == "string") { - data = OpenLayers.parseXMLString(data); - } - var featureNodes = OpenLayers.Ajax.getElementsByTagNameNS(data, this.kmlns, "", "Placemark"); - - var features = []; - - // Process all the featureMembers - for (var i = 0; i < featureNodes.length; i++) { - var feature = this.parseFeature(featureNodes[i]); - - if (feature) { - features.push(feature); - } - } - return features; - }, - - /** - * This function is the core of the KML parsing code in OpenLayers. - * It creates the geometries that are then attached to the returned - * feature, and calls parseAttributes() to get attribute data out. - * @param DOMElement xmlNode - */ - parseFeature: function(xmlNode) { - var geom; - var p; // [points,bounds] - - var feature = new OpenLayers.Feature.Vector(); - - // match Point - if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.kmlns, "", "Point").length != 0) { - var point = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.kmlns, "", "Point")[0]; - - p = this.parseCoords(point); - if (p.points) { - geom = p.points[0]; - // TBD Bounds only set for one of multiple geometries - geom.extendBounds(p.bounds); - } - - // match LineString - } else if (OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.kmlns, "", "LineString").length != 0) { - var linestring = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, - this.kmlns, "", "LineString")[0]; - p = this.parseCoords(linestring); - if (p.points) { - geom = new OpenLayers.Geometry.LineString(p.points); - // TBD Bounds only set for one of multiple geometries - geom.extendBounds(p.bounds); - } - } - - feature.geometry = geom; - feature.attributes = this.parseAttributes(xmlNode); - - return feature; - }, - - /** - * recursive function parse the attributes of a KML node. - * Searches for any child nodes which aren't geometries, - * and gets their value. - * @param DOMElement xmlNode - */ - parseAttributes: function(xmlNode) { - var nodes = xmlNode.childNodes; - var attributes = {}; - for(var i = 0; i < nodes.length; i++) { - var name = nodes[i].nodeName; - var value = OpenLayers.Util.getXmlNodeValue(nodes[i]); - // Ignore Geometry attributes - // match ".//gml:pos|.//gml:posList|.//gml:coordinates" - if((name.search(":pos")!=-1) - ||(name.search(":posList")!=-1) - ||(name.search(":coordinates")!=-1)){ - continue; - } - - // Check for a leaf node - if((nodes[i].childNodes.length == 1 && nodes[i].childNodes[0].nodeName == "#text") - || (nodes[i].childNodes.length == 0 && nodes[i].nodeName!="#text")) { - attributes[name] = value; - } - OpenLayers.Util.extend(attributes, this.parseAttributes(nodes[i])) - } - return attributes; - }, - - /** - * Extract Geographic coordinates from an XML node. - * @private - * @param {XMLNode} xmlNode - * - * @return an array of OpenLayers.Geometry.Point points. - * @type Array - */ - parseCoords: function(xmlNode) { - var p = []; - p.points = []; - // TBD: Need to handle an array of coordNodes not just coordNodes[0] - - var coordNodes = OpenLayers.Ajax.getElementsByTagNameNS(xmlNode, this.kmlns, "", "coordinates")[0]; - var coordString = OpenLayers.Util.getXmlNodeValue(coordNodes); - - var firstCoord = coordString.split(" "); - - while (firstCoord[0] == "") - firstCoord.shift(); - - var dim = firstCoord[0].split(",").length; - - // Extract an array of Numbers from CoordString - var nums = (coordString) ? coordString.split(/[, \n\t]+/) : []; - - - // Remove elements caused by leading and trailing white space - while (nums[0] == "") - nums.shift(); - - while (nums[nums.length-1] == "") - nums.pop(); - - for(i = 0; i < nums.length; i = i + dim) { - x = parseFloat(nums[i]); - y = parseFloat(nums[i+1]); - p.points.push(new OpenLayers.Geometry.Point(x, y)); - - if (!p.bounds) { - p.bounds = new OpenLayers.Bounds(x, y, x, y); - } else { - p.bounds.extend(x, y); - } - } - return p; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Format.KML" - -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Format/WFS.js b/pacotes/openlayers/lib/OpenLayers/Format/WFS.js deleted file mode 100644 index b9d3d97..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Format/WFS.js +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Read/WRite WFS. - * @requires OpenLayers/Format/GML.js - */ -OpenLayers.Format.WFS = OpenLayers.Class.create(); -OpenLayers.Format.WFS.prototype = - OpenLayers.Class.inherit( OpenLayers.Format.GML, { - - layer: null, - - wfsns: "http://www.opengis.net/wfs", - - /* - * Create a WFS-T formatter. This requires a layer: that layer should - * have two properties: geometry_column and typename. The parser - * for this format is subclassed entirely from GML: There is a writer - * only, which uses most of the code from the GML layer, and wraps - * it in transactional elements. - * @param {Object} options - * @param OpenLayers.Layer layer - */ - - initialize: function(options, layer) { - OpenLayers.Format.GML.prototype.initialize.apply(this, [options]); - this.layer = layer; - if (this.layer.featureNS) { - this.featureNS = this.layer.featureNS; - } - if (this.layer.options.geometry_column) { - this.geometryName = this.layer.options.geometry_column; - } - if (this.layer.options.typename) { - this.featureName = this.layer.options.typename; - } - }, - - /** - * write - * Takes a feature list, and generates a WFS-T Transaction - * - * @param Array - */ - write: function(features) { - - var transaction = document.createElementNS('http://www.opengis.net/wfs', 'wfs:Transaction'); - for (var i=0; i < features.length; i++) { - switch (features[i].state) { - case OpenLayers.State.INSERT: - transaction.appendChild(this.insert(features[i])); - break; - case OpenLayers.State.UPDATE: - transaction.appendChild(this.update(features[i])); - break; - case OpenLayers.State.DELETE: - transaction.appendChild(this.remove(features[i])); - break; - } - } - return transaction; - }, - - createFeatureXML: function(feature) { - var geometryNode = this.buildGeometryNode(feature.geometry); - var geomContainer = document.createElementNS(this.featureNS, "feature:" + this.geometryName); - geomContainer.appendChild(geometryNode); - var featureContainer = document.createElementNS(this.featureNS, "feature:" + this.featureName); - featureContainer.appendChild(geomContainer); - for(var attr in feature.attributes) { - var attrText = document.createTextNode(feature.attributes[attr]); - var nodename = attr; - if (attr.search(":") != -1) { - nodename = attr.split(":")[1]; - } - var attrContainer = document.createElementNS(this.featureNS, "feature:" + nodename); - attrContainer.appendChild(attrText); - featureContainer.appendChild(attrContainer); - } - return featureContainer; - }, - - /** - * insert - * Takes a feature, and generates a WFS-T Transaction "Insert" - * - * @param OpenLayers.Feature.Vector - */ - insert: function(feature) { - var insertNode = document.createElementNS(this.wfsns, 'wfs:Insert'); - insertNode.appendChild(this.createFeatureXML(feature)); - return insertNode; - }, - - /** - * update - * Takes a feature, and generates a WFS-T Transaction "Update" - * - * @param OpenLayers.Feature.Vector - */ - update: function(feature) { - if (!feature.fid) { alert("Can't update a feature for which there is no FID."); } - var updateNode = document.createElementNS(this.wfsns, 'wfs:Update'); - updateNode.setAttribute("typeName", this.layerName); - - var propertyNode = document.createElementNS(this.wfsns, 'wfs:Property'); - var nameNode = document.createElementNS('http://www.opengis.net/wfs', 'wfs:Name'); - - var txtNode = document.createTextNode(this.geometryName); - nameNode.appendChild(txtNode); - propertyNode.appendChild(nameNode); - - var valueNode = document.createElementNS('http://www.opengis.net/wfs', 'wfs:Value'); - valueNode.appendChild(this.buildGeometryNode(feature.geometry)); - - propertyNode.appendChild(valueNode); - updateNode.appendChild(propertyNode); - - var filterNode = document.createElementNS('http://www.opengis.net/ogc', 'ogc:Filter'); - var filterIdNode = document.createElementNS('http://www.opengis.net/ogc', 'ogc:FeatureId'); - filterIdNode.setAttribute("fid", feature.fid); - filterNode.appendChild(filterIdNode); - updateNode.appendChild(filterNode); - - return updateNode; - }, - - /** - * delete - * Takes a feature, and generates a WFS-T Transaction "Delete" - * - * @param OpenLayers.Feature.Vector - */ - remove: function(feature) { - if (!feature.attributes.fid) { - alert("Can't update a feature for which there is no FID."); - return false; - } - var deleteNode = document.createElementNS(this.featureNS, 'wfs:Delete'); - deleteNode.setAttribute("typeName", this.layerName); - - var filterNode = document.createElementNS('http://www.opengis.net/ogc', 'ogc:Filter'); - var filterIdNode = document.createElementNS('http://www.opengis.net/ogc', 'ogc:FeatureId'); - filterIdNode.setAttribute("fid", feature.attributes.fid); - filterNode.appendChild(filterIdNode); - deleteNode.appendChild(filterNode); - - return deleteNode; - }, - - destroy: function() { - this.layer = null; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Format.WFS" - -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Format/WKT.js b/pacotes/openlayers/lib/OpenLayers/Format/WKT.js deleted file mode 100644 index c46f8d5..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Format/WKT.js +++ /dev/null @@ -1,311 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Read and write WKT. - * @requires OpenLayers/Format.js - */ -OpenLayers.Format.WKT = OpenLayers.Class.create(); -OpenLayers.Format.WKT.prototype = - OpenLayers.Class.inherit(OpenLayers.Format, { - - /** - * - */ - initialize: function(options) { - this.regExes = { - 'typeStr': /^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/, - 'spaces': /\s+/, - 'parenComma': /\)\s*,\s*\(/, - 'doubleParenComma': /\)\s*\)\s*,\s*\(\s*\(/, // can't use {2} here - 'trimParens': /^\s*\(?(.*?)\)?\s*$/ - }; - OpenLayers.Format.prototype.initialize.apply(this, [options]); - }, - - /** - * Deserialize a WKT string and return an OpenLayers.Feature.Vector or an - * array of OpenLayers.Feature.Vector. Supports WKT for POINT, MULTIPOINT, - * LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, and - * GEOMETRYCOLLECTION. - * @param {String} wkt A WKT string - * @returns {OpenLayers.Feature.Vector|Array} A feature or array of - * features for - * GEOMETRYCOLLECTION WKT. - */ - read: function(wkt) { - var features, type, str; - var matches = this.regExes.typeStr.exec(wkt); - if(matches) { - type = matches[1].toLowerCase(); - str = matches[2]; - if(this.parse[type]) { - features = this.parse[type].apply(this, [str]); - } - } - return features; - }, - - /** - * Serialize a feature or array of features into a WKT string. - * @param {OpenLayers.Feature.Vector|Array} features A feature or array of - * features - * @returns {String} The WKT string representation of the input geometries - */ - write: function(features) { - var collection, geometry, type, data, isCollection; - if(features.constructor == Array) { - collection = features; - isCollection = true; - } else { - collection = [features]; - isCollection = false; - } - var pieces = []; - if(isCollection) { - pieces.push('GEOMETRYCOLLECTION('); - } - for(var i=0; i0) { - pieces.push(','); - } - geometry = collection[i].geometry; - type = geometry.CLASS_NAME.split('.')[2].toLowerCase(); - if(!this.extract[type]) { - return null; - } - data = this.extract[type].apply(this, [geometry]); - pieces.push(type.toUpperCase() + '(' + data + ')'); - } - if(isCollection) { - pieces.push(')'); - } - return pieces.join(''); - }, - - /** - * Object with properties corresponding to the geometry types. - * Property values are functions that do the actual data extraction. - */ - extract: { - /** - * Return a space delimited string of point coordinates. - * @param {OpenLayers.Geometry.Point} point - * @returns {String} A string of coordinates representing the point - */ - 'point': function(point) { - return point.x + ' ' + point.y; - }, - - /** - * Return a comma delimited string of point coordinates from a multipoint. - * @param {OpenLayers.Geometry.MultiPoint} multipoint - * @returns {String} A string of point coordinate strings representing - * the multipoint - */ - 'multipoint': function(multipoint) { - var array = []; - for(var i=0; i 0)) { - this.setBounds(this.components[0].getBounds()); - for (var i = 1; i < this.components.length; i++) { - this.extendBounds(this.components[i].getBounds()); - } - } - }, - - /** - * @param {Array(OpenLayers.Geometry)} components - * - */ - addComponents: function(components){ - if(!(components instanceof Array)) { - components = [components]; - } - for(var i=0; i < components.length; i++) { - this.addComponent(components[i]); - } - }, - - /** - * Add a new component (geometry) to the collection. If this.componentTypes - * is set, then the component class name must be in the componentTypes array. - * - * The bounds cache is reset. - * - * @param {OpenLayers.Geometry} component - * @param {int} index Index into the array to insert the component - * @type Boolean - * @return Component was successfully added - */ - addComponent: function(component, index) { - var added = false; - if(component) { - if(this.componentTypes == null || - (OpenLayers.Util.indexOf(this.componentTypes, - component.CLASS_NAME) > -1)) { - - if(index != null && (index < this.components.length)) { - var components1 = this.components.slice(0, index); - var components2 = this.components.slice(index, - this.components.length); - components1.push(component); - this.components = components1.concat(components2); - } else { - this.components.push(component); - } - component.parent = this; - this.clearBounds(); - added = true; - } - } - return added; - }, - - /** - * @param {Array(OpenLayers.Geometry)} components - */ - removeComponents: function(components) { - if(!(components instanceof Array)) { - components = [components]; - } - for (var i = 0; i < components.length; i++) { - this.removeComponent(components[i]); - } - }, - - /** - * @param {OpenLayers.Geometry} component - */ - removeComponent: function(component) { - - OpenLayers.Util.removeItem(this.components, component); - - // clearBounds() so that it gets recalculated on the next call - // to this.getBounds(); - this.clearBounds(); - }, - - /** - * @returns The length of the geometry - * @type float - */ - getLength: function() { - var length = 0.0; - for (var i = 0; i < this.components.length; i++) { - length += this.components[i].getLength(); - } - return length; - }, - - /** Note how this function is overridden in Polygon - * - * @returns the area of the collection by summing its parts - * @type float - */ - getArea: function() { - var area = 0.0; - for (var i = 0; i < this.components.length; i++) { - area += this.components[i].getArea(); - } - return area; - }, - - /** - * Moves a collection in place - * @param {Float} x - * @param {Float} y - */ - move: function(x, y) { - for(var i = 0; i < this.components.length; i++) { - this.components[i].move(x, y); - } - }, - - /** - * Tests for equivalent geometries - * @param {OpenLayers.Geometry} - * @type Boolean - * @return The coordinates are equivalent - */ - equals: function(geometry) { - var equivalent = true; - if(!geometry.CLASS_NAME || (this.CLASS_NAME != geometry.CLASS_NAME)) { - equivalent = false; - } else if(!(geometry.components instanceof Array) || - (geometry.components.length != this.components.length)) { - equivalent = false; - } else { - for(var i=0; i 1)) { - for(var i=1; i < this.components.length; i++) { - length += this.components[i-1].distanceTo(this.components[i]); - } - } - return length; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.Curve" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Geometry/LineString.js b/pacotes/openlayers/lib/OpenLayers/Geometry/LineString.js deleted file mode 100644 index 37c8ec1..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Geometry/LineString.js +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * A LineString is a Curve which, once two points have been added to it, can - * never be less than two points long. - * - * @requires OpenLayers/Geometry/Curve.js - */ -OpenLayers.Geometry.LineString = OpenLayers.Class.create(); -OpenLayers.Geometry.LineString.prototype = - OpenLayers.Class.inherit(OpenLayers.Geometry.Curve, { - - /** - * @constructor - * - * @param {Array(OpenLayers.Geometry.Point)} points - */ - initialize: function(points) { - OpenLayers.Geometry.Curve.prototype.initialize.apply(this, arguments); - }, - - /** Only allows removal of a point if there are three or more points in - * the linestring. (otherwise the result would be just a single point) - * - * @param {OpenLayers.Geometry.Point} point - */ - removeComponent: function(point) { - if ( this.components && (this.components.length > 2)) { - OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, - arguments); - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.LineString" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Geometry/LinearRing.js b/pacotes/openlayers/lib/OpenLayers/Geometry/LinearRing.js deleted file mode 100644 index 92dc16b..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Geometry/LinearRing.js +++ /dev/null @@ -1,125 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * A Linear Ring is a special LineString which is closed. It closes itself - * automatically on every addPoint/removePoint by adding a copy of the first - * point as the last point. - * - * Also, as it is the first in the line family to close itself, a getArea() - * function is defined to calculate the enclosed area of the linearRing - * - * @requires OpenLayers/Geometry/LineString.js - */ -OpenLayers.Geometry.LinearRing = OpenLayers.Class.create(); -OpenLayers.Geometry.LinearRing.prototype = - OpenLayers.Class.inherit(OpenLayers.Geometry.LineString, { - - /** - * An array of class names representing the types of components that - * the collection can include. A null value means the component types - * are not restricted. - * @type Array(String) - */ - componentTypes: ["OpenLayers.Geometry.Point"], - - /** - * Linear rings are constructed with an array of points. This array - * can represent a closed or open ring. If the ring is open (the last - * point does not equal the first point), the constructor will close - * the ring. If the ring is already closed (the last point does equal - * the first point), it will be left closed. - * - * @constructor - * @param {Array(OpenLayers.Geometry.Point)} points - */ - initialize: function(points) { - OpenLayers.Geometry.LineString.prototype.initialize.apply(this, - arguments); - }, - - /** - * Adds a point to geometry components. If the point is to be added to - * the end of the components array and it is the same as the last point - * already in that array, the duplicate point is not added. This has the - * effect of closing the ring if it is not already closed, and doing the - * right thing if it is already closed. This behavior can be overridden - * by calling the method with a non-null index as the second argument. - * - * @param {OpenLayers.Geometry.Point} point - * @param {int} index Index into the array to insert the component - * @type Boolean - * @return Point was successfully added - */ - addComponent: function(point, index) { - var added = false; - - //remove last point - var lastPoint = this.components[this.components.length-1]; - OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, - [lastPoint]); - - // given an index, add the point - // without an index only add non-duplicate points - if(index != null || !point.equals(lastPoint)) { - added = OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, - arguments); - } - - //append copy of first point - var firstPoint = this.components[0]; - OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, - [firstPoint.clone()]); - - return added; - }, - - /** - * Removes a point from geometry components - * - * @param {OpenLayers.Geometry.Point} point - */ - removeComponent: function(point) { - if (this.components.length > 4) { - - //remove last point - var lastPoint = this.components[this.components.length-1]; - OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, - [lastPoint]); - - //remove our point - OpenLayers.Geometry.Collection.prototype.removeComponent.apply(this, - arguments); - //append copy of first point - var firstPoint = this.components[0]; - OpenLayers.Geometry.Collection.prototype.addComponent.apply(this, - [firstPoint.clone()]); - } - }, - - /** Note: The area is positive if the ring is oriented CW, otherwise - * it will be negative. - * - * @returns The signed area for a ring. - * @type float - */ - getArea: function() { - var area = 0.0; - if ( this.components && (this.components.length > 2)) { - var sum = 0.0; - for (var i = 0; i < this.components.length - 1; i++) { - var b = this.components[i]; - var c = this.components[i+1]; - sum += (b.x + c.x) * (c.y - b.y); - } - area = - sum / 2.0; - } - return area; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.LinearRing" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Geometry/MultiLineString.js b/pacotes/openlayers/lib/OpenLayers/Geometry/MultiLineString.js deleted file mode 100644 index 7a9e538..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Geometry/MultiLineString.js +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * A MultiLineString is a collection of LineStrings - * - * @requires OpenLayers/Geometry/Collection.js - */ -OpenLayers.Geometry.MultiLineString = OpenLayers.Class.create(); -OpenLayers.Geometry.MultiLineString.prototype = - OpenLayers.Class.inherit(OpenLayers.Geometry.Collection, { - - /** - * An array of class names representing the types of components that - * the collection can include. A null value means the component types - * are not restricted. - * @type Array(String) - */ - componentTypes: ["OpenLayers.Geometry.LineString"], - - /** - * @constructor - * - * @param {Array(OpenLayers.Geometry.LineString)} components - */ - initialize: function(components) { - OpenLayers.Geometry.Collection.prototype.initialize.apply(this, - arguments); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.MultiLineString" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Geometry/MultiPoint.js b/pacotes/openlayers/lib/OpenLayers/Geometry/MultiPoint.js deleted file mode 100644 index c1ccabd..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Geometry/MultiPoint.js +++ /dev/null @@ -1,54 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * MultiPoint is a collection of Points. - * - * @requires OpenLayers/Geometry/Collection.js - */ -OpenLayers.Geometry.MultiPoint = OpenLayers.Class.create(); -OpenLayers.Geometry.MultiPoint.prototype = - OpenLayers.Class.inherit(OpenLayers.Geometry.Collection, { - - /** - * An array of class names representing the types of components that - * the collection can include. A null value means the component types - * are not restricted. - * @type Array(String) - */ - componentTypes: ["OpenLayers.Geometry.Point"], - - /** - * @constructor - * - * @param {Array(OpenLayers.Geometry.Point)} components - */ - initialize: function(components) { - OpenLayers.Geometry.Collection.prototype.initialize.apply(this, - arguments); - }, - - /** - * Wrapper for addComponent() - * - * @param {OpenLayers.Geometry.Point} point - * @param {int} index - */ - addPoint: function(point, index) { - this.addComponent(point, index); - }, - - /** - * Wrapper for removeComponent() - * - * @param {OpenLayers.Geometry.Point} point - */ - removePoint: function(point){ - this.removeComponent(point); - }, - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.MultiPoint" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Geometry/MultiPolygon.js b/pacotes/openlayers/lib/OpenLayers/Geometry/MultiPolygon.js deleted file mode 100644 index f1b6251..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Geometry/MultiPolygon.js +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * MultiPolygon is a collection of Polygons. - * - * @requires OpenLayers/Geometry/Collection.js - */ -OpenLayers.Geometry.MultiPolygon = OpenLayers.Class.create(); -OpenLayers.Geometry.MultiPolygon.prototype = - OpenLayers.Class.inherit(OpenLayers.Geometry.Collection, { - - /** - * An array of class names representing the types of components that - * the collection can include. A null value means the component types - * are not restricted. - * @type Array(String) - */ - componentTypes: ["OpenLayers.Geometry.Polygon"], - - /** - * @constructor - * - * @param {Array(OpenLayers.Geometry.Polygon)} components - */ - initialize: function(components) { - OpenLayers.Geometry.Collection.prototype.initialize.apply(this, - arguments); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.MultiPolygon" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Geometry/Point.js b/pacotes/openlayers/lib/OpenLayers/Geometry/Point.js deleted file mode 100644 index 4a7b2ca..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Geometry/Point.js +++ /dev/null @@ -1,109 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Geometry.js - */ -OpenLayers.Geometry.Point = OpenLayers.Class.create(); -OpenLayers.Geometry.Point.prototype = - OpenLayers.Class.inherit(OpenLayers.Geometry, { - - /** @type float */ - x: null, - - /** @type float */ - y: null, - - /** - * @constructor - * - * @param {float} x - * @param {float} y - */ - initialize: function(x, y) { - OpenLayers.Geometry.prototype.initialize.apply(this, arguments); - - this.x = parseFloat(x); - this.y = parseFloat(y); - }, - - /** - * @returns An exact clone of this OpenLayers.Geometry.Point - * @type OpenLayers.Geometry.Point - */ - clone: function(obj) { - if (obj == null) { - obj = new OpenLayers.Geometry.Point(this.x, this.y); - } - - // catch any randomly tagged-on properties - OpenLayers.Util.applyDefaults(obj, this); - - return obj; - }, - - /** Create a new Bounds based on the lon/lat - * - */ - calculateBounds: function () { - this.bounds = new OpenLayers.Bounds(this.x, this.y, - this.x, this.y); - }, - - /** - * @param {OpenLayers.Geometry.Point} point - */ - distanceTo: function(point) { - var distance = 0.0; - if ( (this.x != null) && (this.y != null) && - (point != null) && (point.x != null) && (point.y != null) ) { - - var dx2 = Math.pow(this.x - point.x, 2); - var dy2 = Math.pow(this.y - point.y, 2); - distance = Math.sqrt( dx2 + dy2 ); - } - return distance; - }, - - /** - * @param {OpenLayers.Geometry} xy - * @returns Boolean value indicating whether the passed-in - * OpenLayers.Geometryobject has the same components as this - * note that if ll passed in is null, returns false - * - * @type bool - */ - equals:function(geom) { - var equals = false; - if (geom != null) { - equals = ((this.x == geom.x && this.y == geom.y) || - (isNaN(this.x) && isNaN(this.y) && isNaN(geom.x) && isNaN(geom.y))); - } - return equals; - }, - - /** - * @return Shortened String representation of Point object. - * (ex. "5, 42") - * @type String - */ - toShortString: function() { - return (this.x + ", " + this.y); - }, - - /** - * Moves a point in place - * @param {Float} x - * @param {Float} y - */ - move: function(x, y) { - this.x = this.x + x; - this.y = this.y + y; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.Point" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Geometry/Polygon.js b/pacotes/openlayers/lib/OpenLayers/Geometry/Polygon.js deleted file mode 100644 index 4ee4e12..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Geometry/Polygon.js +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * Polygon is a collection of Geometry.LinearRings. - * - * The first ring (this.component[0])is the outer bounds of the polygon and - * all subsequent rings (this.component[1-n]) are internal holes. - * - * @requires OpenLayers/Geometry/Collection.js - */ -OpenLayers.Geometry.Polygon = OpenLayers.Class.create(); -OpenLayers.Geometry.Polygon.prototype = - OpenLayers.Class.inherit(OpenLayers.Geometry.Collection, { - - /** - * An array of class names representing the types of components that - * the collection can include. A null value means the component types - * are not restricted. - * @type Array(String) - */ - componentTypes: ["OpenLayers.Geometry.LinearRing"], - - /** - * @constructor - * - * @param {Array(OpenLayers.Geometry.LinearRing)} - */ - initialize: function(components) { - OpenLayers.Geometry.Collection.prototype.initialize.apply(this, - arguments); - }, - - /** Calculated by subtracting the areas of the internal holes from the - * area of the outer hole. - * - * @returns The area of the geometry - * @type float - */ - getArea: function() { - var area = 0.0; - if ( this.components && (this.components.length > 0)) { - area += Math.abs(this.components[0].getArea()); - for (var i = 1; i < this.components.length; i++) { - area -= Math.abs(this.components[i].getArea()); - } - } - return area; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.Polygon" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Geometry/Rectangle.js b/pacotes/openlayers/lib/OpenLayers/Geometry/Rectangle.js deleted file mode 100644 index c8beb65..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Geometry/Rectangle.js +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * A Rectangle is a simple geometry. It is specified by a a point (x and y) - * and dimensions (width and height), all of which are directly accessible as - * properties. - * - * @requires OpenLayers/Geometry.js - */ - -OpenLayers.Geometry.Rectangle = OpenLayers.Class.create(); -OpenLayers.Geometry.Rectangle.prototype = - OpenLayers.Class.inherit(OpenLayers.Geometry, { - - /** @type float */ - x: null, - - /** @type float */ - y: null, - - /** @type float */ - width: null, - - /** @type float */ - height: null, - - /** - * @constructor - * - * @param {array} points - */ - initialize: function(x, y, width, height) { - OpenLayers.Geometry.prototype.initialize.apply(this, arguments); - - this.x = x; - this.y = y; - - this.width = width; - this.height = height; - }, - - /** - * - */ - calculateBounds: function() { - this.bounds = new OpenLayers.Bounds(this.x, this.y, - this.x + this.width, - this.y + this.height); - }, - - - /** - * @returns The length of the geometry - * @type float - */ - getLength: function() { - var length = (2 * this.width) + (2 * this.height); - return length; - }, - - /** - * @returns The area of the geometry - * @type float - */ - getArea: function() { - var area = this.width * this.height; - return area; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.Rectangle" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Geometry/Surface.js b/pacotes/openlayers/lib/OpenLayers/Geometry/Surface.js deleted file mode 100644 index 8a259e7..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Geometry/Surface.js +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Geometry.js - */ -OpenLayers.Geometry.Surface = OpenLayers.Class.create(); -OpenLayers.Geometry.Surface.prototype = - OpenLayers.Class.inherit(OpenLayers.Geometry, { - - /** - * @constructor - * - */ - initialize: function() { - OpenLayers.Geometry.prototype.initialize.apply(this, arguments); - }, - - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Geometry.Surface" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Handler.js b/pacotes/openlayers/lib/OpenLayers/Handler.js deleted file mode 100644 index 66c6516..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Handler.js +++ /dev/null @@ -1,165 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * Base class to construct a higher-level handler for event sequences. - * Handlers are created by controls, which ultimately have the responsibility - * of making changes to the map. - * - * @class - */ -OpenLayers.Handler = OpenLayers.Class.create(); - -OpenLayers.Handler.MOD_NONE = 0; -OpenLayers.Handler.MOD_SHIFT = 1; -OpenLayers.Handler.MOD_CTRL = 2; -OpenLayers.Handler.MOD_ALT = 4; - -OpenLayers.Handler.prototype = { - /** - * @type String - * @private - */ - id: null, - - /** - * The control that initialized this handler. - * @type OpenLayers.Control - * @private - */ - control: null, - - /** - * @type OpenLayers.Map - * @private - */ - map: null, - - /** - * @type integer - */ -// keyMask: OpenLayers.Handler.MOD_NONE, - keyMask: null, - - /** - * @type Boolean - * @private - */ - active: false, - - /** - * @constructor - * - * @param {OpenLayers.Control} control - * @param {Object} callbacks A hash of callback functions - * @param {Object} options - */ - initialize: function(control, callbacks, options) { - OpenLayers.Util.extend(this, options); - this.control = control; - this.callbacks = callbacks; - if (control.map) { - this.setMap(control.map); - } - - OpenLayers.Util.extend(this, options); - - this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); - }, - - setMap: function (map) { - this.map = map; - }, - - checkModifiers: function (evt) { - if(this.keyMask == null) { - return true; - } - /* calculate the keyboard modifier mask for this event */ - var keyModifiers = - (evt.shiftKey ? OpenLayers.Handler.MOD_SHIFT : 0) | - (evt.ctrlKey ? OpenLayers.Handler.MOD_CTRL : 0) | - (evt.altKey ? OpenLayers.Handler.MOD_ALT : 0); - - /* if it differs from the handler object's key mask, - bail out of the event handler */ - return (keyModifiers == this.keyMask); - }, - - /** - * Turn on the handler. Returns false if the handler was already active. - * - * @type {Boolean} - */ - activate: function() { - if(this.active) { - return false; - } - // register for event handlers defined on this class. - var events = OpenLayers.Events.prototype.BROWSER_EVENTS; - for (var i = 0; i < events.length; i++) { - if (this[events[i]]) { - this.register(events[i], this[events[i]]); - } - } - this.active = true; - return true; - }, - - /** - * Turn off the handler. Returns false if the handler was already inactive. - * - * @type {Boolean} - */ - deactivate: function() { - if(!this.active) { - return false; - } - // unregister event handlers defined on this class. - var events = OpenLayers.Events.prototype.BROWSER_EVENTS; - for (var i = 0; i < events.length; i++) { - if (this[events[i]]) { - this.unregister(events[i], this[events[i]]); - } - } - this.active = false; - return true; - }, - - /** - * trigger the control's named callback with the given arguments - */ - callback: function (name, args) { - if (this.callbacks[name]) { - this.callbacks[name].apply(this.control, args); - } - }, - - /** - * register an event on the map - */ - register: function (name, method) { - // TODO: deal with registerPriority in 3.0 - this.map.events.registerPriority(name, this, method); - }, - - /** - * unregister an event from the map - */ - unregister: function (name, method) { - this.map.events.unregister(name, this, method); - }, - - /** - * - */ - destroy: function () { - // eliminate circular references - this.control = this.map = null; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Handler" -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Handler/Box.js b/pacotes/openlayers/lib/OpenLayers/Handler/Box.js deleted file mode 100644 index 9900a88..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Handler/Box.js +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Handler for dragging a rectangle across the map. Box is displayed - * on mouse down, moves on mouse move, and is finished on mouse up. - * - * @class - * @requires OpenLayers/Handler.js - */ -OpenLayers.Handler.Box = OpenLayers.Class.create(); -OpenLayers.Handler.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Handler, { - /** - * @type OpenLayers.Handler.Drag - */ - dragHandler: null, - - /** - * @constructor - * - * @param {OpenLayers.Control} control - * @param {Object} callbacks An object containing a single function to be - * called when the drag operation is finished. - * The callback should expect to recieve a single - * argument, the point geometry. - * @param {Object} options - */ - initialize: function(control, callbacks, options) { - OpenLayers.Handler.prototype.initialize.apply(this, arguments); - var callbacks = { - "down": this.startBox, - "move": this.moveBox, - "out": this.removeBox, - "up": this.endBox - }; - this.dragHandler = new OpenLayers.Handler.Drag( - this, callbacks, {keyMask: this.keyMask}); - }, - - setMap: function (map) { - OpenLayers.Handler.prototype.setMap.apply(this, arguments); - if (this.dragHandler) { - this.dragHandler.setMap(map); - } - }, - - /** - * @param {Event} evt - */ - startBox: function (xy) { - this.zoomBox = OpenLayers.Util.createDiv('zoomBox', - this.dragHandler.start, - null, - null, - "absolute", - "2px solid red"); - this.zoomBox.style.backgroundColor = "white"; - this.zoomBox.style.filter = "alpha(opacity=50)"; // IE - this.zoomBox.style.opacity = "0.50"; - this.zoomBox.style.fontSize = "1px"; - this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1; - this.map.viewPortDiv.appendChild(this.zoomBox); - - // TBD: use CSS classes instead - this.map.div.style.cursor = "crosshair"; - }, - - /** - */ - moveBox: function (xy) { - var deltaX = Math.abs(this.dragHandler.start.x - xy.x); - var deltaY = Math.abs(this.dragHandler.start.y - xy.y); - this.zoomBox.style.width = Math.max(1, deltaX) + "px"; - this.zoomBox.style.height = Math.max(1, deltaY) + "px"; - if (xy.x < this.dragHandler.start.x) { - this.zoomBox.style.left = xy.x+"px"; - } - if (xy.y < this.dragHandler.start.y) { - this.zoomBox.style.top = xy.y+"px"; - } - }, - - /** - */ - endBox: function(end) { - var result; - if (Math.abs(this.dragHandler.start.x - end.x) > 5 || - Math.abs(this.dragHandler.start.y - end.y) > 5) { - var start = this.dragHandler.start; - var top = Math.min(start.y, end.y); - var bottom = Math.max(start.y, end.y); - var left = Math.min(start.x, end.x); - var right = Math.max(start.x, end.x); - result = new OpenLayers.Bounds(left, bottom, right, top); - } else { - result = this.dragHandler.start.clone(); // i.e. OL.Pixel - } - this.removeBox(); - - // TBD: use CSS classes instead - this.map.div.style.cursor = ""; - - this.callback("done", [result]); - }, - - /** - * Remove the zoombox from the screen and nullify our reference to it. - */ - removeBox: function() { - this.map.viewPortDiv.removeChild(this.zoomBox); - this.zoomBox = null; - }, - - activate: function () { - if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) { - this.dragHandler.activate(); - return true; - } else { - return false; - } - }, - - deactivate: function () { - if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) { - this.dragHandler.deactivate(); - return true; - } else { - return false; - } - }, - - CLASS_NAME: "OpenLayers.Handler.Box" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Handler/Drag.js b/pacotes/openlayers/lib/OpenLayers/Handler/Drag.js deleted file mode 100644 index 1cd80ff..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Handler/Drag.js +++ /dev/null @@ -1,172 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Handler for dragging a rectangle across the map. Drag is displayed - * on mouse down, moves on mouse move, and is finished on mouse up. - * - * @class - * @requires OpenLayers/Handler.js - * @requires OpenLayers/Events.js - */ -OpenLayers.Handler.Drag = OpenLayers.Class.create(); -OpenLayers.Handler.Drag.prototype = OpenLayers.Class.inherit( OpenLayers.Handler, { - /** - * When a mousedown event is received, we want to record it, but not set - * 'dragging' until the mouse moves after starting. - * - * @type Boolean - **/ - started: false, - - /** @type Boolean **/ - dragging: false, - - /** @type OpenLayers.Pixel **/ - start: null, - - /** - * @type Function - * @private - */ - oldOnselectstart: null, - - /** - * @constructor - * - * @param {OpenLayers.Control} control - * @param {Object} callbacks An object containing a single function to be - * called when the drag operation is finished. - * The callback should expect to recieve a single - * argument, the point geometry. - * @param {Object} options - */ - initialize: function(control, callbacks, options) { - OpenLayers.Handler.prototype.initialize.apply(this, arguments); - }, - - /** - * Handle mousedown events - * @param {Event} evt - * @type Boolean - * @return Should the event propagate - */ - mousedown: function (evt) { - if (this.checkModifiers(evt) && OpenLayers.Event.isLeftClick(evt)) { - this.started = true; - this.dragging = false; - this.start = evt.xy.clone(); - // TBD replace with CSS classes - this.map.div.style.cursor = "move"; - this.callback("down", [evt.xy]); - OpenLayers.Event.stop(evt); - return false; - } - return true; - }, - - /** - * Handle mousemove events - * @param {Event} evt - * @type Boolean - * @return Should the event propagate - */ - mousemove: function (evt) { - if (this.started) { - this.dragging = true; - this.callback("move", [evt.xy]); - if(!this.oldOnselectstart) { - this.oldOnselectstart = document.onselectstart; - document.onselectstart = function() {return false;} - } - } - return true; - }, - - /** - * Handle mouseup events - * @param {Event} evt - * @type Boolean - * @return Should the event propagate - */ - mouseup: function (evt) { - if (this.started) { - this.started = false; - // TBD replace with CSS classes - this.map.div.style.cursor = ""; - this.callback("up", [evt.xy]); - document.onselectstart = this.oldOnselectstart; - } - return true; - }, - - /** - * Handle mouseout events - * @param {Event} evt - * @type Boolean - * @return Should the event propagate - */ - mouseout: function (evt) { - if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.div)) { - this.started = false; - this.dragging = false; - // TBD replace with CSS classes - this.map.div.style.cursor = ""; - this.callback("out", []); - if(document.onselectstart) { - document.onselectstart = this.oldOnselectstart; - } - } - return true; - }, - - /** - * The drag handler captures the click event. If something else registers - * for clicks on the same element, its listener will not be called after a - * drag. - * @param {Event} evt - * @type Boolean - * @return Should the event propagate - */ - click: function (evt) { - // throw away the first left click event that happens after a mouse up - if (this.dragging) { - this.dragging = false; - return false; - } - this.started = false; - return true; - }, - - /** - * Activate the handler. - * @type Boolean - * @return Was activation successful. Returns false if already active. - */ - activate: function() { - if(OpenLayers.Handler.prototype.activate.apply(this, arguments)) { - this.dragging = false; - return true; - } else { - return false; - } - }, - - /** - * Deactivate the handler. - * @type Boolean - * @return Was deactivation successful. Returns false if not already active. - */ - deactivate: function() { - if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) { - this.dragging = false; - return true; - } else { - return false; - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Handler.Drag" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Handler/Feature.js b/pacotes/openlayers/lib/OpenLayers/Handler/Feature.js deleted file mode 100644 index 7520dd0..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Handler/Feature.js +++ /dev/null @@ -1,151 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * Handler to respond to mouse events related to a drawn feature. - * Callbacks will be called for over, move, out, up, and down (corresponding - * to the equivalent mouse events). - * - * @class - * @requires OpenLayers/Handler.js - */ -OpenLayers.Handler.Feature = OpenLayers.Class.create(); -OpenLayers.Handler.Feature.prototype = - OpenLayers.Class.inherit(OpenLayers.Handler, { - - /** - * @type {Int} - */ - layerIndex: null, - - /** - * @type {OpenLayers.Feature.Vector} - */ - feature: null, - - /** - * @constructor - * - * @param {OpenLayers.Control} control - * @param {Array} layers List of OpenLayers.Layer.Vector - * @param {Array} callbacks An object with a 'over' property whos value is - * a function to be called when the mouse is over - * a feature. The callback should expect to recieve - * a single argument, the feature. - * @param {Object} options - */ - initialize: function(control, layer, callbacks, options) { - OpenLayers.Handler.prototype.initialize.apply(this, [control, callbacks, options]); - this.layer = layer; - }, - - /** - * Handle mouse down. Call the "down" callback if down on a feature. - * - * @param {Event} evt - */ - mousedown: function(evt) { - var selected = this.select('down', evt); - return !selected; // stop event propagation if selected - }, - - /** - * Handle mouse moves. Call the "move" callback if moving over a feature. - * Call the "over" callback if moving over a feature for the first time. - * Call the "out" callback if moving off of a feature. - * - * @param {Event} evt - */ - mousemove: function(evt) { - this.select('move', evt); - return true; - }, - - /** - * Handle mouse moves. Call the "up" callback if up on a feature. - * - * @param {Event} evt - */ - mouseup: function(evt) { - var selected = this.select('up', evt); - return !selected; // stop event propagation if selected - }, - - /** - * Capture double-clicks. Let the event continue propagating if the - * double-click doesn't hit a feature. Otherwise call the dblclick - * callback. - * - * @param {Event} evt - */ - dblclick: function(evt) { - var selected = this.select('dblclick', evt); - return !selected; // stop event propagation if selected - }, - - /** - * Trigger the appropriate callback if a feature is under the mouse. - * - * @param {String} type Callback key - * @type {Boolean} A feature was selected - */ - select: function(type, evt) { - var feature = this.layer.getFeatureFromEvent(evt); - if(feature) { - // three cases: - // over a new, out of the last and over a new, or still on the last - if(!this.feature) { - // over a new feature - this.callback('over', [feature]); - } else if(this.feature != feature) { - // out of the last and over a new - this.callback('out', [this.feature]); - this.callback('over', [feature]); - } - this.feature = feature; - this.callback(type, [feature]); - return true; - } else { - if(this.feature) { - // out of the last - this.callback('out', [this.feature]); - this.feature = null; - } - return false; - } - }, - - /** - * Turn on the handler. Returns false if the handler was already active. - * - * @type {Boolean} - */ - activate: function() { - if(OpenLayers.Handler.prototype.activate.apply(this, arguments)) { - this.layerIndex = this.layer.div.style.zIndex; - this.layer.div.style.zIndex = this.map.Z_INDEX_BASE['Popup'] - 1; - return true; - } else { - return false; - } - }, - - /** - * Turn onf the handler. Returns false if the handler was already active. - * - * @type {Boolean} - */ - deactivate: function() { - if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) { - this.layer.div.style.zIndex = this.layerIndex; - return true; - } else { - return false; - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Handler.Feature" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Handler/Keyboard.js b/pacotes/openlayers/lib/OpenLayers/Handler/Keyboard.js deleted file mode 100644 index dbce3df..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Handler/Keyboard.js +++ /dev/null @@ -1,76 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Handler for dragging a rectangle across the map. Keyboard is displayed - * on mouse down, moves on mouse move, and is finished on mouse up. - * - * @class - * @requires OpenLayers/Handler.js - * @requires OpenLayers/Events.js - */ -OpenLayers.Handler.Keyboard = OpenLayers.Class.create(); -OpenLayers.Handler.Keyboard.prototype = OpenLayers.Class.inherit( OpenLayers.Handler, { - - /* http://www.quirksmode.org/js/keys.html explains key x-browser - key handling quirks in pretty nice detail */ - - /* supported named callbacks are: keyup, keydown, keypress */ - - /** constant */ - KEY_EVENTS: ["keydown", "keypress", "keyup"], - - /** @type Function - * @private - */ - eventListener: null, - - initialize: function () { - OpenLayers.Handler.prototype.initialize.apply(this, arguments); - // cache the bound event listener method so it can be unobserved later - this.eventListener = this.handleKeyEvent.bindAsEventListener(this); - }, - - /** - * - */ - destroy: function() { - this.deactivate(); - this.eventListener = null; - OpenLayers.Control.prototype.destroy.apply(this, arguments); - }, - - activate: function() { - if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) { - for (var i = 0; i < this.KEY_EVENTS.length; i++) { - OpenLayers.Event.observe( - window, this.KEY_EVENTS[i], this.eventListener); - } - return true; - } else { - return false; - } - }, - - deactivate: function() { - if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) { - for (var i = 0; i < this.KEY_EVENTS.length; i++) { - OpenLayers.Event.stopObserving( - document, this.KEY_EVENTS[i], this.eventListener); - } - return true; - } else { - return false; - } - }, - - handleKeyEvent: function (evt) { - if (this.checkModifiers(evt)) { - this.callback(evt.type, [evt.charCode || evt.keyCode]); - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Handler.Keyboard" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Handler/MouseWheel.js b/pacotes/openlayers/lib/OpenLayers/Handler/MouseWheel.js deleted file mode 100644 index 68bf6ee..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Handler/MouseWheel.js +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Handler for wheel up/down events. - * - * @class - * @requires OpenLayers/Handler.js - */ -OpenLayers.Handler.MouseWheel = OpenLayers.Class.create(); -OpenLayers.Handler.MouseWheel.prototype = OpenLayers.Class.inherit( OpenLayers.Handler, { - /** @type function **/ - wheelListener: null, - - /** @type OpenLayers.Pixel - * @private - * - * mousePosition is necessary because evt.clientX/Y is buggy in Moz on - * wheel events, so we cache and use the value from the last mousemove. - **/ - mousePosition: null, - - /** - * @constructor - * - * @param {OpenLayers.Control} control - * @param {Object} callbacks An object containing a single function to be - * called when the drag operation is finished. - * The callback should expect to recieve a single - * argument, the point geometry. - * @param {Object} options - */ - initialize: function(control, callbacks, options) { - OpenLayers.Handler.prototype.initialize.apply(this, arguments); - this.wheelListener = this.onWheelEvent.bindAsEventListener(this); - }, - - /** - * - */ - destroy: function() { - this.deactivate(); - this.wheelListener = null; - OpenLayers.Handler.prototype.destroy.apply(this, arguments); - }, - - /** - * Mouse ScrollWheel code thanks to http://adomas.org/javascript-mouse-wheel/ - */ - - /** Catch the wheel event and handle it xbrowserly - * - * @param {Event} e - */ - onWheelEvent: function(e){ - // first check keyboard modifiers - if (!this.checkModifiers(e)) return; - - // first determine whether or not the wheeling was inside the map - var inMap = false; - var elem = OpenLayers.Event.element(e); - while(elem != null) { - if (this.map && elem == this.map.div) { - inMap = true; - break; - } - elem = elem.parentNode; - } - - if (inMap) { - var delta = 0; - if (!e) { - e = window.event; - } - if (e.wheelDelta) { - delta = e.wheelDelta/120; - if (window.opera) { - delta = -delta; - } - } else if (e.detail) { - delta = -e.detail / 3; - } - if (delta) { - // add the mouse position to the event because mozilla has a bug - // with clientX and clientY (see https://bugzilla.mozilla.org/show_bug.cgi?id=352179) - // getLonLatFromViewPortPx(e) returns wrong values - e.xy = this.mousePosition; - if (delta < 0) { - this.callback("down", [e, delta]); - } else { - this.callback("up", [e, delta]); - } - } - - //only wheel the map, not the window - OpenLayers.Event.stop(e); - } - }, - - mousemove: function (evt) { - this.mousePosition = evt.xy; - }, - - activate: function (evt) { - if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) { - //register mousewheel events specifically on the window and document - var wheelListener = this.wheelListener; - OpenLayers.Event.observe(window, "DOMMouseScroll", wheelListener); - OpenLayers.Event.observe(window, "mousewheel", wheelListener); - OpenLayers.Event.observe(document, "mousewheel", wheelListener); - return true; - } else { - return false; - } - }, - - deactivate: function (evt) { - if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) { - // unregister mousewheel events specifically on the window and document - var wheelListener = this.wheelListener; - OpenLayers.Event.stopObserving(window, "DOMMouseScroll", wheelListener); - OpenLayers.Event.stopObserving(window, "mousewheel", wheelListener); - OpenLayers.Event.stopObserving(document, "mousewheel", wheelListener); - return true; - } else { - return false; - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Handler.MouseWheel" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Handler/Path.js b/pacotes/openlayers/lib/OpenLayers/Handler/Path.js deleted file mode 100644 index afb1cb0..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Handler/Path.js +++ /dev/null @@ -1,220 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * Handler to draw a path on the map. Path is displayed on mouse down, - * moves on mouse move, and is finished on mouse up. - * - * @class - * @requires OpenLayers/Handler/Point.js - * @requires OpenLayers/Geometry/Point.js - * @requires OpenLayers/Geometry/LineString.js - */ -OpenLayers.Handler.Path = OpenLayers.Class.create(); -OpenLayers.Handler.Path.prototype = - OpenLayers.Class.inherit(OpenLayers.Handler.Point, { - - /** - * @type OpenLayers.Feature.Vector - * @private - */ - line: null, - - /** - * In freehand mode, the handler starts the path on mouse down, adds a point - * for every mouse move, and finishes the path on mouse up. Outside of - * freehand mode, a point is added to the path on every mouse click and - * double-click finishes the path. - * - * @type Boolean - */ - freehand: false, - - /** - * If set, freehandToggle is checked on mouse events and will set the - * freehand mode to the opposite of this.freehand. To disallow toggling - * between freehand and non-freehand mode, set freehandToggle to null. - * Acceptable toggle values are 'shiftKey', 'ctrlKey', and 'altKey'. - * - * @type String - */ - freehandToggle: 'shiftKey', - - /** - * @constructor - * - * @param {OpenLayers.Control} control - * @param {Array} callbacks An object with a 'done' property whos value is - * a function to be called when the path drawing is - * finished. The callback should expect to recieve a - * single argument, the line string geometry. - * If the callbacks object contains a 'point' - * property, this function will be sent each point - * as they are added. If the callbacks object contains - * a 'cancel' property, this function will be called when - * the handler is deactivated while drawing. The cancel - * should expect to receive a geometry. - * @param {Object} options - */ - initialize: function(control, callbacks, options) { - OpenLayers.Handler.Point.prototype.initialize.apply(this, arguments); - }, - - /** - * Add temporary geometries - */ - createFeature: function() { - this.line = new OpenLayers.Feature.Vector( - new OpenLayers.Geometry.LineString()); - this.point = new OpenLayers.Feature.Vector( - new OpenLayers.Geometry.Point()); - }, - - /** - * Destroy temporary geometries - */ - destroyFeature: function() { - this.line.destroy(); - this.point.destroy(); - }, - - /** - * Add point to geometry. Send the point index to override - * the behavior of LinearRing that disregards adding duplicate points. - */ - addPoint: function() { - this.line.geometry.addComponent(this.point.geometry.clone(), - this.line.geometry.components.length); - this.callback("point", [this.point.geometry]); - }, - - /** - * Determine whether to behanve in freehand mode or not. - * - * @type Boolean - */ - freehandMode: function(evt) { - return (this.freehandToggle && evt[this.freehandToggle]) ? - !this.freehand : this.freehand; - }, - - /** - * Modify the existing geometry given the new point - * - */ - modifyFeature: function() { - var index = this.line.geometry.components.length - 1; - this.line.geometry.components[index].x = this.point.geometry.x; - this.line.geometry.components[index].y = this.point.geometry.y; - }, - - /** - * Render geometries on the temporary layer. - */ - drawFeature: function() { - this.layer.drawFeature(this.line, this.style); - this.layer.drawFeature(this.point, this.style); - }, - - /** - * Return a clone of the relevant geometry. - * - * @type OpenLayers.Geometry.LineString - */ - geometryClone: function() { - return this.line.geometry.clone(); - }, - - /** - * Handle mouse down. Add a new point to the geometry and render it. - * Return determines whether to propagate the event on the map. - * - * @param {Event} evt - * @type Boolean - */ - mousedown: function(evt) { - // ignore double-clicks - if (this.lastDown && this.lastDown.equals(evt.xy)) { - return false; - } - if(this.lastDown == null) { - this.createFeature(); - } - this.mouseDown = true; - this.lastDown = evt.xy; - var lonlat = this.control.map.getLonLatFromPixel(evt.xy); - this.point.geometry.x = lonlat.lon; - this.point.geometry.y = lonlat.lat; - if((this.lastUp == null) || !this.lastUp.equals(evt.xy)) { - this.addPoint(); - } - this.drawFeature(); - this.drawing = true; - return false; - }, - - /** - * Handle mouse move. Adjust the geometry and redraw. - * Return determines whether to propagate the event on the map. - * - * @param {Event} evt - * @type Boolean - */ - mousemove: function (evt) { - if(this.drawing) { - var lonlat = this.map.getLonLatFromPixel(evt.xy); - this.point.geometry.x = lonlat.lon; - this.point.geometry.y = lonlat.lat; - if(this.mouseDown && this.freehandMode(evt)) { - this.addPoint(); - } else { - this.modifyFeature(); - } - this.drawFeature(); - } - return true; - }, - - /** - * Handle mouse up. Send the latest point in the geometry to the control. - * Return determines whether to propagate the event on the map. - * - * @param {Event} evt - * @type Boolean - */ - mouseup: function (evt) { - this.mouseDown = false; - if(this.drawing) { - if(this.freehandMode(evt)) { - this.finalize(); - } else { - if(this.lastUp == null) { - this.addPoint(); - } - this.lastUp = evt.xy; - } - return false; - } - return true; - }, - - /** - * Handle double-clicks. Finish the geometry and send it back - * to the control. - * - * @param {Event} evt - */ - dblclick: function(evt) { - if(!this.freehandMode(evt)) { - var index = this.line.geometry.components.length - 1; - this.line.geometry.removeComponent(this.line.geometry.components[index]); - this.finalize(); - } - return false; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Handler.Path" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Handler/Point.js b/pacotes/openlayers/lib/OpenLayers/Handler/Point.js deleted file mode 100644 index 6772738..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Handler/Point.js +++ /dev/null @@ -1,233 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * Handler to draw a point on the map. Point is displayed on mouse down, - * moves on mouse move, and is finished on mouse up. - * - * @class - * @requires OpenLayers/Handler.js - * @requires OpenLayers/Geometry/Point.js - */ -OpenLayers.Handler.Point = OpenLayers.Class.create(); -OpenLayers.Handler.Point.prototype = - OpenLayers.Class.inherit(OpenLayers.Handler, { - - /** - * @type OpenLayers.Feature.Vector - * @private - */ - point: null, - - /** - * @type OpenLayers.Layer.Vector - * @private - */ - layer: null, - - /** - * @type Boolean - * @private - */ - drawing: false, - - /** - * @type Boolean - * @private - */ - mouseDown: false, - - /** - * @type OpenLayers.Pixel - * @private - */ - lastDown: null, - - /** - * @type OpenLayers.Pixel - * @private - */ - lastUp: null, - - /** - * @constructor - * - * @param {OpenLayers.Control} control - * @param {Array} callbacks An object with a 'done' property whos value is - * a function to be called when the point drawing - * is finished. The callback should expect to - * recieve a single argument, the point geometry. - * If the callbacks object contains a 'cancel' property, - * this function will be called when the handler is deactivated - * while drawing. The cancel should expect to receive a geometry. - * @param {Object} options - */ - initialize: function(control, callbacks, options) { - // TBD: deal with style - this.style = OpenLayers.Util.extend(OpenLayers.Feature.Vector.style['default'], {}); - - OpenLayers.Handler.prototype.initialize.apply(this, arguments); - }, - - /** - * turn on the handler - */ - activate: function() { - if(!OpenLayers.Handler.prototype.activate.apply(this, arguments)) { - return false; - } - // create temporary vector layer for rendering geometry sketch - // TBD: this could be moved to initialize/destroy - setting visibility here - var options = {displayInLayerSwitcher: false}; - this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, options); - this.map.addLayer(this.layer); - return true; - }, - - /** - * Add temporary features - */ - createFeature: function() { - this.point = new OpenLayers.Feature.Vector( - new OpenLayers.Geometry.Point()); - }, - - /** - * turn off the handler - */ - deactivate: function() { - if(!OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) { - return false; - } - // call the cancel callback if mid-drawing - if(this.drawing) { - this.cancel(); - } - this.map.removeLayer(this.layer, false); - this.layer.destroy(); - return true; - }, - - /** - * Destroy the temporary geometries - */ - destroyFeature: function() { - this.point.destroy(); - }, - - /** - * Finish the geometry and call the "done" callback. - */ - finalize: function() { - this.layer.renderer.clear(); - this.callback("done", [this.geometryClone()]); - this.destroyFeature(); - this.drawing = false; - this.mouseDown = false; - this.lastDown = null; - this.lastUp = null; - }, - - /** - * Finish the geometry and call the "cancel" callback. - */ - cancel: function() { - this.layer.renderer.clear(); - this.callback("cancel", [this.geometryClone()]); - this.destroyFeature(); - this.drawing = false; - this.mouseDown = false; - this.lastDown = null; - this.lastUp = null; - }, - - /** - * Handle double clicks. - */ - dblclick: function(evt) { - OpenLayers.Event.stop(evt); - return false; - }, - - /** - * Render features on the temporary layer. - */ - drawFeature: function() { - this.layer.drawFeature(this.point, this.style); - }, - - /** - * Return a clone of the relevant geometry. - * - * @type OpenLayers.Geometry.Point - */ - geometryClone: function() { - return this.point.geometry.clone(); - }, - - /** - * Handle mouse down. Add a new point to the geometry and render it. - * Return determines whether to propagate the event on the map. - * - * @param {Event} evt - * @type Boolean - */ - mousedown: function(evt) { - // check keyboard modifiers - if(!this.checkModifiers(evt)) { - return true; - } - // ignore double-clicks - if(this.lastDown && this.lastDown.equals(evt.xy)) { - return true; - } - if(this.lastDown == null) { - this.createFeature(); - } - this.lastDown = evt.xy; - this.drawing = true; - var lonlat = this.map.getLonLatFromPixel(evt.xy); - this.point.geometry.x = lonlat.lon; - this.point.geometry.y = lonlat.lat; - this.drawFeature(); - return false; - }, - - /** - * Handle mouse move. Adjust the geometry and redraw. - * Return determines whether to propagate the event on the map. - * - * @param {Event} evt - * @type Boolean - */ - mousemove: function (evt) { - if(this.drawing) { - var lonlat = this.map.getLonLatFromPixel(evt.xy); - this.point.geometry.x = lonlat.lon; - this.point.geometry.y = lonlat.lat; - this.drawFeature(); - } - return true; - }, - - /** - * Handle mouse up. Send the latest point in the geometry to the control. - * Return determines whether to propagate the event on the map. - * - * @param {Event} evt - * @type Boolean - */ - mouseup: function (evt) { - if(this.drawing) { - this.finalize(); - return false; - } else { - return true; - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Handler.Point" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Handler/Polygon.js b/pacotes/openlayers/lib/OpenLayers/Handler/Polygon.js deleted file mode 100644 index f11d74f..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Handler/Polygon.js +++ /dev/null @@ -1,110 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * Handler to draw a path on the map. Polygon is displayed on mouse down, - * moves on mouse move, and is finished on mouse up. - * - * @class - * @requires OpenLayers/Handler/Path.js - * @requires OpenLayers/Geometry/Polygon.js - */ -OpenLayers.Handler.Polygon = OpenLayers.Class.create(); -OpenLayers.Handler.Polygon.prototype = - OpenLayers.Class.inherit(OpenLayers.Handler.Path, { - - /** - * @type OpenLayers.Feature.Vector - * @private - */ - polygon: null, - - /** - * @constructor - * - * @param {OpenLayers.Control} control - * @param {Array} callbacks An object with a 'done' property whos value is - * a function to be called when the path drawing is - * finished. The callback should expect to recieve a - * single argument, the polygon geometry. - * If the callbacks object contains a 'point' - * property, this function will be sent each point - * as they are added. If the callbacks object contains - * a 'cancel' property, this function will be called when - * the handler is deactivated while drawing. The cancel - * should expect to receive a geometry. - * @param {Object} options - */ - initialize: function(control, callbacks, options) { - OpenLayers.Handler.Path.prototype.initialize.apply(this, arguments); - }, - - /** - * Add temporary geometries - */ - createFeature: function() { - this.polygon = new OpenLayers.Feature.Vector( - new OpenLayers.Geometry.Polygon()); - this.line = new OpenLayers.Feature.Vector( - new OpenLayers.Geometry.LinearRing()); - this.polygon.geometry.addComponent(this.line.geometry); - this.point = new OpenLayers.Feature.Vector( - new OpenLayers.Geometry.Point()); - }, - - /** - * Destroy temporary geometries - */ - destroyFeature: function() { - this.polygon.destroy(); - this.point.destroy(); - }, - - /** - * Modify the existing geometry given the new point - * - */ - modifyFeature: function() { - var index = this.line.geometry.components.length - 2; - this.line.geometry.components[index].x = this.point.geometry.x; - this.line.geometry.components[index].y = this.point.geometry.y; - }, - - /** - * Render geometries on the temporary layer. - */ - drawFeature: function() { - this.layer.drawFeature(this.polygon, this.style); - this.layer.drawFeature(this.point, this.style); - }, - - /** - * Return a clone of the relevant geometry. - * - * @type OpenLayers.Geometry.Polygon - */ - geometryClone: function() { - return this.polygon.geometry.clone(); - }, - - /** - * Handle double-clicks. Finish the geometry and send it back - * to the control. - * - * @param {Event} evt - */ - dblclick: function(evt) { - if(!this.freehandMode(evt)) { - // remove the penultimate point - var index = this.line.geometry.components.length - 2; - this.line.geometry.removeComponent(this.line.geometry.components[index]); - this.finalize(); - } - return false; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Handler.Polygon" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Icon.js b/pacotes/openlayers/lib/OpenLayers/Icon.js deleted file mode 100644 index c8fb567..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Icon.js +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - */ -OpenLayers.Icon = OpenLayers.Class.create(); -OpenLayers.Icon.prototype = { - - /** image url - * @type String */ - url: null, - - /** @type OpenLayers.Size */ - size:null, - - /** distance in pixels to offset the image when being rendered - * @type OpenLayers.Pixel */ - offset: null, - - /** Function to calculate the offset (based on the size) - * @type OpenLayers.Pixel */ - calculateOffset: null, - - /** @type DOMElement */ - imageDiv: null, - - /** @type OpenLayers.Pixel */ - px: null, - - /** - * @constructor - * - * @param {String} url - * @param {OpenLayers.Size} size - * @param {Function} calculateOffset - */ - initialize: function(url, size, offset, calculateOffset) { - this.url = url; - this.size = (size) ? size : new OpenLayers.Size(20,20); - this.offset = offset ? offset : new OpenLayers.Pixel(-(this.size.w/2), -(this.size.h/2)); - this.calculateOffset = calculateOffset; - - var id = OpenLayers.Util.createUniqueID("OL_Icon_"); - this.imageDiv = OpenLayers.Util.createAlphaImageDiv(id); - }, - - destroy: function() { - OpenLayers.Event.stopObservingElement(this.imageDiv.firstChild); - this.imageDiv.innerHTML = ""; - this.imageDiv = null; - }, - - /** - * @returns A fresh copy of the icon. - * @type OpenLayers.Icon - */ - clone: function() { - return new OpenLayers.Icon(this.url, - this.size, - this.offset, - this.calculateOffset); - }, - - /** - * @param {OpenLayers.Size} size - */ - setSize: function(size) { - if (size != null) { - this.size = size; - } - this.draw(); - }, - - /** - * @param {OpenLayers.Pixel} px - * - * @return A new DOM Image of this icon set at the location passed-in - * @type DOMElement - */ - draw: function(px) { - OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, - null, - null, - this.size, - this.url, - "absolute"); - this.moveTo(px); - return this.imageDiv; - }, - - - /** Change the icon's opacity - * @param {float} opacity - */ - setOpacity: function(opacity) { - OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, null, null, - null, null, null, null, opacity); - - }, - - /** - * @param {OpenLayers.Pixel} px - */ - moveTo: function (px) { - //if no px passed in, use stored location - if (px != null) { - this.px = px; - } - - if (this.imageDiv != null) { - if (this.px == null) { - this.display(false); - } else { - if (this.calculateOffset) { - this.offset = this.calculateOffset(this.size); - } - var offsetPx = this.px.offset(this.offset); - OpenLayers.Util.modifyAlphaImageDiv(this.imageDiv, null, offsetPx); - } - } - }, - - /** Hide or show the icon - * - * @param {Boolean} display - */ - display: function(display) { - this.imageDiv.style.display = (display) ? "" : "none"; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Icon" -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Layer.js b/pacotes/openlayers/lib/OpenLayers/Layer.js deleted file mode 100644 index 0181e3a..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer.js +++ /dev/null @@ -1,686 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * @requires OpenLayers/Map.js - */ -OpenLayers.Layer = OpenLayers.Class.create(); -OpenLayers.Layer.prototype = { - - /** @type String */ - id: null, - - /** @type String */ - name: null, - - /** @type DOMElement */ - div: null, - - /** supported application event types - * - * @type Array */ - EVENT_TYPES: [ - "loadstart", "loadend", "loadcancel"], - - /** @type OpenLayers.Events */ - events: null, - - /** This variable is set when the layer is added to the map, via the - * accessor function setMap() - * - * @type OpenLayers.Map */ - map: null, - - /** Whether or not the layer is a base layer. This should be set - * individually by all subclasses. - * Default is false - * - * @type Boolean - */ - isBaseLayer: false, - - /** asserts whether or not the layer's images have an alpha channel - * - * @type boolean */ - alpha: false, - - /** should the layer's name appear in the layer switcher? - * - * @type boolean */ - displayInLayerSwitcher: true, - - /** Whether or not the layer should be displayed in the map - * - * @type Boolean - */ - visibility: true, - - /** Whether or not the map's current resolution is within this layer's - * min/max range -- this is set in map's setCenter() whenever zoom - * changes - * - * @type Boolean - */ - inRange: false, - - /** - * For layers that use Tile.Image, the image size is cached here. For - * layers without a gutter, the image size is equal to the tile size. - * For layers with a gutter, the image is larger than the tile by twice - * the gutter in each dimension. - * - * @type OpenLayers.Size - * @private - */ - imageSize: null, - - /** - * For layers that use Tile.Image, the image offset is cached here. - * Layers without a gutter have zero offset. For layers with a gutter, - * the image offset represents displacement due to the gutter. - * - * @type OpenLayers.Pixel - * @private - */ - imageOffset: null, - - // OPTIONS - - /** @type Array */ - options: null, - - /** Determines the width (in pixels) of the gutter around image tiles - * to ignore. By setting this property to a non-zero value, images - * will be requested that are wider and taller than the tile size by - * a value of 2 x gutter. This allows artifacts of rendering at tile - * edges to be ignored. Set a gutter value that is equal to half the size - * of the widest symbol that needs to be displayed. Defaults to zero. - * Non-tiled layers always have zero gutter. - * - * @type Int - */ - gutter: 0, - - /** @type String */ - projection: null, - - /** @type String */ - units: null, - - /** @type Array */ - scales: null, - - /** @type Array */ - resolutions: null, - - /** @type OpenLayers.Bounds */ - maxExtent: null, - - /** @type OpenLayers.Bounds */ - minExtent: null, - - /** @type float */ - maxResolution: null, - - /** @type float */ - minResolution: null, - - /** @type int */ - numZoomLevels: null, - - /** @type float */ - minScale: null, - - /** @type float */ - maxScale: null, - - /** @type Boolean */ - displayOutsideMaxExtent: false, - - - /** - * @constructor - * - * @param {String} name - * @param {Object} options Hashtable of extra options to tag onto the layer - */ - initialize: function(name, options) { - - this.addOptions(options); - - this.name = name; - - if (this.id == null) { - - this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); - - this.div = OpenLayers.Util.createDiv(); - this.div.style.width = "100%"; - this.div.style.height = "100%"; - this.div.id = this.id; - - this.events = new OpenLayers.Events(this, this.div, - this.EVENT_TYPES); - } - }, - - /** - * Destroy is a destructor: this is to alleviate cyclic references which - * the Javascript garbage cleaner can not take care of on its own. - * - * @param {Boolean} setNewBaseLayer Should a new baselayer be selected when - * this has been removed? - * Default is true - */ - destroy: function(setNewBaseLayer) { - if (setNewBaseLayer == null) { - setNewBaseLayer = true; - } - if (this.map != null) { - this.map.removeLayer(this, setNewBaseLayer); - } - this.map = null; - this.name = null; - this.div = null; - this.options = null; - - if (this.events) { - this.events.destroy(); - } - this.events = null; - }, - - /** - * @returns An exact clone of this OpenLayers.Layer - * @type OpenLayers.Layer - */ - clone: function (obj) { - - if (obj == null) { - obj = new OpenLayers.Layer(this.name, this.options); - } - - // catch any randomly tagged-on properties - OpenLayers.Util.applyDefaults(obj, this); - - // a cloned layer should never have its map property set - // because it has not been added to a map yet. - obj.map = null; - - return obj; - }, - - /** - * @param {String} newName - */ - setName: function(newName) { - if (newName != this.name) { - this.name = newName; - if (this.map != null) { - this.map.events.triggerEvent("changelayer"); - } - } - }, - - /** - * @param {Object} newOptions - */ - addOptions: function (newOptions) { - - if (this.options == null) { - this.options = new Object(); - } - - // update our copy for clone - OpenLayers.Util.extend(this.options, newOptions); - - // add new options to this - OpenLayers.Util.extend(this, newOptions); - }, - - /** - * - */ - onMapResize: function() { - //this function can be implemented by subclasses - }, - - /** - * @param {OpenLayers.Bounds} bound - * @param {Boolean} zoomChanged tells when zoom has changed, as layers - * have to do some init work in that case. - * @param {Boolean} dragging - */ - moveTo:function(bounds, zoomChanged, dragging) { - var display = this.visibility; - if (!this.isBaseLayer) { - display = display && this.inRange; - } - this.display(display); - }, - - /** Set the map property for the layer. This is done through an accessor - * so that subclasses can override this and take special action once - * they have their map variable set. - * - * Here we take care to bring over any of the necessary default properties - * from the map. - * - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - if (this.map == null) { - - this.map = map; - - // grab some essential layer data from the map if it hasn't already - // been set - this.maxExtent = this.maxExtent || this.map.maxExtent; - this.projection = this.projection || this.map.projection; - this.units = this.units || this.map.units; - - this.initResolutions(); - - if (!this.isBaseLayer) { - this.inRange = this.calculateInRange(); - var show = ((this.visibility) && (this.inRange)); - this.div.style.display = show ? "" : "none"; - } - - // deal with gutters - this.setTileSize(); - } - }, - - /** - * Set the tile size based on the map size. This also sets layer.imageSize - * and layer.imageOffset for use by Tile.Image. - * - * @param OpenLayers.Size - */ - setTileSize: function(size) { - var tileSize = (size) ? size : - ((this.tileSize) ? this.tileSize : - this.map.getTileSize()); - this.tileSize = tileSize; - if(this.gutter) { - // layers with gutters need non-null tile sizes - //if(tileSize == null) { - // OpenLayers.console.error("Error in layer.setMap() for " + - // this.name + ": layers with gutters " + - // "need non-null tile sizes"); - //} - this.imageOffset = new OpenLayers.Pixel(-this.gutter, -this.gutter); - this.imageSize = new OpenLayers.Size(tileSize.w + (2 * this.gutter), - tileSize.h + (2 * this.gutter)); - } else { - // layers without gutters may have null tile size - as long - // as they don't rely on Tile.Image - this.imageSize = tileSize; - this.imageOffset = new OpenLayers.Pixel(0, 0); - } - }, - - /** - * @returns Whether or not the layer should be displayed (if in range) - * @type Boolean - */ - getVisibility: function() { - return this.visibility; - }, - - /** Set the visibility flag for the layer and hide/show&redraw accordingly. - * Fire event unless otherwise specified - * - * Note that visibility is no longer simply whether or not the layer's - * style.display is set to "block". Now we store a 'visibility' state - * property on the layer class, this allows us to remember whether or not - * we *desire* for a layer to be visible. In the case where the map's - * resolution is out of the layer's range, this desire may be subverted. - * - * @param {Boolean} visible Whether or not to display the layer - * (if in range) - * @param {Boolean} noEvent - */ - setVisibility: function(visibility, noEvent) { - if (visibility != this.visibility) { - this.visibility = visibility; - this.display(visibility); - if (visibility && this.map != null) { - var extent = this.map.getExtent(); - if (extent != null) { - this.moveTo(extent, true); - } - } - if ((this.map != null) && - ((noEvent == null) || (noEvent == false))) { - this.map.events.triggerEvent("changelayer"); - } - } - }, - - /** Hide or show the Layer - * - * @param {Boolean} display - */ - display: function(display) { - if (display != (this.div.style.display != "none")) { - this.div.style.display = (display) ? "block" : "none"; - } - }, - - /** - * @returns Whether or not the layer is displayable at the current map's - * current resolution - * @type Boolean - */ - calculateInRange: function() { - var inRange = false; - if (this.map) { - var resolution = this.map.getResolution(); - inRange = ( (resolution >= this.minResolution) && - (resolution <= this.maxResolution) ); - } - return inRange; - }, - - /** - * @param {Boolean} isBaseLayer - */ - setIsBaseLayer: function(isBaseLayer) { - if (isBaseLayer != this.isBaseLayer) { - this.isBaseLayer = isBaseLayer; - if (this.map != null) { - this.map.events.triggerEvent("changelayer"); - } - } - }, - - /********************************************************/ - /* */ - /* Baselayer Functions */ - /* */ - /********************************************************/ - - /** This method's responsibility is to set up the 'resolutions' array - * for the layer -- this array is what the layer will use to interface - * between the zoom levels of the map and the resolution display of the - * layer. - * - * The user has several options that determine how the array is set up. - * - * For a detailed explanation, see the following wiki from the - * openlayers.org homepage: - * - * http://trac.openlayers.org/wiki/SettingZoomLevels - * - * @private - */ - initResolutions: function() { - - // These are the relevant options which are used for calculating - // resolutions information. - // - var props = new Array( - 'projection', 'units', - 'scales', 'resolutions', - 'maxScale', 'minScale', - 'maxResolution', 'minResolution', - 'minExtent', 'maxExtent', - 'numZoomLevels', 'maxZoomLevel' - ); - - // First we create a new object where we will store all of the - // resolution-related properties that we find in either the layer's - // 'options' array or from the map. - // - var confProps = new Object(); - for(var i=0; i < props.length; i++) { - var property = props[i]; - confProps[property] = this.options[property] || this.map[property]; - } - - // If numZoomLevels hasn't been set and the maxZoomLevel *has*, - // then use maxZoomLevel to calculate numZoomLevels - // - if ( (!confProps.numZoomLevels) && (confProps.maxZoomLevel) ) { - confProps.numZoomLevels = confProps.maxZoomLevel + 1; - } - - // First off, we take whatever hodge-podge of values we have and - // calculate/distill them down into a resolutions[] array - // - if ((confProps.scales != null) || (confProps.resolutions != null)) { - //preset levels - if (confProps.scales != null) { - confProps.resolutions = new Array(); - for(var i = 0; i < confProps.scales.length; i++) { - var scale = confProps.scales[i]; - confProps.resolutions[i] = - OpenLayers.Util.getResolutionFromScale(scale, - confProps.units); - } - } - confProps.numZoomLevels = confProps.resolutions.length; - - } else { - //maxResolution and numZoomLevels based calculation - - confProps.resolutions = new Array(); - - // determine maxResolution - if (confProps.minScale) { - confProps.maxResolution = - OpenLayers.Util.getResolutionFromScale(confProps.minScale, - confProps.units); - } else if (confProps.maxResolution == "auto") { - var viewSize = this.map.getSize(); - var wRes = confProps.maxExtent.getWidth() / viewSize.w; - var hRes = confProps.maxExtent.getHeight()/ viewSize.h; - confProps.maxResolution = Math.max(wRes, hRes); - } - - // determine minResolution - if (confProps.maxScale != null) { - confProps.minResolution = - OpenLayers.Util.getResolutionFromScale(confProps.maxScale); - } else if ( (confProps.minResolution == "auto") && - (confProps.minExtent != null) ) { - var viewSize = this.map.getSize(); - var wRes = confProps.minExtent.getWidth() / viewSize.w; - var hRes = confProps.minExtent.getHeight()/ viewSize.h; - confProps.minResolution = Math.max(wRes, hRes); - } - - // determine numZoomLevels - if (confProps.minResolution != null) { - var ratio = confProps.maxResolution / confProps.minResolution; - confProps.numZoomLevels = - Math.floor(Math.log(ratio) / Math.log(2)) + 1; - } - - // now we have numZoomLevels and maxResolution, - // we can populate the resolutions array - for (var i=0; i < confProps.numZoomLevels; i++) { - var res = confProps.maxResolution / Math.pow(2, i) - confProps.resolutions.push(res); - } - } - - //sort resolutions array ascendingly - // - confProps.resolutions.sort( function(a, b) { return(b-a); } ); - - // now set our newly calculated values back to the layer - // Note: We specifically do *not* set them to layer.options, which we - // will preserve as it was when we added this layer to the map. - // this way cloned layers reset themselves to new map div - // dimensions) - // - - this.resolutions = confProps.resolutions; - this.maxResolution = confProps.resolutions[0]; - var lastIndex = confProps.resolutions.length - 1; - this.minResolution = confProps.resolutions[lastIndex]; - - this.scales = new Array(); - for(var i = 0; i < confProps.resolutions.length; i++) { - this.scales[i] = - OpenLayers.Util.getScaleFromResolution(confProps.resolutions[i], - confProps.units); - } - this.minScale = this.scales[0]; - this.maxScale = this.scales[this.scales.length - 1]; - - this.numZoomLevels = confProps.numZoomLevels; - }, - - /** - * @returns The currently selected resolution of the map, taken from the - * resolutions array, indexed by current zoom level. - * @type float - */ - getResolution: function() { - var zoom = this.map.getZoom(); - return this.resolutions[zoom]; - }, - - /** - * @returns A Bounds object which represents the lon/lat bounds of the - * current viewPort. - * @type OpenLayers.Bounds - */ - getExtent: function() { - // just use stock map calculateBounds function -- passing no arguments - // means it will user map's current center & resolution - // - return this.map.calculateBounds(); - }, - - /** - * @param {OpenLayers.Bounds} bounds - * - * @returns The index of the zoomLevel (entry in the resolutions array) - * that still contains the passed-in extent. We do this by - * calculating the ideal resolution for the given exteng (based - * on the map size) and then find the smallest resolution that - * is greater than this ideal resolution. - * @type int - */ - getZoomForExtent: function(extent) { - var viewSize = this.map.getSize(); - var idealResolution = Math.max( extent.getWidth() / viewSize.w, - extent.getHeight() / viewSize.h ); - - return this.getZoomForResolution(idealResolution); - }, - - /** - * @param {float} resolution - * - * @returns The index of the zoomLevel (entry in the resolutions array) - * that is the smallest resolution that is greater than the - * passed-in resolution. - * @type int - */ - getZoomForResolution: function(resolution) { - - for(var i=1; i < this.resolutions.length; i++) { - if ( this.resolutions[i] < resolution) { - break; - } - } - return (i - 1); - }, - - /** - * @param {OpenLayers.Pixel} viewPortPx - * - * @returns An OpenLayers.LonLat which is the passed-in view port - * OpenLayers.Pixel, translated into lon/lat by the layer - * @type OpenLayers.LonLat - */ - getLonLatFromViewPortPx: function (viewPortPx) { - var lonlat = null; - if (viewPortPx != null) { - var size = this.map.getSize(); - var center = this.map.getCenter(); - if (center) { - var res = this.map.getResolution(); - - var delta_x = viewPortPx.x - (size.w / 2); - var delta_y = viewPortPx.y - (size.h / 2); - - lonlat = new OpenLayers.LonLat(center.lon + delta_x * res , - center.lat - delta_y * res); - } // else { DEBUG STATEMENT } - } - return lonlat; - }, - - /** - * @param {OpenLayers.LonLat} lonlat - * - * @returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, - * translated into view port pixels - * @type OpenLayers.Pixel - */ - getViewPortPxFromLonLat: function (lonlat) { - var px = null; - if (lonlat != null) { - var resolution = this.map.getResolution(); - var extent = this.map.getExtent(); - px = new OpenLayers.Pixel( - Math.round(1/resolution * (lonlat.lon - extent.left)), - Math.round(1/resolution * (extent.top - lonlat.lat)) - ); - } - return px; - }, - - /** - * Adjusts the extent of a bounds in map units by the layer's gutter - * in pixels. - * - * @param {OpenLayers.Bounds} bounds - * @type OpenLayers.Bounds - * @return A bounds adjusted in height and width by the gutter - */ - adjustBoundsByGutter: function(bounds) { - var mapGutter = this.gutter * this.map.getResolution(); - bounds = new OpenLayers.Bounds(bounds.left - mapGutter, - bounds.bottom - mapGutter, - bounds.right + mapGutter, - bounds.top + mapGutter); - return bounds; - }, - - /** - * Sets the opacity for the entire layer (all images) - * @param {Float} opacity - */ - setOpacity: function(opacity) { - if (opacity != this.opacity) { - this.opacity = opacity; - for(var i=0; i OpenLayers.LonLat - // - - /** - * @param {Object} moLonLat - * - * @returns An OpenLayers.LonLat, translated from the passed in - * MapObject LonLat - * Returns null if null value is passed in - * @type OpenLayers.LonLat - */ - getOLLonLatFromMapObjectLonLat: function(moLonLat) { - var olLonLat = null; - if (moLonLat != null) { - var lon = this.getLongitudeFromMapObjectLonLat(moLonLat); - var lat = this.getLatitudeFromMapObjectLonLat(moLonLat); - olLonLat = new OpenLayers.LonLat(lon, lat); - } - return olLonLat; - }, - - /** - * @param {OpenLayers.LonLat} olLonLat - * - * @returns A MapObject LonLat, translated from the passed in - * OpenLayers.LonLat - * Returns null if null value is passed in - * @type Object - */ - getMapObjectLonLatFromOLLonLat: function(olLonLat) { - var moLatLng = null; - if (olLonLat != null) { - moLatLng = this.getMapObjectLonLatFromLonLat(olLonLat.lon, - olLonLat.lat); - } - return moLatLng; - }, - - - // - // TRANSLATION: MapObject Pixel <-> OpenLayers.Pixel - // - - /** - * @param {Object} moPixel - * - * @returns An OpenLayers.Pixel, translated from the passed in - * MapObject Pixel - * Returns null if null value is passed in - * @type OpenLayers.Pixel - */ - getOLPixelFromMapObjectPixel: function(moPixel) { - var olPixel = null; - if (moPixel != null) { - var x = this.getXFromMapObjectPixel(moPixel); - var y = this.getYFromMapObjectPixel(moPixel); - olPixel = new OpenLayers.Pixel(x, y); - } - return olPixel; - }, - - /** - * @param {OpenLayers.Pixel} olPixel - * - * @returns A MapObject Pixel, translated from the passed in - * OpenLayers.Pixel - * Returns null if null value is passed in - * @type Object - */ - getMapObjectPixelFromOLPixel: function(olPixel) { - var moPixel = null; - if (olPixel != null) { - moPixel = this.getMapObjectPixelFromXY(olPixel.x, olPixel.y); - } - return moPixel; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Layer.EventPane" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Layer/FixedZoomLevels.js b/pacotes/openlayers/lib/OpenLayers/Layer/FixedZoomLevels.js deleted file mode 100644 index 5170b0b..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer/FixedZoomLevels.js +++ /dev/null @@ -1,236 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - - - -/** - * Some Layers will already have established zoom levels (like google - * or ve). Instead of trying to determine them and populate a resolutions[] - * Array with those values, we will hijack the resolution functionality - * here. - * - * When you subclass FixedZoomLevels: - * - * The initResolutions() call gets nullified, meaning no resolutions[] array - * is set up. Which would be a big problem getResolution() in Layer, since - * it merely takes map.zoom and indexes into resolutions[]... but.... - * - * The getResolution() call is also overridden. Instead of using the - * resolutions[] array, we simply calculate the current resolution based - * on the current extent and the current map size. But how will we be able - * to calculate the current extent without knowing the resolution...? - * - * The getExtent() function is also overridden. Instead of calculating extent - * based on the center point and the current resolution, we instead - * calculate the extent by getting the lonlats at the top-left and - * bottom-right by using the getLonLatFromViewPortPx() translation function, - * taken from the pixel locations (0,0) and the size of the map. But how - * will we be able to do lonlat-px translation without resolution....? - * - * The getZoomForResolution() method is overridden. Instead of indexing into - * the resolutions[] array, we call OpenLayers.Layer.getExent(), passing in - * the desired resolution. With this extent, we then call getZoomForExtent() - * - * - * Whenever you implement a layer using OpenLayers.Layer.FixedZoomLevels, - * it is your responsibility to provide the following three functions: - * - * - getLonLatFromViewPortPx() - * - getViewPortPxFromLonLat() - * - getZoomForExtent() - * - * ...those three functions should generally be provided by any reasonable - * API that you might be working from. - * - * @requires OpenLayers/Layer.js - * @class - */ -OpenLayers.Layer.FixedZoomLevels = OpenLayers.Class.create(); -OpenLayers.Layer.FixedZoomLevels.prototype = { - - /********************************************************/ - /* */ - /* Baselayer Functions */ - /* */ - /* The following functions must all be implemented */ - /* by all base layers */ - /* */ - /********************************************************/ - - /** - * @constructor - */ - initialize: function() { - //this class is only just to add the following functions... - // nothing to actually do here... but it is probably a good - // idea to have layers that use these functions call this - // inititalize() anyways, in case at some point we decide we - // do want to put some functionality or state in here. - }, - - /** - * - */ - initResolutions: function() { - - var props = new Array('minZoomLevel', 'maxZoomLevel', 'numZoomLevels'); - - for(var i=0; i < props.length; i++) { - var property = props[i]; - this[property] = (this.options[property] != null) - ? this.options[property] - : this.map[property]; - } - - if ( (this.minZoomLevel == null) || - (this.minZoomLevel < this.MIN_ZOOM_LEVEL) ){ - this.minZoomLevel = this.MIN_ZOOM_LEVEL; - } - - var limitZoomLevels = this.MAX_ZOOM_LEVEL - this.minZoomLevel + 1; - if (this.numZoomLevels != null) { - this.numZoomLevels = Math.min(this.numZoomLevels, limitZoomLevels); - } else { - if (this.maxZoomLevel != null) { - var zoomDiff = this.maxZoomLevel - this.minZoomLevel + 1; - this.numZoomLevels = Math.min(zoomDiff, limitZoomLevels); - } else { - this.numZoomLevels = limitZoomLevels; - } - } - - this.maxZoomLevel = this.minZoomLevel + this.numZoomLevels - 1; - - if (this.RESOLUTIONS != null) { - var resolutionsIndex = 0; - this.resolutions = []; - for(var i= this.minZoomLevel; i < this.numZoomLevels; i++) { - this.resolutions[resolutionsIndex++] = this.RESOLUTIONS[i]; - } - } - }, - - /** - * @returns Degrees per Pixel - * @type float - */ - getResolution: function() { - - if (this.resolutions != null) { - return OpenLayers.Layer.prototype.getResolution.apply(this, arguments); - } else { - var resolution = null; - - var viewSize = this.map.getSize(); - var extent = this.getExtent(); - - if ((viewSize != null) && (extent != null)) { - resolution = Math.max( extent.getWidth() / viewSize.w, - extent.getHeight() / viewSize.h ); - } - return resolution; - } - }, - - /** Calculates using px-> lonlat translation functions on tl and br - * corners of viewport - * - * @returns A Bounds object which represents the lon/lat bounds of the - * current viewPort. - * @type OpenLayers.Bounds - */ - getExtent: function () { - var extent = null; - - - var size = this.map.getSize(); - - var tlPx = new OpenLayers.Pixel(0,0); - var tlLL = this.getLonLatFromViewPortPx(tlPx); - - var brPx = new OpenLayers.Pixel(size.w, size.h); - var brLL = this.getLonLatFromViewPortPx(brPx); - - if ((tlLL != null) && (brLL != null)) { - extent = new OpenLayers.Bounds(tlLL.lon, - brLL.lat, - brLL.lon, - tlLL.lat); - } - - return extent; - }, - - /** - * @param {float} resolution - * - * @returns A suitable zoom level for the specified resolution. - * If no baselayer is set, returns null. - * @type int - */ - getZoomForResolution: function(resolution) { - - if (this.resolutions != null) { - return OpenLayers.Layer.prototype.getZoomForResolution.apply(this, arguments); - } else { - var extent = OpenLayers.Layer.prototype.getExtent.apply(this, - [resolution]); - - return this.getZoomForExtent(extent); - } - }, - - - - - /********************************************************/ - /* */ - /* Translation Functions */ - /* */ - /* The following functions translate GMaps and OL */ - /* formats for Pixel, LonLat, Bounds, and Zoom */ - /* */ - /********************************************************/ - - - // - // TRANSLATION: MapObject Zoom <-> OpenLayers Zoom - // - - /** - * @param {int} gZoom - * - * @returns An OpenLayers Zoom level, translated from the passed in gZoom - * Returns null if null value is passed in - * @type int - */ - getOLZoomFromMapObjectZoom: function(moZoom) { - var zoom = null; - if (moZoom != null) { - zoom = moZoom - this.minZoomLevel; - } - return zoom; - }, - - /** - * @param {int} olZoom - * - * @returns A MapObject level, translated from the passed in olZoom - * Returns null if null value is passed in - * @type int - */ - getMapObjectZoomFromOLZoom: function(olZoom) { - var zoom = null; - if (olZoom != null) { - zoom = olZoom + this.minZoomLevel; - } - return zoom; - }, - - - /** @final @type String */ - CLASS_NAME: "FixedZoomLevels.js" -}; - diff --git a/pacotes/openlayers/lib/OpenLayers/Layer/GML.js b/pacotes/openlayers/lib/OpenLayers/Layer/GML.js deleted file mode 100644 index 3fb9543..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer/GML.js +++ /dev/null @@ -1,113 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * Create a vector layer by parsing a GML file. The GML file is - * passed in as a parameter. - * @class - * - * @requires OpenLayers/Layer/Vector.js - * @requires OpenLayers/Ajax.js - */ -OpenLayers.Layer.GML = OpenLayers.Class.create(); -OpenLayers.Layer.GML.prototype = - OpenLayers.Class.inherit( OpenLayers.Layer.Vector, { - - /** - * Flag for whether the GML data has been loaded yet. - * @type Boolean - */ - loaded: false, - - format: null, - - /** - * @constructor - * - * @param {String} name - * @param {String} url URL of a GML file. - * @param {Object} options Hashtable of extra options to tag onto the layer. - * Options renderer {Object}: Typically SvgRenderer or VmlRenderer. - */ - initialize: function(name, url, options) { - var newArguments = new Array() - newArguments.push(name, options); - OpenLayers.Layer.Vector.prototype.initialize.apply(this, newArguments); - this.url = url; - }, - - /** - * Set the visibility flag for the layer and hide/show&redraw accordingly. - * Fire event unless otherwise specified - * GML will be loaded if the layer is being made visible for the first - * time. - * - * @param {Boolean} visible Whether or not to display the layer - * (if in range) - * @param {Boolean} noEvent - */ - setVisibility: function(visibility, noEvent) { - OpenLayers.Layer.Vector.prototype.setVisibility.apply(this, arguments); - if(this.visibility && !this.loaded){ - // Load the GML - this.loadGML(); - } - }, - - /** - * If layer is visible and GML has not been loaded, load GML, then load GML - * and call OpenLayers.Layer.Vector.moveTo() to redraw at the new location. - * @param {Object} bounds - * @param {Object} zoomChanged - * @param {Object} minor - */ - moveTo:function(bounds, zoomChanged, minor) { - OpenLayers.Layer.Vector.prototype.moveTo.apply(this, arguments); - // Wait until initialisation is complete before loading GML - // otherwise we can get a race condition where the root HTML DOM is - // loaded after the GML is paited. - // See http://trac.openlayers.org/ticket/404 - if(this.visibility && !this.loaded){ - this.loadGML(); - } - }, - - loadGML: function() { - if (!this.loaded) { - var results = OpenLayers.loadURL(this.url, null, this, this.requestSuccess, this.requestFailure); - this.loaded = true; - } - }, - - - /** - * Process GML after it has been loaded. - * Called by initialise() and loadUrl() after the GML has been loaded. - * @private - * @param {String} request - */ - requestSuccess:function(request) { - var doc = request.responseXML; - - if (!doc || request.fileType!="XML") { - doc = request.responseText; - } - - var gml = this.format ? new this.format() : new OpenLayers.Format.GML(); - this.addFeatures(gml.read(doc)); - }, - - /** - * Process a failed loading of GML. - * Called by initialise() and loadUrl() if there was a problem loading GML. - * @private - * @param {String} request - */ - requestFailure: function(request) { - alert("Error in loading GML file "+this.url); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Layer.GML" - }); diff --git a/pacotes/openlayers/lib/OpenLayers/Layer/GeoRSS.js b/pacotes/openlayers/lib/OpenLayers/Layer/GeoRSS.js deleted file mode 100644 index 98a818b..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer/GeoRSS.js +++ /dev/null @@ -1,207 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Layer/Markers.js - * @requires OpenLayers/Ajax.js - */ -OpenLayers.Layer.GeoRSS = OpenLayers.Class.create(); -OpenLayers.Layer.GeoRSS.prototype = - OpenLayers.Class.inherit( OpenLayers.Layer.Markers, { - - /** store url of text file - * @type str */ - location:null, - - /** @type Array(OpenLayers.Feature) */ - features: null, - - /** @type OpenLayers.Feature */ - selectedFeature: null, - - /** - * @constructor - * - * @param {String} name - * @param {String} location - */ - initialize: function(name, location) { - OpenLayers.Layer.Markers.prototype.initialize.apply(this, [name]); - this.location = location; - this.features = new Array(); - OpenLayers.loadURL(location, null, this, this.parseData); - }, - - /** - * - */ - destroy: function() { - this.clearFeatures(); - this.features = null; - OpenLayers.Layer.Markers.prototype.destroy.apply(this, arguments); - }, - - /** - * @param {XMLHttpRequest} ajaxRequest - */ - parseData: function(ajaxRequest) { - var doc = ajaxRequest.responseXML; - if (!doc || ajaxRequest.fileType!="XML") { - doc = OpenLayers.parseXMLString(ajaxRequest.responseText); - } - - this.name = null; - try { - this.name = doc.getElementsByTagNameNS('*', 'title')[0].firstChild.nodeValue; - } - catch (e) { - this.name = doc.getElementsByTagName('title')[0].firstChild.nodeValue; - } - - /* Try RSS items first, then Atom entries */ - var itemlist = null; - try { - itemlist = doc.getElementsByTagNameNS('*', 'item'); - } - catch (e) { - itemlist = doc.getElementsByTagName('item'); - } - - if (itemlist.length == 0) { - try { - itemlist = doc.getElementsByTagNameNS('*', 'entry'); - } - catch(e) { - itemlist = doc.getElementsByTagName('entry'); - } - } - - for (var i = 0; i < itemlist.length; i++) { - var data = {}; - var point = OpenLayers.Util.getNodes(itemlist[i], 'georss:point'); - var lat = OpenLayers.Util.getNodes(itemlist[i], 'geo:lat'); - var lon = OpenLayers.Util.getNodes(itemlist[i], 'geo:long'); - if (point.length > 0) { - var location = point[0].firstChild.nodeValue.split(" "); - - if (location.length !=2) { - var location = point[0].firstChild.nodeValue.split(","); - } - } else if (lat.length > 0 && lon.length > 0) { - var location = [parseFloat(lat[0].firstChild.nodeValue), parseFloat(lon[0].firstChild.nodeValue)]; - } else { - continue; - } - location = new OpenLayers.LonLat(parseFloat(location[1]), parseFloat(location[0])); - - /* Provide defaults for title and description */ - var title = "Untitled"; - try { - title = OpenLayers.Util.getNodes(itemlist[i], - "title")[0].firstChild.nodeValue; - } - catch (e) { title="Untitled"; } - - /* First try RSS descriptions, then Atom summaries */ - var descr_nodes = null; - try { - descr_nodes = itemlist[i].getElementsByTagNameNS("*", - "description"); - } - catch (e) { - descr_nodes = itemlist[i].getElementsByTagName("description"); - } - if (descr_nodes.length == 0) { - try { - descr_nodes = itemlist[i].getElementsByTagNameNS("*", - "summary"); - } - catch (e) { - descr_nodes = itemlist[i].getElementsByTagName("summary"); - } - } - - var description = "No description."; - try { - description = descr_nodes[0].firstChild.nodeValue; - } - catch (e) { description="No description."; } - - /* If no link URL is found in the first child node, try the - href attribute */ - try { - var link = OpenLayers.Util.getNodes(itemlist[i], "link")[0].firstChild.nodeValue; - } - catch (e) { - try { - var link = OpenLayers.Util.getNodes(itemlist[i], "link")[0].getAttribute("href"); - } - catch (e) {} - } - - data.icon = OpenLayers.Marker.defaultIcon(); - data.popupSize = new OpenLayers.Size(250, 120); - if ((title != null) && (description != null)) { - contentHTML = '
[x]
'; - contentHTML += '
'; - if (link) contentHTML += ''; - contentHTML += title; - if (link) contentHTML += ''; - contentHTML += '
'; - contentHTML += '
'; - contentHTML += description; - contentHTML += '
'; - data['popupContentHTML'] = contentHTML; - } - var feature = new OpenLayers.Feature(this, location, data); - this.features.push(feature); - var marker = feature.createMarker(); - marker.events.register('click', feature, this.markerClick); - this.addMarker(marker); - } - }, - - /** - * @param {Event} evt - */ - markerClick: function(evt) { - sameMarkerClicked = (this == this.layer.selectedFeature); - this.layer.selectedFeature = (!sameMarkerClicked) ? this : null; - for(var i=0; i < this.layer.map.popups.length; i++) { - this.layer.map.removePopup(this.layer.map.popups[i]); - } - if (!sameMarkerClicked) { - var popup = this.createPopup(); - OpenLayers.Event.observe(popup.div, "click", - function() { - for(var i=0; i < this.layer.map.popups.length; i++) { - this.layer.map.removePopup(this.layer.map.popups[i]); - } - }.bindAsEventListener(this)); - this.layer.map.addPopup(popup); - } - OpenLayers.Event.stop(evt); - }, - - /** - * - */ - clearFeatures: function() { - if (this.features != null) { - while(this.features.length > 0) { - var feature = this.features[0]; - OpenLayers.Util.removeItem(this.features, feature); - feature.destroy(); - } - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Layer.GeoRSS" -}); - - diff --git a/pacotes/openlayers/lib/OpenLayers/Layer/Google.js b/pacotes/openlayers/lib/OpenLayers/Layer/Google.js deleted file mode 100644 index 7a4bfaa..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer/Google.js +++ /dev/null @@ -1,384 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Layer/EventPane.js - * @requires OpenLayers/Layer/FixedZoomLevels.js - */ -OpenLayers.Layer.Google = OpenLayers.Class.create(); -OpenLayers.Layer.Google.prototype = - OpenLayers.Class.inherit( OpenLayers.Layer.EventPane, - OpenLayers.Layer.FixedZoomLevels, { - - /** @final @type int */ - MIN_ZOOM_LEVEL: 0, - - /** @final @type int */ - MAX_ZOOM_LEVEL: 19, - - /** Hardcode these resolutions so that they are more closely - * tied with the standard wms projection - * - * @final @type Array(float) */ - RESOLUTIONS: [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,.00002145767211914062,.00001072883605957031,.00000536441802978515,.00000268220901489257], - - /** @type GMapType */ - type: null, - - /** - * @constructor - * - * @param {String} name - */ - initialize: function(name, options) { - OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments); - OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, - arguments); - this.addContainerPxFunction(); - }, - - /** Load the GMap and register appropriate event listeners. If we can't - * load GMap2, then display a warning message. - * - * @private - */ - loadMapObject:function() { - - //has gmaps library has been loaded? - try { - // create GMap, hide nav controls - this.mapObject = new GMap2( this.div ); - - // move the ToS and branding stuff up to the pane - // thanks a *mil* Erik for thinking of this - var poweredBy = this.div.lastChild; - this.div.removeChild(poweredBy); - this.pane.appendChild(poweredBy); - poweredBy.className = "olLayerGooglePoweredBy gmnoprint"; - poweredBy.style.left = ""; - poweredBy.style.bottom = ""; - - var termsOfUse = this.div.lastChild; - this.div.removeChild(termsOfUse); - this.pane.appendChild(termsOfUse); - termsOfUse.className = "olLayerGoogleCopyright"; - termsOfUse.style.right = ""; - termsOfUse.style.bottom = ""; - - } catch (e) { - // do not crash - } - - }, - - /** Overridden from EventPane because if a map type has been specified, - * we need to attach a listener for the first moveend -- this is how - * we will know that the map has been centered. Only once the map has - * been centered is it safe to change the gmap object's map type. - * - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - OpenLayers.Layer.EventPane.prototype.setMap.apply(this, arguments); - - if (this.type != null) { - this.map.events.register("moveend", this, this.setMapType); - } - }, - - /** The map has been centered, and a map type was specified, so we - * set the map type on the gmap object, then unregister the listener - * so that we dont keep doing this every time the map moves. - * - * @private - */ - setMapType: function() { - if (this.mapObject.getCenter() != null) { - this.mapObject.setMapType(this.type); - this.map.events.unregister("moveend", this, this.setMapType); - } - }, - - /** - * @param {Event} evt - */ - onMapResize: function() { - this.mapObject.checkResize(); - }, - - - /** - * @param {OpenLayers.Bounds} bounds - * - * @returns Corresponding zoom level for a specified Bounds. - * If mapObject is not loaded or not centered, returns null - * @type int - * - getZoomForExtent: function (bounds) { - var zoom = null; - if (this.mapObject != null) { - var moBounds = this.getMapObjectBoundsFromOLBounds(bounds); - var moZoom = this.getMapObjectZoomFromMapObjectBounds(moBounds); - - //make sure zoom is within bounds - var moZoom = Math.min(Math.max(moZoom, this.minZoomLevel), - this.maxZoomLevel); - - zoom = this.getOLZoomFromMapObjectZoom(moZoom); - } - return zoom; - }, - - */ - - // - // TRANSLATION: MapObject Bounds <-> OpenLayers.Bounds - // - - /** - * @param {Object} moBounds - * - * @returns An OpenLayers.Bounds, translated from the passed-in - * MapObject Bounds - * Returns null if null value is passed in - * @type OpenLayers.Bounds - */ - getOLBoundsFromMapObjectBounds: function(moBounds) { - var olBounds = null; - if (moBounds != null) { - var sw = moBounds.getSouthWest(); - var ne = moBounds.getNorthEast(); - olBounds = new OpenLayers.Bounds(sw.lng(), - sw.lat(), - ne.lng(), - ne.lat() ); - } - return olBounds; - }, - - /** - * @param {OpenLayers.Bounds} olBounds - * - * @returns A MapObject Bounds, translated from olBounds - * Returns null if null value is passed in - * @type Object - */ - getMapObjectBoundsFromOLBounds: function(olBounds) { - var moBounds = null; - if (olBounds != null) { - var sw = new GLatLng(olBounds.bottom, olBounds.left); - var ne = new GLatLng(olBounds.top, olBounds.right); - moBounds = new GLatLngBounds(sw, ne); - } - return moBounds; - }, - - - - - - /** Hack-on function because GMAPS does not give it to us - * - * @param {GLatLng} gLatLng - * - * @returns A GPoint specifying gLatLng translated into "Container" coords - * @type GPoint - */ - addContainerPxFunction: function() { - if (typeof GMap2 != "undefined" && !GMap2.fromLatLngToContainerPixel) { - - GMap2.prototype.fromLatLngToContainerPixel = function(gLatLng) { - - // first we translate into "DivPixel" - var gPoint = this.fromLatLngToDivPixel(gLatLng); - - // locate the sliding "Div" div - // it seems like "b" is the main div - var div = this.b.firstChild.firstChild; - - // adjust by the offset of "Div" and voila! - gPoint.x += div.offsetLeft; - gPoint.y += div.offsetTop; - - return gPoint; - }; - } - }, - - /** - * @return String with information on why layer is broken, how to get - * it working. - * @type String - */ - getWarningHTML:function() { - - var html = ""; - html += "The Google Layer was unable to load correctly.
"; - html += "
"; - html += "To get rid of this message, select a new BaseLayer " - html += "in the layer switcher in the upper-right corner.
"; - html += "
"; - html += "Most likely, this is because the Google Maps library"; - html += " script was either not included, or does not contain the"; - html += " correct API key for your site.
"; - html += "
"; - html += "Developers: For help getting this working correctly, "; - html += " -this.tileSize.w * (buffer - 1)) { - this.shiftColumn(true); - } else if (tlViewPort.x < -this.tileSize.w * buffer) { - this.shiftColumn(false); - } else if (tlViewPort.y > -this.tileSize.h * (buffer - 1)) { - this.shiftRow(true); - } else if (tlViewPort.y < -this.tileSize.h * buffer) { - this.shiftRow(false); - } else { - break; - } - }; - if (this.buffer == 0) { - for (var r=0, rl=this.grid.length; r= bounds.bottom - tilelat * this.buffer) - || rowidx < minRows) - - // remove extra rows - while (this.grid.length > rowidx) { - var row = this.grid.pop(); - for (var i=0, l=row.length; i colidx) { - for (var i=0, l=this.grid.length; i= 0) && - (testCell < this.grid[0].length) && (testCell >= 0)) { - tile = this.grid[testRow][testCell]; - } - - if ((tile != null) && (!tile.queued)) { - //add tile to beginning of queue, mark it as queued. - tileQueue.unshift(tile); - tile.queued = true; - - //restart the directions counter and take on the new coords - directionsTried = 0; - iRow = testRow; - iCell = testCell; - } else { - //need to try to load a tile in a different direction - direction = (direction + 1) % 4; - directionsTried++; - } - } - - // now we go through and draw the tiles in forward order - for(var i=0; i < tileQueue.length; i++) { - var tile = tileQueue[i] - tile.draw(); - //mark tile as unqueued for the next time (since tiles are reused) - tile.queued = false; - } - }, - - /** - * addTile gives subclasses of Grid the opportunity to create an - * OpenLayer.Tile of their choosing. The implementer should initialize - * the new tile and take whatever steps necessary to display it. - * - * @param {OpenLayers.Bounds} bounds - * - * @returns The added OpenLayers.Tile - * @type OpenLayers.Tile - */ - addTile:function(bounds, position) { - // Should be implemented by subclasses - }, - - /** - * Once params have been changed, we will need to re-init our tiles - * - * @param {Object} newParams Hashtable of new params to use - */ - mergeNewParams:function(newArguments) { - OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this, - [newArguments]); - - if (this.map != null) { - this._initTiles(); - } - }, - - - /** - * @private - * - * @param {Boolean} prepend if true, prepend to beginning. - * if false, then append to end - */ - shiftRow:function(prepend) { - var modelRowIndex = (prepend) ? 0 : (this.grid.length - 1); - var modelRow = this.grid[modelRowIndex]; - - var resolution = this.map.getResolution(); - var deltaY = (prepend) ? -this.tileSize.h : this.tileSize.h; - var deltaLat = resolution * -deltaY; - - var row = (prepend) ? this.grid.pop() : this.grid.shift(); - - for (var i=0; i < modelRow.length; i++) { - var modelTile = modelRow[i]; - var bounds = modelTile.bounds.clone(); - var position = modelTile.position.clone(); - bounds.bottom = bounds.bottom + deltaLat; - bounds.top = bounds.top + deltaLat; - position.y = position.y + deltaY; - row[i].moveTo(bounds, position); - } - - if (prepend) { - this.grid.unshift(row); - } else { - this.grid.push(row); - } - }, - - /** - * @private - * - * @param {Boolean} prepend if true, prepend to beginning. - * if false, then append to end - */ - shiftColumn: function(prepend) { - var deltaX = (prepend) ? -this.tileSize.w : this.tileSize.w; - var resolution = this.map.getResolution(); - var deltaLon = resolution * deltaX; - - for (var i=0; i= bounds.bottom - tilelat * this.buffer) - - this.spiralTileLoad(); - - }, - - /** - * @param {Object} obj - * - * @returns An exact clone of this OpenLayers.Layer.Grid - * @type OpenLayers.Layer.Grid - */ - clone: function (obj) { - - if (obj == null) { - obj = new OpenLayers.Layer.KaMap(this.name, - this.url, - this.params, - this.options); - } - - //get all additions from superclasses - obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]); - - // copy/set any non-init, non-simple values here - if (this.tileSize != null) { - obj.tileSize = this.tileSize.clone(); - } - - // we do not want to copy reference to grid, so we make a new array - obj.grid = new Array(); - - return obj; - }, - - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Layer.KaMap" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Layer/MapServer.js b/pacotes/openlayers/lib/OpenLayers/Layer/MapServer.js deleted file mode 100644 index 576b209..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer/MapServer.js +++ /dev/null @@ -1,173 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ -// @requires OpenLayers/Layer/Grid.js -/** -* @class - * @requires OpenLayers/Layer/Grid.js -*/ -OpenLayers.Layer.MapServer = OpenLayers.Class.create(); -OpenLayers.Layer.MapServer.prototype = - OpenLayers.Class.inherit( OpenLayers.Layer.Grid, { - - /** @final @type hash */ - DEFAULT_PARAMS: { - mode: "map", - map_imagetype: "png" - }, - - /** - * @constructor - * - * @param {str} name - * @param {str} url - * @param {hash} params - */ - initialize: function(name, url, params, options) { - var newArguments = new Array(); - newArguments.push(name, url, params, options); - OpenLayers.Layer.Grid.prototype.initialize.apply(this, newArguments); - - if (arguments.length > 0) { - OpenLayers.Util.applyDefaults( - this.params, - this.DEFAULT_PARAMS - ); - } - - // unless explicitly set in options, if the layer is transparent, - // it will be an overlay - if (options == null || options.isBaseLayer == null) { - this.isBaseLayer = ((this.params.transparent != "true") && - (this.params.transparent != true)); - } - }, - - /** - * @param {Object} obj - * - * @returns A clone of this OpenLayers.Layer.MapServer - * @type OpenLayers.Layer.MapServer - */ - clone: function (obj) { - if (obj == null) { - obj = new OpenLayers.Layer.MapServer(this.name, - this.url, - this.params, - this.options); - } - //get all additions from superclasses - obj = OpenLayers.Layer.Grid.prototype.clone.apply(this, [obj]); - - // copy/set any non-init, non-simple values here - - return obj; - }, - - /** - * addTile creates a tile, initializes it (via 'draw' in this case), and - * adds it to the layer div. - * - * @param {OpenLayers.Bounds} bounds - * - * @returns The added OpenLayers.Tile.Image - * @type OpenLayers.Tile.Image - */ - addTile:function(bounds,position) { - var url = this.getURL(bounds); - return new OpenLayers.Tile.Image(this, position, bounds, url, this.tileSize); - }, - - /** - * @param {OpenLayers.Bounds} bounds - * - * @returns A string with the layer's url and parameters and also the - * passed-in bounds and appropriate tile size specified as - * parameters - * @type String - */ - getURL: function (bounds) { - if(this.gutter) { - bounds = this.adjustBoundsByGutter(bounds); - } - // Make a list, so that getFullRequestString uses literal "," - var extent = [bounds.left, bounds. bottom, bounds.right, bounds.top]; - - // make lists, so that literal ','s are used - var url = this.getFullRequestString( - {mapext: extent, - imgext: extent, - map_size: [this.imageSize.w, this.imageSize.h], - imgx: this.imageSize.w / 2, - imgy: this.imageSize.h / 2, - imgxy: [this.imageSize.w, this.imageSize.h] - }); - - return url; - }, - - /** - * getFullRequestString on MapServer layers is special, because we - * do a regular expression replace on ',' in parameters to '+'. - * This is why it is subclassed here. - * - * @param {Object} newParams Parameters to add to the default parameters - * for the layer. - * @param {String} altUrl Alternative base URL to use. - */ - getFullRequestString:function(newParams, altUrl) { - - - // use layer's url unless altUrl passed in - var url = (altUrl == null) ? this.url : altUrl; - - // if url is not a string, it should be an array of strings, - // in which case we will randomly select one of them in order - // to evenly distribute requests to different urls. - if (typeof url == "object") { - url = url[Math.floor(Math.random()*url.length)]; - } - // requestString always starts with url - var requestString = url; - - // create a new params hashtable with all the layer params and the - // new params together. then convert to string - var allParams = OpenLayers.Util.extend(new Object(), this.params); - allParams = OpenLayers.Util.extend(allParams, newParams); - // ignore parameters that are already in the url search string - var urlParams = OpenLayers.Util.upperCaseObject( - OpenLayers.Util.getArgs(url)); - for(var key in allParams) { - if(key.toUpperCase() in urlParams) { - delete allParams[key]; - } - } - var paramsString = OpenLayers.Util.getParameterString(allParams); - - /* MapServer needs '+' seperating things like bounds/height/width. - Since typically this is URL encoded, we use a slight hack: we - depend on the list-like functionality of getParameterString to - leave ',' only in the case of list items (since otherwise it is - encoded) then do a regular expression replace on the , characters - to '+' */ - paramsString = paramsString.replace(/,/g, "+"); - - if (paramsString != "") { - var lastServerChar = url.charAt(url.length - 1); - if ((lastServerChar == "&") || (lastServerChar == "?")) { - requestString += paramsString; - } else { - if (url.indexOf('?') == -1) { - //serverPath has no ? -- add one - requestString += '?' + paramsString; - } else { - //serverPath contains ?, so must already have paramsString at the end - requestString += '&' + paramsString; - } - } - } - return requestString; - }, - /** @final @type String */ - CLASS_NAME: "OpenLayers.Layer.MapServer" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Layer/MapServer/Untiled.js b/pacotes/openlayers/lib/OpenLayers/Layer/MapServer/Untiled.js deleted file mode 100644 index db75cce..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer/MapServer/Untiled.js +++ /dev/null @@ -1,245 +0,0 @@ -/* Copyright (c) 2006-2007 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/* Derived from the WMS/Untiled.js script by Stephen Woodbridge, 2007 */ - - -/** - * @class - * - * @requires OpenLayers/Layer/HTTPRequest.js - * @requires OpenLayers/Layer/MapServer.js - */ -OpenLayers.Layer.MapServer.Untiled = OpenLayers.Class.create(); -OpenLayers.Layer.MapServer.Untiled.prototype = - OpenLayers.Class.inherit( OpenLayers.Layer.HTTPRequest, { - - /** Hashtable of default parameter key/value pairs - * @final @type Object */ - default_params: { - mode: "map", - map_imagetype: "png" - }, - reproject: true, - - /** the ratio of image/tile size to map size (this is the untiled buffer) - * @type int */ - ratio: 1, - - /** @type OpenLayers.Tile.Image */ - tile: null, - - /** did the image finish loading before a new draw was initiated? - * @type Boolean */ - doneLoading: false, - - /** - * @constructor - * - * @param {String} name - * @param {String} url - * @param {Object} params - */ - initialize: function(name, url, params, options) { - var newArguments = []; - newArguments.push(name, url, params, options); - OpenLayers.Layer.HTTPRequest.prototype.initialize.apply(this, - newArguments); - OpenLayers.Util.applyDefaults( - this.params, - this.default_params - ); - - // unless explicitly set in options, if the layer is transparent, - // it will be an overlay - if ((options == null) || (options.isBaseLayer == null)) { - this.isBaseLayer = ((this.params.transparent != "true") && - (this.params.transparent != true)); - } - }, - - /** - * - */ - destroy: function() { - if (this.tile) { - this.tile.destroy(); - this.tile = null; - } - OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments); - }, - - /** - * @param {Object} obj - * - * @returns An exact clone of this OpenLayers.Layer.MapServer.Untiled - * @type OpenLayers.Layer.MapServer.Untiled - */ - clone: function (obj) { - - if (obj == null) { - obj = new OpenLayers.Layer.MapServer.Untiled(this.name, - this.url, - this.params, - this.options); - } - - //get all additions from superclasses - obj = OpenLayers.Layer.HTTPRequest.prototype.clone.apply(this, [obj]); - - // copy/set any non-init, non-simple values here - - return obj; - }, - - - /** Once HTTPRequest has set the map, we can load the image div - * - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - OpenLayers.Layer.HTTPRequest.prototype.setMap.apply(this, arguments); - }, - - /** - * Set the tile size based on the map size. This also sets layer.imageSize - * and layer.imageOffset for use by Tile.Image. - */ - setTileSize: function() { - var tileSize = this.map.getSize(); - tileSize.w = tileSize.w * this.ratio; - tileSize.h = tileSize.h * this.ratio; - this.tileSize = tileSize; - this.imageSize = tileSize; - this.imageOffset = new OpenLayers.Pixel(0, 0); - }, - - /** When it is not a dragging move (ie when done dragging) - * reload and recenter the div. - * - * @param {OpenLayers.Bounds} bounds - * @param {Boolean} zoomChanged - * @param {Boolean} dragging - */ - moveTo:function(bounds, zoomChanged, dragging) { - if (!this.doneLoading) { - this.events.triggerEvent("loadcancel"); - this.doneLoading = true; - } - OpenLayers.Layer.HTTPRequest.prototype.moveTo.apply(this,arguments); - - if (bounds == null) { - bounds = this.map.getExtent(); - } - - var firstRendering = (this.tile == null); - - //does the new bounds to which we need to move fall outside of the - // current tile's bounds? - var outOfBounds = (!firstRendering && - !this.tile.bounds.containsBounds(bounds)); - - if ( zoomChanged || firstRendering || (!dragging && outOfBounds) ) { - - //clear out the old tile - if (this.tile) { - this.tile.clear(); - } - - //determine new tile bounds - var center = bounds.getCenterLonLat(); - var tileWidth = bounds.getWidth() * this.ratio; - var tileHeight = bounds.getHeight() * this.ratio; - var tileBounds = - new OpenLayers.Bounds(center.lon - (tileWidth / 2), - center.lat - (tileHeight / 2), - center.lon + (tileWidth / 2), - center.lat + (tileHeight / 2)); - - //determine new tile size - this.setTileSize(); - - //formulate request url string - var url = this.getURL(tileBounds); - - //determine new position (upper left corner of new bounds) - var ul = new OpenLayers.LonLat(tileBounds.left, tileBounds.top); - var pos = this.map.getLayerPxFromLonLat(ul); - - if ( this.tile && !this.tile.size.equals(this.tileSize)) { - this.tile.destroy(); - this.tile = null; - } - - this.events.triggerEvent("loadstart"); - this.doneLoading = false; - if (!this.tile) { - this.tile = new OpenLayers.Tile.Image(this, pos, tileBounds, - url, this.tileSize); - this.tile.draw(); - var onload = function() { - this.doneLoading = true; - this.events.triggerEvent("loadend"); - } - OpenLayers.Event.observe(this.tile.imgDiv, 'load', - onload.bindAsEventListener(this)); - } else { - this.tile.moveTo(tileBounds, pos); - } - - } - }, - - getURL: function(bounds) { - var url = this.getFullRequestString( - {mapext:bounds.toBBOX().replace(/,/g," "), - imgext:bounds.toBBOX().replace(/,/g," "), - map_size: this.tileSize.w + " " + this.tileSize.h, - imgx: this.tileSize.w / 2, - imgy: this.tileSize.h / 2, - imgxy: this.tileSize.w + " " + this.tileSize.h - }); - return url; - }, - - - /** Once HTTPRequest has updated the url, reload the image div - * @param {String} newUrl - */ - setUrl: function(newUrl) { - OpenLayers.Layer.HTTPRequest.prototype.setUrl.apply(this, arguments); - this.moveTo(); - }, - - /** Once HTTPRequest has updated new params, reload the image div - * @param {Object} newParams - */ - mergeNewParams:function(newParams) { - OpenLayers.Layer.HTTPRequest.prototype.mergeNewParams.apply(this, - [newParams]); - //redraw - this.moveTo(null, true); - }, - - /** combine the layer's url with its params and these newParams. - * - * Add the SRS parameter from 'projection' -- this is probably - * more eloquently done via a setProjection() method, but this - * works for now and always. - * - * @param {Object} newParams - * - * @type String - */ - getFullRequestString:function(newParams) { - var projection = this.map.getProjection(); - this.params.srs = (projection == "none") ? null : projection; - - return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply( - this, arguments); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Layer.MapServer.Untiled" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Layer/Markers.js b/pacotes/openlayers/lib/OpenLayers/Layer/Markers.js deleted file mode 100644 index b48f35d..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer/Markers.js +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Layer.js - */ -OpenLayers.Layer.Markers = OpenLayers.Class.create(); -OpenLayers.Layer.Markers.prototype = - OpenLayers.Class.inherit( OpenLayers.Layer, { - - /** Markers layer is never a base layer. - * - * @type Boolean - */ - isBaseLayer: false, - - /** internal marker list - * @type Array(OpenLayers.Marker) */ - markers: null, - - - /** internal state of drawing. This is a workaround for the fact - * that the map does not call moveTo with a zoomChanged when the - * map is first starting up. This lets us catch the case where we - * have *never* drawn the layer, and draw it even if the zoom hasn't - * changed. - * @type Boolean */ - drawn: false, - - /** - * @constructor - * - * @param {String} name - * @param {Object} options Hashtable of extra options to tag onto the layer - */ - initialize: function(name, options) { - OpenLayers.Layer.prototype.initialize.apply(this, arguments); - this.markers = new Array(); - }, - - /** - * - */ - destroy: function() { - this.clearMarkers(); - markers = null; - OpenLayers.Layer.prototype.destroy.apply(this, arguments); - }, - - - /** - * @param {OpenLayers.Bounds} bounds - * @param {Boolean} zoomChanged - * @param {Boolean} dragging - */ - moveTo:function(bounds, zoomChanged, dragging) { - OpenLayers.Layer.prototype.moveTo.apply(this, arguments); - - if (zoomChanged || !this.drawn) { - this.redraw(); - this.drawn = true; - } - }, - - /** - * @param {OpenLayers.Marker} marker - */ - addMarker: function(marker) { - this.markers.push(marker); - if (this.map && this.map.getExtent()) { - marker.map = this.map; - this.drawMarker(marker); - } - }, - - /** - * @param {OpenLayers.Marker} marker - */ - removeMarker: function(marker) { - OpenLayers.Util.removeItem(this.markers, marker); - if ((marker.icon != null) && (marker.icon.imageDiv != null) && - (marker.icon.imageDiv.parentNode == this.div) ) { - this.div.removeChild(marker.icon.imageDiv); - } - }, - - /** - * - */ - clearMarkers: function() { - if (this.markers != null) { - while(this.markers.length > 0) { - this.removeMarker(this.markers[0]); - } - } - }, - - /** clear all the marker div's from the layer and then redraw all of them. - * Use the map to recalculate new placement of markers. - */ - redraw: function() { - for(i=0; i < this.markers.length; i++) { - this.drawMarker(this.markers[i]); - } - }, - - /** Calculate the pixel location for the marker, create it, and - * add it to the layer's div - * - * @private - * - * @param {OpenLayers.Marker} marker - */ - drawMarker: function(marker) { - var px = this.map.getLayerPxFromLonLat(marker.lonlat); - if (px == null) { - marker.display(false); - } else { - var markerImg = marker.draw(px); - if (!marker.drawn) { - this.div.appendChild(markerImg); - marker.drawn = true; - } - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Layer.Markers" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Layer/MultiMap.js b/pacotes/openlayers/lib/OpenLayers/Layer/MultiMap.js deleted file mode 100644 index ba49ff7..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer/MultiMap.js +++ /dev/null @@ -1,214 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Layer/EventPane.js - * @requires OpenLayers/Layer/FixedZoomLevels.js - */ -OpenLayers.Layer.MultiMap = OpenLayers.Class.create(); -OpenLayers.Layer.MultiMap.prototype = - OpenLayers.Class.inherit( OpenLayers.Layer.EventPane, - OpenLayers.Layer.FixedZoomLevels, { - - /** @final @type int */ - MIN_ZOOM_LEVEL: 1, - - /** @final @type int */ - MAX_ZOOM_LEVEL: 17, - - /** Hardcode these resolutions so that they are more closely - * tied with the standard wms projection - * - * @final @type Array(float) */ - RESOLUTIONS: [9, 1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125], - - /** @type VEMapType */ - type: null, - - /** - * @constructor - * - * @param {String} name - */ - initialize: function(name, options) { - OpenLayers.Layer.EventPane.prototype.initialize.apply(this, arguments); - OpenLayers.Layer.FixedZoomLevels.prototype.initialize.apply(this, - arguments); - }, - - /** - * - */ - loadMapObject:function() { - try { //crash proofing - this.mapObject = new MultimapViewer(this.div); - } catch (e) { } - }, - - /** - * @return String with information on why layer is broken, how to get - * it working. - * @type String - */ - getWarningHTML:function() { - - var html = ""; - html += "The MM Layer was unable to load correctly.
"; - html += "
"; - html += "To get rid of this message, select a new BaseLayer " - html += "in the layer switcher in the upper-right corner.
"; - html += "
"; - html += "Most likely, this is because the MM library"; - html += " script was either not correctly included.
"; - html += "
"; - html += "Demmlopers: For help getting this working correctly, "; - html += "

'+description+'

'; - } - var feature = new OpenLayers.Feature(this, location, data); - this.features.push(feature); - var marker = feature.createMarker(); - if ((title != null) && (description != null)) { - marker.events.register('click', feature, this.markerClick); - } - this.addMarker(marker); - } - } - } - } - }, - - /** - * @param {Event} evt - */ - markerClick: function(evt) { - sameMarkerClicked = (this == this.layer.selectedFeature); - this.layer.selectedFeature = (!sameMarkerClicked) ? this : null; - for(var i=0; i < this.layer.map.popups.length; i++) { - this.layer.map.removePopup(this.layer.map.popups[i]); - } - if (!sameMarkerClicked) { - this.layer.map.addPopup(this.createPopup()); - } - OpenLayers.Event.stop(evt); - }, - - /** - * - */ - clearFeatures: function() { - if (this.features != null) { - while(this.features.length > 0) { - var feature = this.features[0]; - OpenLayers.Util.removeItem(this.features, feature); - feature.destroy(); - } - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Layer.Text" -}); - - diff --git a/pacotes/openlayers/lib/OpenLayers/Layer/Vector.js b/pacotes/openlayers/lib/OpenLayers/Layer/Vector.js deleted file mode 100644 index 14b96e0..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Layer/Vector.js +++ /dev/null @@ -1,371 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Layer.js - * @requires OpenLayers/Renderer.js - * @requires OpenLayers/Feature/Vector.js - */ -OpenLayers.Layer.Vector = OpenLayers.Class.create(); -OpenLayers.Layer.Vector.prototype = - OpenLayers.Class.inherit(OpenLayers.Layer, { - - /** @type Boolean */ - isBaseLayer: false, - - /** @type Boolean */ - isFixed: false, - - /** @type Boolean */ - isVector: true, - - /** @type Array(OpenLayer.Feature.Vector) */ - features: null, - - /** @type Array(OpenLayers.Feature.Vector) */ - selectedFeatures: null, - - /** @type {Boolean} */ - reportError: true, - - /** @type {Object} */ - style: null, - - /** - * List of supported Renderer classes. Add to this list to - * add support for additional renderers. This list is ordered: - * the first renderer which returns true for the 'supported()' - * method will be used, if not defined in the 'renderer' option. - * - * @type {Array(String)} - */ - renderers: ['SVG', 'VML'], - - /** @type OpenLayers.Renderer */ - renderer: null, - - /** - * geometryType allows you to limit the types of geometries this - * layer supports. This should be set to something like - * "OpenLayers.Geometry.Point" to limit types. - * - * @type string - */ - geometryType: null, - - /** Whether the Vector Layer features have been drawn yet. - * - * @type boolean - */ - drawn: false, - - /** - * @constructor - * - * @param {String} name - * @param {Object} options Hashtable of extra options to tag onto the layer. - * Options renderer {Object}: Typically SVGRenderer or VMLRenderer. - */ - initialize: function(name, options) { - - var defaultStyle = OpenLayers.Feature.Vector.style['default']; - this.style = OpenLayers.Util.extend({}, defaultStyle); - - OpenLayers.Layer.prototype.initialize.apply(this, arguments); - - // allow user-set renderer, otherwise assign one - if (!this.renderer || !this.renderer.supported()) { - this.assignRenderer(); - } - - // if no valid renderer found, display error - if (!this.renderer || !this.renderer.supported()) { - this.renderer = null; - this.displayError(); - } - - this.features = new Array(); - this.selectedFeatures = new Array(); - }, - - /** - * - */ - destroy: function() { - OpenLayers.Layer.prototype.destroy.apply(this, arguments); - - this.destroyFeatures(); - this.features = null; - this.selectedFeatures = null; - if (this.renderer) { - this.renderer.destroy(); - } - this.renderer = null; - this.geometryType = null; - this.drawn = null; - }, - - /** Iterates through the available renderer implementations and selects - * and assigns the first one whose "supported()" function returns true. - * - * @private - * - */ - assignRenderer: function() { - for (var i = 0; i < this.renderers.length; i++) { - var rendererClass = OpenLayers.Renderer[this.renderers[i]]; - if (rendererClass && rendererClass.prototype.supported()) { - this.renderer = new rendererClass(this.div); - break; - } - } - }, - - /** - * Let the user know their browser isn't supported. - * - * @private - * - */ - displayError: function() { - if (this.reportError) { - var message = "Your browser does not support vector rendering. " + - "Currently supported renderers are:\n"; - message += this.renderers.join("\n"); - alert(message); - } - }, - - /** The layer has been added to the map. - * - * If there is no renderer set, the layer can't be used. Remove it. - * Otherwise, give the renderer a reference to the map and set its size. - * - * @param {OpenLayers.Map} map - */ - setMap: function(map) { - OpenLayers.Layer.prototype.setMap.apply(this, arguments); - - if (!this.renderer) { - this.map.removeLayer(this); - } else { - this.renderer.map = this.map; - this.renderer.setSize(this.map.getSize()); - } - }, - - /** Notify the renderer of the change in size. - * - */ - onMapResize: function() { - OpenLayers.Layer.prototype.onMapResize.apply(this, arguments); - this.renderer.setSize(this.map.getSize()); - }, - - /** Reset the vector layer's div so that it once again is lined up with - * the map. Notify the renderer of the change of extent, and in the - * case of a change of zoom level (resolution), have the - * renderer redraw features. - * - * If the layer has not yet been drawn, cycle through the layer's - * features and draw each one. - * - * @param {OpenLayers.Bounds} bounds - * @param {Boolean} zoomChanged - * @param {Boolean} dragging - */ - moveTo: function(bounds, zoomChanged, dragging) { - OpenLayers.Layer.prototype.moveTo.apply(this, arguments); - - if (!dragging) { - this.div.style.left = - parseInt(this.map.layerContainerDiv.style.left) + "px"; - this.div.style.top = - parseInt(this.map.layerContainerDiv.style.top) + "px"; - var extent = this.map.getExtent(); - this.renderer.setExtent(extent); - } - - if (!this.drawn || zoomChanged) { - this.drawn = true; - for(var i = 0; i < this.features.length; i++) { - var feature = this.features[i]; - this.drawFeature(feature); - } - } - }, - - /** - * @param {Array(OpenLayers.Feature.Vector} features - */ - addFeatures: function(features) { - if (!(features instanceof Array)) { - features = [features]; - } - - for (var i = 0; i < features.length; i++) { - var feature = features[i]; - - if (this.geometryType && - !(feature.geometry instanceof this.geometryType)) { - var throwStr = "addFeatures : component should be an " + - this.geometryType.prototype.CLASS_NAME; - throw throwStr; - } - - this.features.push(feature); - - //give feature reference to its layer - feature.layer = this; - - if (!feature.style) { - feature.style = OpenLayers.Util.extend({}, this.style); - } - - this.preFeatureInsert(feature); - - if (this.drawn) { - this.drawFeature(feature); - } - - this.onFeatureInsert(feature); - } - }, - - - /** - * @param {Array(OpenLayers.Feature.Vector} features - */ - removeFeatures: function(features) { - if (!(features instanceof Array)) { - features = [features]; - } - - for (var i = features.length - 1; i >= 0; i--) { - var feature = features[i]; - this.features = OpenLayers.Util.removeItem(this.features, feature); - - if (feature.geometry) { - this.renderer.eraseGeometry(feature.geometry); - } - - //in the case that this feature is one of the selected features, - // remove it from that array as well. - if (OpenLayers.Util.indexOf(this.selectedFeatures, feature) != -1){ - OpenLayers.Util.removeItem(this.selectedFeatures, feature); - } - } - }, - - /** - * Destroy all features on the layer and empty the selected features array. - */ - destroyFeatures: function () { - this.selectedFeatures = new Array(); - for (var i = this.features.length - 1; i >= 0; i--) { - this.features[i].destroy(); - } - }, - - /** - * Draw (or redraw) a feature on the layer. If the optional style argument - * is included, this style will be used. If no style is included, the - * feature's style will be used. If the feature doesn't have a style, - * the layer's style will be used. - * - * @param {OpenLayers.Feature.Vector} feature - * @param {Object} style - */ - drawFeature: function(feature, style) { - if(style == null) { - if(feature.style) { - style = feature.style; - } else { - style = this.style; - } - } - this.renderer.drawFeature(feature, style); - }, - - /** - * Erase features from the layer. - * - * @param {Array(OpenLayers.Feature.Vector)} features - */ - eraseFeatures: function(features) { - this.renderer.eraseFeatures(features); - }, - - /** - * Given an event, return a feature if the event occurred over one. - * Otherwise, return null. - * - * @param {Event} - * @type OpenLayers.Feature.Vector - * @return A feature if one was under the event - */ - getFeatureFromEvent: function(evt) { - var featureId = this.renderer.getFeatureIdFromEvent(evt); - return this.getFeatureById(featureId); - }, - - /** - * Given a feature id, return the feature if it exists in the features array - * - * @param String featureId - * @type OpenLayers.Feature.Vector - * @return A feature corresponding to the given featureId - */ - getFeatureById: function(featureId) { - //TBD - would it be more efficient to use a hash for this.features? - var feature = null; - for(var i=0; i OpenLayers Zoom - // - - /** - * @param {int} gZoom - * - * @returns An OpenLayers Zoom level, translated from the passed in gZoom - * Returns null if null value is passed in - * @type int - */ - getOLZoomFromMapObjectZoom: function(moZoom) { - var zoom = null; - if (moZoom != null) { - zoom = OpenLayers.Layer.FixedZoomLevels.prototype.getOLZoomFromMapObjectZoom.apply(this, [moZoom]); - zoom = 18 - zoom; - } - return zoom; - }, - - /** - * @param {int} olZoom - * - * @returns A MapObject level, translated from the passed in olZoom - * Returns null if null value is passed in - * @type int - */ - getMapObjectZoomFromOLZoom: function(olZoom) { - var zoom = null; - if (olZoom != null) { - zoom = OpenLayers.Layer.FixedZoomLevels.prototype.getMapObjectZoomFromOLZoom.apply(this, [olZoom]); - zoom = 18 - zoom; - } - return zoom; - }, - - /************************************ - * * - * MapObject Interface Controls * - * * - ************************************/ - - - // Get&Set Center, Zoom - - /** Set the mapObject to the specified center and zoom - * - * @param {Object} center MapObject LonLat format - * @param {int} zoom MapObject zoom format - */ - setMapObjectCenter: function(center, zoom) { - this.mapObject.drawZoomAndCenter(center, zoom); - }, - - /** - * @returns the mapObject's current center in Map Object format - * @type Object - */ - getMapObjectCenter: function() { - return this.mapObject.getCenterLatLon(); - }, - - /** - * @returns the mapObject's current zoom, in Map Object format - * @type int - */ - getMapObjectZoom: function() { - return this.mapObject.getZoomLevel(); - }, - - - // LonLat - Pixel Translation - - /** - * @param {Object} moPixel MapObject Pixel format - * - * @returns MapObject LonLat translated from MapObject Pixel - * @type Object - */ - getMapObjectLonLatFromMapObjectPixel: function(moPixel) { - return this.mapObject.convertXYLatLon(moPixel); - }, - - /** - * @param {Object} moPixel MapObject Pixel format - * - * @returns MapObject Pixel translated from MapObject LonLat - * @type Object - */ - getMapObjectPixelFromMapObjectLonLat: function(moLonLat) { - return this.mapObject.convertLatLonXY(moLonLat); - }, - - - /************************************ - * * - * MapObject Primitives * - * * - ************************************/ - - - // LonLat - - /** - * @param {Object} moLonLat MapObject LonLat format - * - * @returns Longitude of the given MapObject LonLat - * @type float - */ - getLongitudeFromMapObjectLonLat: function(moLonLat) { - return moLonLat.Lon; - }, - - /** - * @param {Object} moLonLat MapObject LonLat format - * - * @returns Latitude of the given MapObject LonLat - * @type float - */ - getLatitudeFromMapObjectLonLat: function(moLonLat) { - return moLonLat.Lat; - }, - - /** - * @param {int} lon float - * @param {int} lat float - * - * @returns MapObject LonLat built from lon and lat params - * @type Object - */ - getMapObjectLonLatFromLonLat: function(lon, lat) { - return new YGeoPoint(lat, lon); - }, - - // Pixel - - /** - * @param {Object} moPixel MapObject Pixel format - * - * @returns X value of the MapObject Pixel - * @type int - */ - getXFromMapObjectPixel: function(moPixel) { - return moPixel.x; - }, - - /** - * @param {Object} moPixel MapObject Pixel format - * - * @returns Y value of the MapObject Pixel - * @type int - */ - getYFromMapObjectPixel: function(moPixel) { - return moPixel.y; - }, - - /** - * @param {int} x - * @param {int} y - * - * @returns MapObject Pixel from x and y parameters - * @type Object - */ - getMapObjectPixelFromXY: function(x, y) { - return new YCoordPoint(x, y); - }, - - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Layer.Yahoo" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Map.js b/pacotes/openlayers/lib/OpenLayers/Map.js deleted file mode 100644 index 6b8caf3..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Map.js +++ /dev/null @@ -1,1298 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Util.js - * @requires OpenLayers/Events.js - */ -OpenLayers.Map = OpenLayers.Class.create(); -OpenLayers.Map.TILE_WIDTH = 256; -OpenLayers.Map.TILE_HEIGHT = 256; -OpenLayers.Map.prototype = { - - /** base z-indexes for different classes of thing - * - * @type Object - */ - Z_INDEX_BASE: { BaseLayer: 100, Overlay: 325, Popup: 750, Control: 1000 }, - - /** supported application event types - * - * @type Array */ - EVENT_TYPES: [ - "addlayer", "removelayer", "changelayer", "movestart", "move", - "moveend", "zoomend", "popupopen", "popupclose", - "addmarker", "removemarker", "clearmarkers", "mouseover", - "mouseout", "mousemove", "dragstart", "drag", "dragend", - "changebaselayer"], - - /** @type String */ - id: null, - - /** @type OpenLayers.Events */ - events: null, - - /** function that is called to destroy the map on page unload. stored - * here so that if map is manually destroyed, we can unregister this. - * - * @type Function */ - unloadDestroy: null, - - /** the div that our map lives in - * - * @type DOMElement */ - div: null, - - /** Size of the main div (this.div) - * - * @type OpenLayers.Size */ - size: null, - - /** @type HTMLDivElement */ - viewPortDiv: null, - - /** The lonlat at which the later container was re-initialized (on-zoom) - * @type OpenLayers.LonLat */ - layerContainerOrigin: null, - - /** @type HTMLDivElement */ - layerContainerDiv: null, - - /** ordered list of layers in the map - * - * @type Array(OpenLayers.Layer) - */ - layers: null, - - /** @type Array(OpenLayers.Control) */ - controls: null, - - /** @type Array(OpenLayers.Popup) */ - popups: null, - - /** The currently selected base layer - this determines min/max zoom level, - * projection, etc. - * - * @type OpenLayers.Layer */ - baseLayer: null, - - /** @type OpenLayers.LonLat */ - center: null, - - /** @type int */ - zoom: 0, - - /** Used to store a unique identifier that changes when the map view - * changes. viewRequestID should be used when adding data asynchronously - * to the map: viewRequestID is incremented when you initiate your - * request (right now during changing of baselayers and changing of zooms). - * It is stored here in the map and also in the data that will be coming - * back asynchronously. Before displaying this data on request completion, - * we check that the viewRequestID of the data is still the same as that - * of the map. Fix for #480 - * - * @type String */ - viewRequestID: 0, - - // Options - - /** @type OpenLayers.Size */ - tileSize: null, - - /** @type String */ - projection: "EPSG:4326", - - /** @type String */ - units: 'degrees', - - /** default max is 360 deg / 256 px, which corresponds to - * zoom level 0 on gmaps - * - * @type float */ - maxResolution: 1.40625, - - /** @type float */ - minResolution: null, - - /** @type float */ - maxScale: null, - - /** @type float */ - minScale: null, - - /** @type OpenLayers.Bounds */ - maxExtent: null, - - /** @type OpenLayers.Bounds */ - minExtent: null, - - /** @type int */ - numZoomLevels: 16, - - /** @type string */ - theme: null, - - /** Should OpenLayers allow events on the map to fall through to other - * elements on the page, or should it swallow them? (#457) - * - * Default is to swallow them. - * - * @type boolean - */ - fallThrough: false, - - /** - * @constructor - * - * @param {DOMElement} div - * @param {Object} options Hashtable of extra options to tag onto the map - */ - initialize: function (div, options) { - - //set the default options - this.setOptions(options); - - this.id = OpenLayers.Util.createUniqueID("OpenLayers.Map_"); - - - this.div = div = OpenLayers.Util.getElement(div); - - // the viewPortDiv is the outermost div we modify - var id = div.id + "_OpenLayers_ViewPort"; - this.viewPortDiv = OpenLayers.Util.createDiv(id, null, null, null, - "relative", null, - "hidden"); - this.viewPortDiv.style.width = "100%"; - this.viewPortDiv.style.height = "100%"; - this.viewPortDiv.className = "olMapViewport"; - this.div.appendChild(this.viewPortDiv); - - // the layerContainerDiv is the one that holds all the layers - id = div.id + "_OpenLayers_Container"; - this.layerContainerDiv = OpenLayers.Util.createDiv(id); - this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1; - - this.viewPortDiv.appendChild(this.layerContainerDiv); - - this.events = new OpenLayers.Events(this, div, this.EVENT_TYPES, this.fallThrough); - this.updateSize(); - - // update the map size and location before the map moves - this.events.register("movestart", this, this.updateSize); - - // Because Mozilla does not support the "resize" event for elements other - // than "window", we need to put a hack here. - if (navigator.appName.contains("Microsoft")) { - // If IE, register the resize on the div - this.events.register("resize", this, this.updateSize); - } else { - // Else updateSize on catching the window's resize - // Note that this is ok, as updateSize() does nothing if the - // map's size has not actually changed. - OpenLayers.Event.observe(window, 'resize', - this.updateSize.bindAsEventListener(this)); - } - - // only append link stylesheet if the theme property is set - if(this.theme) { - // check existing links for equivalent url - var addNode = true; - var nodes = document.getElementsByTagName('link'); - for(var i=0; i=0; --i) { - //pass 'false' to destroy so that map wont try to set a new - // baselayer after each baselayer is removed - this.layers[i].destroy(false); - } - this.layers = null; - } - if (this.controls != null) { - for (var i = this.controls.length - 1; i>=0; --i) { - this.controls[i].destroy(); - } - this.controls = null; - } - if (this.viewPortDiv) { - this.div.removeChild(this.viewPortDiv); - } - this.viewPortDiv = null; - - this.events.destroy(); - this.events = null; - - }, - - /** - * @private - * - * @param {Object} options Hashtable of options to tag to the map - */ - setOptions: function(options) { - - // Simple-type defaults are set in class definition. - // Now set complex-type defaults - this.tileSize = new OpenLayers.Size(OpenLayers.Map.TILE_WIDTH, - OpenLayers.Map.TILE_HEIGHT); - - this.maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90); - - this.theme = OpenLayers._getScriptLocation() + - 'theme/default/style.css'; - - // now add the options declared by the user - // (these will override defaults) - OpenLayers.Util.extend(this, options); - }, - - /** - * @type OpenLayers.Size - */ - getTileSize: function() { - return this.tileSize; - }, - - /********************************************************/ - /* */ - /* Layers, Controls, Popup Functions */ - /* */ - /* The following functions deal with adding and */ - /* removing Layers, Controls, and Popups */ - /* to and from the Map */ - /* */ - /********************************************************/ - - /** - * @param {String} name - * - * @returns The Layer with the corresponding id from the map's - * layer collection, or null if not found. - * @type OpenLayers.Layer - */ - getLayer: function(id) { - var foundLayer = null; - for (var i = 0; i < this.layers.length; i++) { - var layer = this.layers[i]; - if (layer.id == id) { - foundLayer = layer; - } - } - return foundLayer; - }, - - /** - * @param {OpenLayers.Layer} layer - * @param {int} zIdx - * @private - */ - setLayerZIndex: function (layer, zIdx) { - layer.setZIndex( - this.Z_INDEX_BASE[layer.isBaseLayer ? 'BaseLayer' : 'Overlay'] - + zIdx * 5 ); - }, - - /** - * @param {OpenLayers.Layer} layer - */ - addLayer: function (layer) { - for(var i=0; i < this.layers.length; i++) { - if (this.layers[i] == layer) { - return false; - } - } - - layer.div.style.overflow = ""; - this.setLayerZIndex(layer, this.layers.length); - - if (layer.isFixed) { - this.viewPortDiv.appendChild(layer.div); - } else { - this.layerContainerDiv.appendChild(layer.div); - } - this.layers.push(layer); - layer.setMap(this); - - if (layer.isBaseLayer) { - if (this.baseLayer == null) { - // set the first baselaye we add as the baselayer - this.setBaseLayer(layer); - } else { - layer.setVisibility(false); - } - } else { - if (this.getCenter() != null) { - layer.moveTo(this.getExtent(), true); - } - } - - this.events.triggerEvent("addlayer"); - }, - - /** - * @param {Array(OpenLayers.Layer)} layers - */ - addLayers: function (layers) { - for (var i = 0; i < layers.length; i++) { - this.addLayer(layers[i]); - } - }, - - /** Removes a layer from the map by removing its visual element (the - * layer.div property), then removing it from the map's internal list - * of layers, setting the layer's map property to null. - * - * a "removelayer" event is triggered. - * - * very worthy of mention is that simply removing a layer from a map - * will not cause the removal of any popups which may have been created - * by the layer. this is due to the fact that it was decided at some - * point that popups would not belong to layers. thus there is no way - * for us to know here to which layer the popup belongs. - * - * A simple solution to this is simply to call destroy() on the layer. - * the default OpenLayers.Layer class's destroy() function - * automatically takes care to remove itself from whatever map it has - * been attached to. - * - * The correct solution is for the layer itself to register an - * event-handler on "removelayer" and when it is called, if it - * recognizes itself as the layer being removed, then it cycles through - * its own personal list of popups, removing them from the map. - * - * @param {OpenLayers.Layer} layer - * @param {Boolean} setNewBaseLayer Default is true - */ - removeLayer: function(layer, setNewBaseLayer) { - if (setNewBaseLayer == null) { - setNewBaseLayer = true; - } - - if (layer.isFixed) { - this.viewPortDiv.removeChild(layer.div); - } else { - this.layerContainerDiv.removeChild(layer.div); - } - layer.map = null; - OpenLayers.Util.removeItem(this.layers, layer); - - // if we removed the base layer, need to set a new one - if (setNewBaseLayer && (this.baseLayer == layer)) { - this.baseLayer = null; - for(i=0; i < this.layers.length; i++) { - var iLayer = this.layers[i]; - if (iLayer.isBaseLayer) { - this.setBaseLayer(iLayer); - break; - } - } - } - this.events.triggerEvent("removelayer"); - }, - - /** - * @returns The number of layers attached to the map. - * @type int - */ - getNumLayers: function () { - return this.layers.length; - }, - - /** - * @returns The current (zero-based) index of the given layer in the map's - * layer stack. Returns -1 if the layer isn't on the map. - * - * @param {OpenLayers.Layer} layer - * @type int - */ - getLayerIndex: function (layer) { - return OpenLayers.Util.indexOf(this.layers, layer); - }, - - /** Move the given layer to the specified (zero-based) index in the layer - * list, changing its z-index in the map display. Use - * map.getLayerIndex() to find out the current index of a layer. Note - * that this cannot (or at least should not) be effectively used to - * raise base layers above overlays. - * - * @param {OpenLayers.Layer} layer - * @param {int} idx - */ - setLayerIndex: function (layer, idx) { - var base = this.getLayerIndex(layer); - if (idx < 0) - idx = 0; - else if (idx > this.layers.length) - idx = this.layers.length; - if (base != idx) { - this.layers.splice(base, 1); - this.layers.splice(idx, 0, layer); - for (var i = 0; i < this.layers.length; i++) - this.setLayerZIndex(this.layers[i], i); - this.events.triggerEvent("changelayer"); - } - }, - - /** Change the index of the given layer by delta. If delta is positive, - * the layer is moved up the map's layer stack; if delta is negative, - * the layer is moved down. Again, note that this cannot (or at least - * should not) be effectively used to raise base layers above overlays. - * - * @param {OpenLayers.Layer} layer - * @param {int} idx - */ - raiseLayer: function (layer, delta) { - var idx = this.getLayerIndex(layer) + delta; - this.setLayerIndex(layer, idx); - }, - - /** Allows user to specify one of the currently-loaded layers as the Map's - * new base layer. - * - * @param {OpenLayers.Layer} newBaseLayer - * @param {Boolean} noEvent - */ - setBaseLayer: function(newBaseLayer, noEvent) { - var oldExtent = null; - if(this.baseLayer) { - oldExtent = this.baseLayer.getExtent(); - } - - if (newBaseLayer != this.baseLayer) { - - // is newBaseLayer an already loaded layer? - if (OpenLayers.Util.indexOf(this.layers, newBaseLayer) != -1) { - - // make the old base layer invisible - if (this.baseLayer != null) { - this.baseLayer.setVisibility(false, noEvent); - } - - // set new baselayer and make it visible - this.baseLayer = newBaseLayer; - - // Increment viewRequestID since the baseLayer is - // changing. This is used by tiles to check if they should - // draw themselves. - this.viewRequestID++; - this.baseLayer.setVisibility(true, noEvent); - - //redraw all layers - var center = this.getCenter(); - if (center != null) { - if (oldExtent == null) { - // simply set center but force zoom change - this.setCenter(center, this.getZoom(), false, true); - } else { - // zoom to oldExtent *and* force zoom change - this.setCenter(oldExtent.getCenterLonLat(), - this.getZoomForExtent(oldExtent), - false, true); - } - } - - if ((noEvent == null) || (noEvent == false)) { - this.events.triggerEvent("changebaselayer"); - } - } - } - }, - - /** - * @param {OpenLayers.Control} control - * @param {OpenLayers.Pixel} px - */ - addControl: function (control, px) { - this.controls.push(control); - this.addControlToMap(control, px); - }, - - /** - * @private - * - * @param {OpenLayers.Control} control - * @param {OpenLayers.Pixel} px - */ - addControlToMap: function (control, px) { - // If a control doesn't have a div at this point, it belongs in the - // viewport. - control.outsideViewport = (control.div != null); - control.setMap(this); - var div = control.draw(px); - if (div) { - if(!control.outsideViewport) { - div.style.zIndex = this.Z_INDEX_BASE['Control'] + - this.controls.length; - this.viewPortDiv.appendChild( div ); - } - } - }, - - /** - * @param {OpenLayers.Popup} popup - * @param {Boolean} exclusive If true, closes all other popups first - */ - addPopup: function(popup, exclusive) { - - if (exclusive) { - //remove all other popups from screen - for(var i=0; i < this.popups.length; i++) { - this.removePopup(this.popups[i]); - } - } - - popup.map = this; - this.popups.push(popup); - var popupDiv = popup.draw(); - if (popupDiv) { - popupDiv.style.zIndex = this.Z_INDEX_BASE['Popup'] + - this.popups.length; - this.layerContainerDiv.appendChild(popupDiv); - } - }, - - /** - * @param {OpenLayers.Popup} popup - */ - removePopup: function(popup) { - OpenLayers.Util.removeItem(this.popups, popup); - if (popup.div) { - try { this.layerContainerDiv.removeChild(popup.div); } - catch (e) { } // Popups sometimes apparently get disconnected - // from the layerContainerDiv, and cause complaints. - } - popup.map = null; - }, - - /********************************************************/ - /* */ - /* Container Div Functions */ - /* */ - /* The following functions deal with the access to */ - /* and maintenance of the size of the container div */ - /* */ - /********************************************************/ - - /** - * @returns An OpenLayers.Size object that represents the size, in pixels, - * of the div into which OpenLayers has been loaded. - * - * Note: A clone() of this locally cached variable is returned, so - * as not to allow users to modify it. - * - * @type OpenLayers.Size - */ - getSize: function () { - var size = null; - if (this.size != null) { - size = this.size.clone(); - } - return size; - }, - - /** - * This function should be called by any external code which dynamically - * changes the size of the map div (because mozilla wont let us catch the - * "onresize" for an element) - */ - updateSize: function() { - // the div might have moved on the page, also - this.events.element.offsets = null; - var newSize = this.getCurrentSize(); - var oldSize = this.getSize(); - if (oldSize == null) - this.size = oldSize = newSize; - if (!newSize.equals(oldSize)) { - - // store the new size - this.size = newSize; - - //notify layers of mapresize - for(var i=0; i < this.layers.length; i++) { - this.layers[i].onMapResize(); - } - - if (this.baseLayer != null) { - var center = new OpenLayers.Pixel(newSize.w /2, newSize.h / 2); - var centerLL = this.getLonLatFromViewPortPx(center); - var zoom = this.getZoom(); - this.zoom = null; - this.setCenter(this.getCenter(), zoom); - } - - } - }, - - /** - * @private - * - * @returns A new OpenLayers.Size object with the dimensions of the map div - * @type OpenLayers.Size - */ - getCurrentSize: function() { - - var size = new OpenLayers.Size(this.div.clientWidth, - this.div.clientHeight); - - // Workaround for the fact that hidden elements return 0 for size. - if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) { - var dim = OpenLayers.Element.getDimensions(this.div); - size.w = dim.width; - size.h = dim.height; - } - if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) { - size.w = parseInt(this.div.style.width); - size.h = parseInt(this.div.style.height); - } - return size; - }, - - /** - * @param {OpenLayers.LonLat} center Default is this.getCenter() - * @param {float} resolution Default is this.getResolution() - * - * @returns A Bounds based on resolution, center, and current mapsize. - * @type OpenLayers.Bounds - */ - calculateBounds: function(center, resolution) { - - var extent = null; - - if (center == null) { - center = this.getCenter(); - } - if (resolution == null) { - resolution = this.getResolution(); - } - - if ((center != null) && (resolution != null)) { - - var size = this.getSize(); - var w_deg = size.w * resolution; - var h_deg = size.h * resolution; - - extent = new OpenLayers.Bounds(center.lon - w_deg / 2, - center.lat - h_deg / 2, - center.lon + w_deg / 2, - center.lat + h_deg / 2); - - } - - return extent; - }, - - - /********************************************************/ - /* */ - /* Zoom, Center, Pan Functions */ - /* */ - /* The following functions handle the validation, */ - /* getting and setting of the Zoom Level and Center */ - /* as well as the panning of the Map */ - /* */ - /********************************************************/ - /** - * @return {OpenLayers.LonLat} - */ - getCenter: function () { - return this.center; - }, - - - /** - * @return {int} - */ - getZoom: function () { - return this.zoom; - }, - - /** Allows user to pan by a value of screen pixels - * - * @param {int} dx - * @param {int} dy - */ - pan: function(dx, dy) { - - // getCenter - var centerPx = this.getViewPortPxFromLonLat(this.getCenter()); - - // adjust - var newCenterPx = centerPx.add(dx, dy); - - // only call setCenter if there has been a change - if (!newCenterPx.equals(centerPx)) { - var newCenterLonLat = this.getLonLatFromViewPortPx(newCenterPx); - this.setCenter(newCenterLonLat); - } - - }, - - /** - * @param {OpenLayers.LonLat} lonlat - * @param {int} zoom - * @param {Boolean} dragging Specifies whether or not to - * trigger movestart/end events - * @param {Boolean} forceZoomChange - * Specifies whether or not to - * trigger zoom change events - * (needed on baseLayer change) - * - * TBD: reconsider forceZoomChange in 3.0 - */ - setCenter: function (lonlat, zoom, dragging, forceZoomChange) { - - if (!this.center && !this.isValidLonLat(lonlat)) { - lonlat = this.maxExtent.getCenterLonLat(); - } - - var zoomChanged = forceZoomChange || ( - (this.isValidZoomLevel(zoom)) && - (zoom != this.getZoom()) ); - - var centerChanged = (this.isValidLonLat(lonlat)) && - (!lonlat.equals(this.center)); - - - // if neither center nor zoom will change, no need to do anything - if (zoomChanged || centerChanged || !dragging) { - - if (!dragging) { this.events.triggerEvent("movestart"); } - - if (centerChanged) { - if ((!zoomChanged) && (this.center)) { - // if zoom hasnt changed, just slide layerContainer - // (must be done before setting this.center to new value) - this.centerLayerContainer(lonlat); - } - this.center = lonlat.clone(); - } - - // (re)set the layerContainerDiv's location - if ((zoomChanged) || (this.layerContainerOrigin == null)) { - this.layerContainerOrigin = this.center.clone(); - this.layerContainerDiv.style.left = "0px"; - this.layerContainerDiv.style.top = "0px"; - } - - if (zoomChanged) { - this.zoom = zoom; - - //redraw popups - for (var i = 0; i < this.popups.length; i++) { - this.popups[i].updatePosition(); - } - - // zoom level has changed, increment viewRequestID. - this.viewRequestID++; - } - - var bounds = this.getExtent(); - - //send the move call to the baselayer and all the overlays - this.baseLayer.moveTo(bounds, zoomChanged, dragging); - for (var i = 0; i < this.layers.length; i++) { - var layer = this.layers[i]; - if (!layer.isBaseLayer) { - - var moveLayer; - var inRange = layer.calculateInRange(); - if (layer.inRange != inRange) { - // Layer property has changed. We are going - // to call moveLayer so that the layer can be turned - // off or on. - layer.inRange = inRange; - moveLayer = true; - this.events.triggerEvent("changelayer"); - } else { - // If nothing has changed, then we only move the layer - // if it is visible and inrange. - moveLayer = (layer.visibility && layer.inRange); - } - - if (moveLayer) { - layer.moveTo(bounds, zoomChanged, dragging); - } - } - } - - this.events.triggerEvent("move"); - - if (zoomChanged) { this.events.triggerEvent("zoomend"); } - } - - // even if nothing was done, we want to notify of this - if (!dragging) { this.events.triggerEvent("moveend"); } - }, - - /** This function takes care to recenter the layerContainerDiv - * - * @private - * - * @param {OpenLayers.LonLat} lonlat - */ - centerLayerContainer: function (lonlat) { - - var originPx = this.getViewPortPxFromLonLat(this.layerContainerOrigin); - var newPx = this.getViewPortPxFromLonLat(lonlat); - - if ((originPx != null) && (newPx != null)) { - this.layerContainerDiv.style.left = (originPx.x - newPx.x) + "px"; - this.layerContainerDiv.style.top = (originPx.y - newPx.y) + "px"; - } - }, - - /** - * @private - * - * @param {int} zoomLevel - * - * @returns Whether or not the zoom level passed in is non-null and - * within the min/max range of zoom levels. - * @type Boolean - */ - isValidZoomLevel: function(zoomLevel) { - return ( (zoomLevel != null) && - (zoomLevel >= 0) && - (zoomLevel < this.getNumZoomLevels()) ); - }, - - /** - * @private - * - * @param {OpenLayers.LonLat} lonlat - * - * @returns Whether or not the lonlat passed in is non-null and within - * the maxExtent bounds - * - * @type Boolean - */ - isValidLonLat: function(lonlat) { - var valid = false; - if (lonlat != null) { - var maxExtent = this.getMaxExtent(); - valid = maxExtent.containsLonLat(lonlat); - } - return valid; - }, - - /********************************************************/ - /* */ - /* Layer Options */ - /* */ - /* Accessor functions to Layer Options parameters */ - /* */ - /********************************************************/ - - /** - * @returns The Projection of the base layer - * @type String - */ - getProjection: function() { - var projection = null; - if (this.baseLayer != null) { - projection = this.baseLayer.projection; - } - return projection; - }, - - /** - * @returns The Map's Maximum Resolution - * @type String - */ - getMaxResolution: function() { - var maxResolution = null; - if (this.baseLayer != null) { - maxResolution = this.baseLayer.maxResolution; - } - return maxResolution; - }, - - /** - * @type OpenLayers.Bounds - */ - getMaxExtent: function () { - var maxExtent = null; - if (this.baseLayer != null) { - maxExtent = this.baseLayer.maxExtent; - } - return maxExtent; - }, - - /** - * @returns The total number of zoom levels that can be displayed by the - * current baseLayer. - * @type int - */ - getNumZoomLevels: function() { - var numZoomLevels = null; - if (this.baseLayer != null) { - numZoomLevels = this.baseLayer.numZoomLevels; - } - return numZoomLevels; - }, - - /********************************************************/ - /* */ - /* Baselayer Functions */ - /* */ - /* The following functions, all publicly exposed */ - /* in the API?, are all merely wrappers to the */ - /* the same calls on whatever layer is set as */ - /* the current base layer */ - /* */ - /********************************************************/ - - /** - * @returns A Bounds object which represents the lon/lat bounds of the - * current viewPort. - * If no baselayer is set, returns null. - * @type OpenLayers.Bounds - */ - getExtent: function () { - var extent = null; - if (this.baseLayer != null) { - extent = this.baseLayer.getExtent(); - } - return extent; - }, - - /** - * @returns The current resolution of the map. - * If no baselayer is set, returns null. - * @type float - */ - getResolution: function () { - var resolution = null; - if (this.baseLayer != null) { - resolution = this.baseLayer.getResolution(); - } - return resolution; - }, - - /** - * @returns The current scale denominator of the map. - * If no baselayer is set, returns null. - * @type float - */ - getScale: function () { - var scale = null; - if (this.baseLayer != null) { - var res = this.getResolution(); - var units = this.baseLayer.units; - scale = OpenLayers.Util.getScaleFromResolution(res, units); - } - return scale; - }, - - - /** - * @param {OpenLayers.Bounds} bounds - * - * @returns A suitable zoom level for the specified bounds. - * If no baselayer is set, returns null. - * @type int - */ - getZoomForExtent: function (bounds) { - var zoom = null; - if (this.baseLayer != null) { - zoom = this.baseLayer.getZoomForExtent(bounds); - } - return zoom; - }, - - /** - * @param {float} resolution - * - * @returns A suitable zoom level for the specified resolution. - * If no baselayer is set, returns null. - * @type int - */ - getZoomForResolution: function(resolution) { - var zoom = null; - if (this.baseLayer != null) { - zoom = this.baseLayer.getZoomForResolution(resolution); - } - return zoom; - }, - - /********************************************************/ - /* */ - /* Zooming Functions */ - /* */ - /* The following functions, all publicly exposed */ - /* in the API, are all merely wrappers to the */ - /* the setCenter() function */ - /* */ - /********************************************************/ - - /** Zoom to a specific zoom level - * - * @param {int} zoom - */ - zoomTo: function(zoom) { - if (this.isValidZoomLevel(zoom)) { - this.setCenter(null, zoom); - } - }, - - /** - * @param {int} zoom - */ - zoomIn: function() { - this.zoomTo(this.getZoom() + 1); - }, - - /** - * @param {int} zoom - */ - zoomOut: function() { - this.zoomTo(this.getZoom() - 1); - }, - - /** Zoom to the passed in bounds, recenter - * - * @param {OpenLayers.Bounds} bounds - */ - zoomToExtent: function(bounds) { - this.setCenter(bounds.getCenterLonLat(), - this.getZoomForExtent(bounds)); - }, - - /** Zoom to the full extent and recenter. - */ - zoomToMaxExtent: function() { - this.zoomToExtent(this.getMaxExtent()); - }, - - /** zoom to a specified scale - * - * @param {float} scale - */ - zoomToScale: function(scale) { - var res = OpenLayers.Util.getResolutionFromScale(scale, - this.baseLayer.units); - var size = this.getSize(); - var w_deg = size.w * res; - var h_deg = size.h * res; - var center = this.getCenter(); - - var extent = new OpenLayers.Bounds(center.lon - w_deg / 2, - center.lat - h_deg / 2, - center.lon + w_deg / 2, - center.lat + h_deg / 2); - this.zoomToExtent(extent); - }, - - /********************************************************/ - /* */ - /* Translation Functions */ - /* */ - /* The following functions translate between */ - /* LonLat, LayerPx, and ViewPortPx */ - /* */ - /********************************************************/ - - // - // TRANSLATION: LonLat <-> ViewPortPx - // - - /** - * @param {OpenLayers.Pixel} viewPortPx - * - * @returns An OpenLayers.LonLat which is the passed-in view port - * OpenLayers.Pixel, translated into lon/lat by the - * current base layer - * @type OpenLayers.LonLat - * @private - */ - getLonLatFromViewPortPx: function (viewPortPx) { - var lonlat = null; - if (this.baseLayer != null) { - lonlat = this.baseLayer.getLonLatFromViewPortPx(viewPortPx); - } - return lonlat; - }, - - /** - * @param {OpenLayers.LonLat} lonlat - * - * @returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, - * translated into view port pixels by the - * current base layer - * @type OpenLayers.Pixel - * @private - */ - getViewPortPxFromLonLat: function (lonlat) { - var px = null; - if (this.baseLayer != null) { - px = this.baseLayer.getViewPortPxFromLonLat(lonlat); - } - return px; - }, - - - // - // CONVENIENCE TRANSLATION FUNCTIONS FOR API - // - - /** - * @param {OpenLayers.Pixel} pixel - * - * @returns An OpenLayers.LonLat corresponding to the given - * OpenLayers.Pixel, translated into lon/lat by the - * current base layer - * @type OpenLayers.LonLat - */ - getLonLatFromPixel: function (px) { - return this.getLonLatFromViewPortPx(px); - }, - - /** - * @param {OpenLayers.LonLat} lonlat - * - * @returns An OpenLayers.Pixel corresponding to the OpenLayers.LonLat - * translated into view port pixels by the - * current base layer - * @type OpenLayers.Pixel - */ - getPixelFromLonLat: function (lonlat) { - return this.getViewPortPxFromLonLat(lonlat); - }, - - - - // - // TRANSLATION: ViewPortPx <-> LayerPx - // - - /** - * @private - * - * @param {OpenLayers.Pixel} layerPx - * - * @returns Layer Pixel translated into ViewPort Pixel coordinates - * @type OpenLayers.Pixel - */ - getViewPortPxFromLayerPx:function(layerPx) { - var viewPortPx = null; - if (layerPx != null) { - var dX = parseInt(this.layerContainerDiv.style.left); - var dY = parseInt(this.layerContainerDiv.style.top); - viewPortPx = layerPx.add(dX, dY); - } - return viewPortPx; - }, - - /** - * @private - * - * @param {OpenLayers.Pixel} viewPortPx - * - * @returns ViewPort Pixel translated into Layer Pixel coordinates - * @type OpenLayers.Pixel - */ - getLayerPxFromViewPortPx:function(viewPortPx) { - var layerPx = null; - if (viewPortPx != null) { - var dX = -parseInt(this.layerContainerDiv.style.left); - var dY = -parseInt(this.layerContainerDiv.style.top); - layerPx = viewPortPx.add(dX, dY); - if (isNaN(layerPx.x) || isNaN(layerPx.y)) { - layerPx = null; - } - } - return layerPx; - }, - - // - // TRANSLATION: LonLat <-> LayerPx - // - - /** - * @param {OpenLayers.Pixel} px - * - * @type OpenLayers.LonLat - */ - getLonLatFromLayerPx: function (px) { - //adjust for displacement of layerContainerDiv - px = this.getViewPortPxFromLayerPx(px); - return this.getLonLatFromViewPortPx(px); - }, - - /** - * @param {OpenLayers.LonLat} lonlat - * - * @returns An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, - * translated into layer pixels by the current base layer - * @type OpenLayers.Pixel - */ - getLayerPxFromLonLat: function (lonlat) { - //adjust for displacement of layerContainerDiv - var px = this.getViewPortPxFromLonLat(lonlat); - return this.getLayerPxFromViewPortPx(px); - }, - - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Map" -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Marker.js b/pacotes/openlayers/lib/OpenLayers/Marker.js deleted file mode 100644 index 2e192b2..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Marker.js +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * @requires OpenLayers/Events.js - * @requires OpenLayers/Icon.js - */ -OpenLayers.Marker = OpenLayers.Class.create(); -OpenLayers.Marker.prototype = { - - /** @type OpenLayers.Icon */ - icon: null, - - /** location of object - * @type OpenLayers.LonLat */ - lonlat: null, - - /** @type OpenLayers.Events*/ - events: null, - - /** @type OpenLayers.Map */ - map: null, - - /** - * @constructor - * - * @param {OpenLayers.Icon} icon - * @param {OpenLayers.LonLat lonlat - */ - initialize: function(lonlat, icon) { - this.lonlat = lonlat; - - var newIcon = (icon) ? icon : OpenLayers.Marker.defaultIcon(); - if (this.icon == null) { - this.icon = newIcon; - } else { - this.icon.url = newIcon.url; - this.icon.size = newIcon.size; - this.icon.offset = newIcon.offset; - this.icon.calculateOffset = newIcon.calculateOffset; - } - this.events = new OpenLayers.Events(this, this.icon.imageDiv, null); - }, - - destroy: function() { - this.map = null; - - this.events.destroy(); - this.events = null; - - if (this.icon != null) { - this.icon.destroy(); - this.icon = null; - } - }, - - /** - * @param {OpenLayers.Pixel} px - * - * @return A new DOM Image with this marker's icon set at the - * location passed-in - * @type DOMElement - */ - draw: function(px) { - return this.icon.draw(px); - }, - - /** - * @param {OpenLayers.Pixel} px - */ - moveTo: function (px) { - if ((px != null) && (this.icon != null)) { - this.icon.moveTo(px); - } - this.lonlat = this.map.getLonLatFromLayerPx(px); - }, - - /** - * @returns Whether or not the marker is currently visible on screen. - * @type Boolean - */ - onScreen:function() { - - var onScreen = false; - if (this.map) { - var screenBounds = this.map.getExtent(); - onScreen = screenBounds.containsLonLat(this.lonlat); - } - return onScreen; - }, - - /** - * @param {float} inflate - */ - inflate: function(inflate) { - if (this.icon) { - var newSize = new OpenLayers.Size(this.icon.size.w * inflate, - this.icon.size.h * inflate); - this.icon.setSize(newSize); - } - }, - - /** Change the opacity of the marker by changin the opacity of - * its icon - * - * @param {float} opacity Specified as fraction (0.4, etc) - */ - setOpacity: function(opacity) { - this.icon.setOpacity(opacity); - }, - - /** Hide or show the icon - * - * @param {Boolean} display - */ - display: function(display) { - this.icon.display(display); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Marker" -}; - - -/** - * @returns A default OpenLayers.Icon to use for a marker - * @type OpenLayers.Icon - */ -OpenLayers.Marker.defaultIcon = function() { - var url = OpenLayers.Util.getImagesLocation() + "marker.png"; - var size = new OpenLayers.Size(21, 25); - var calculateOffset = function(size) { - return new OpenLayers.Pixel(-(size.w/2), -size.h); - }; - - return new OpenLayers.Icon(url, size, null, calculateOffset); -}; - - diff --git a/pacotes/openlayers/lib/OpenLayers/Marker/Box.js b/pacotes/openlayers/lib/OpenLayers/Marker/Box.js deleted file mode 100644 index 124a24b..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Marker/Box.js +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Marker.js - */ -OpenLayers.Marker.Box = OpenLayers.Class.create(); -OpenLayers.Marker.Box.prototype = - OpenLayers.Class.inherit( OpenLayers.Marker, { - - /** @type OpenLayers.Bounds */ - bounds: null, - - /** @type DOMElement */ - div: null, - - /** - * @constructor - * - * @param {OpenLayers.Bounds} bounds - * @param {String} borderColor - * @param {int} borderWidth - */ - initialize: function(bounds, borderColor, borderWidth) { - this.bounds = bounds; - this.div = OpenLayers.Util.createDiv(); - this.div.style.overflow = 'hidden'; - this.events = new OpenLayers.Events(this, this.div, null); - this.setBorder(borderColor, borderWidth); - }, - - /** - * - */ - destroy: function() { - - this.bounds = null; - this.div = null; - - OpenLayers.Marker.prototype.destroy.apply(this, arguments); - }, - - /** Allow the user to change the box's color and border width - * - * @param {String} color Default is "red" - * @param {int} width Default is 2 - */ - setBorder: function (color, width) { - if (!color) { - color = "red"; - } - if (!width) { - width = 2; - } - this.div.style.border = width + "px solid " + color; - }, - - /** - * @param {OpenLayers.Pixel} px - * @param {OpenLayers.Size} sz - * - * @return A new DOM Image with this marker´s icon set at the - * location passed-in - * @type DOMElement - */ - draw: function(px, sz) { - OpenLayers.Util.modifyDOMElement(this.div, null, px, sz); - return this.div; - }, - - /** - * @returns Whether or not the marker is currently visible on screen. - * @type Boolean - */ - onScreen:function() { - var onScreen = false; - if (this.map) { - var screenBounds = this.map.getExtent(); - onScreen = screenBounds.containsBounds(this.bounds, true, true); - } - return onScreen; - }, - - /** Hide or show the icon - * - * @param {Boolean} display - */ - display: function(display) { - this.div.style.display = (display) ? "" : "none"; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Marker.Box" -}); - diff --git a/pacotes/openlayers/lib/OpenLayers/Popup.js b/pacotes/openlayers/lib/OpenLayers/Popup.js deleted file mode 100644 index 2954171..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Popup.js +++ /dev/null @@ -1,382 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - */ -OpenLayers.Popup = OpenLayers.Class.create(); - -OpenLayers.Popup.WIDTH = 200; -OpenLayers.Popup.HEIGHT = 200; -OpenLayers.Popup.COLOR = "white"; -OpenLayers.Popup.OPACITY = 1; -OpenLayers.Popup.BORDER = "0px"; - -OpenLayers.Popup.prototype = { - - /** @type OpenLayers.Events*/ - events: null, - - /** @type String */ - id: "", - - /** @type OpenLayers.LonLat */ - lonlat: null, - - /** @type DOMElement */ - div: null, - - /** @type OpenLayers.Size*/ - size: null, - - /** @type String */ - contentHTML: "", - - /** @type String */ - backgroundColor: "", - - /** @type float */ - opacity: "", - - /** @type String */ - border: "", - - /** @type DOMElement */ - contentDiv:null, - - /** @type DOMElement */ - groupDiv:null, - - /** @type int */ - padding: 5, - - - /** this gets set in Map.js when the popup is added to the map - * @type OpenLayers.Map */ - map: null, - - /** - * @constructor - * - * @param {String} id - * @param {OpenLayers.LonLat} lonlat - * @param {OpenLayers.Size} size - * @param {String} contentHTML - * @param {Boolean} closeBox - */ - initialize:function(id, lonlat, size, contentHTML, closeBox) { - if (id == null) { - id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_"); - } - - this.id = id; - this.lonlat = lonlat; - this.size = (size != null) ? size - : new OpenLayers.Size( - OpenLayers.Popup.WIDTH, - OpenLayers.Popup.HEIGHT); - if (contentHTML != null) { - this.contentHTML = contentHTML; - } - this.backgroundColor = OpenLayers.Popup.COLOR; - this.opacity = OpenLayers.Popup.OPACITY; - this.border = OpenLayers.Popup.BORDER; - - this.div = OpenLayers.Util.createDiv(this.id, null, null, - null, null, null, "hidden"); - this.div.className = 'olPopup'; - - this.groupDiv = OpenLayers.Util.createDiv(null, null, null, - null, "relative", null, - "hidden"); - - var id = this.div.id + "_contentDiv"; - this.contentDiv = OpenLayers.Util.createDiv(id, null, this.size.clone(), - null, "relative", null, - "hidden"); - this.contentDiv.className = 'olPopupContent'; - this.groupDiv.appendChild(this.contentDiv); - this.div.appendChild(this.groupDiv); - - if (closeBox == true) { - // close icon - var closeSize = new OpenLayers.Size(17,17); - var img = OpenLayers.Util.getImagesLocation() + "close.gif"; - var closeImg = OpenLayers.Util.createAlphaImageDiv(this.id + "_close", - null, - closeSize, - img); - closeImg.style.right = this.padding + "px"; - closeImg.style.top = this.padding + "px"; - this.groupDiv.appendChild(closeImg); - - var closePopup = function(e) { - this.hide(); - OpenLayers.Event.stop(e); - } - OpenLayers.Event.observe(closeImg, "click", - closePopup.bindAsEventListener(this)); - - } - - this.registerEvents(); - }, - - /** - */ - destroy: function() { - if (this.map != null) { - this.map.removePopup(this); - this.map = null; - } - this.events.destroy(); - this.events = null; - this.div = null; - }, - - /** - * @param {OpenLayers.Pixel} px - * - * @returns Reference to a div that contains the drawn popup - * @type DOMElement - */ - draw: function(px) { - if (px == null) { - if ((this.lonlat != null) && (this.map != null)) { - px = this.map.getLayerPxFromLonLat(this.lonlat); - } - } - - this.setSize(); - this.setBackgroundColor(); - this.setOpacity(); - this.setBorder(); - this.setContentHTML(); - this.moveTo(px); - - return this.div; - }, - - /** - * if the popup has a lonlat and its map members set, - * then have it move itself to its proper position - */ - updatePosition: function() { - if ((this.lonlat) && (this.map)) { - var px = this.map.getLayerPxFromLonLat(this.lonlat); - this.moveTo(px); - } - }, - - /** - * @param {OpenLayers.Pixel} px - */ - moveTo: function(px) { - if ((px != null) && (this.div != null)) { - this.div.style.left = px.x + "px"; - this.div.style.top = px.y + "px"; - } - }, - - /** - * @returns Boolean indicating whether or not the popup is visible - * @type Boolean - */ - visible: function() { - return OpenLayers.Element.visible(this.div); - }, - - /** - * - */ - toggle: function() { - OpenLayers.Element.toggle(this.div); - }, - - /** - * - */ - show: function() { - OpenLayers.Element.show(this.div); - }, - - /** - * - */ - hide: function() { - OpenLayers.Element.hide(this.div); - }, - - /** - * @param {OpenLayers.Size} size - */ - setSize:function(size) { - if (size != undefined) { - this.size = size; - } - - if (this.div != null) { - this.div.style.width = this.size.w + "px"; - this.div.style.height = this.size.h + "px"; - } - if (this.contentDiv != null){ - this.contentDiv.style.width = this.size.w + "px"; - this.contentDiv.style.height = this.size.h + "px"; - } - }, - - /** - * @param {String} color - */ - setBackgroundColor:function(color) { - if (color != undefined) { - this.backgroundColor = color; - } - - if (this.div != null) { - this.div.style.backgroundColor = this.backgroundColor; - } - }, - - /** - * @param {float} opacity - */ - setOpacity:function(opacity) { - if (opacity != undefined) { - this.opacity = opacity; - } - - if (this.div != null) { - // for Mozilla and Safari - this.div.style.opacity = this.opacity; - - // for IE - this.div.style.filter = 'alpha(opacity=' + this.opacity*100 + ')'; - } - }, - - /** - * @param {int} border - */ - setBorder:function(border) { - if (border != undefined) { - this.border = border; - } - - if (this.div != null) { - this.div.style.border = this.border; - } - }, - - /** - * @param {String} contentHTML - */ - setContentHTML:function(contentHTML) { - if (contentHTML != null) { - this.contentHTML = contentHTML; - } - - if (this.contentDiv != null) { - this.contentDiv.innerHTML = this.contentHTML; - } - }, - - - - /** Do this in a separate function so that subclasses can - * choose to override it if they wish to deal differently - * with mouse events - * - * Note in the following handler functions that some special - * care is needed to deal correctly with mousing and popups. - * - * Because the user might select the zoom-rectangle option and - * then drag it over a popup, we need a safe way to allow the - * mousemove and mouseup events to pass through the popup when - * they are initiated from outside. - * - * Otherwise, we want to essentially kill the event propagation - * for all other events, though we have to do so carefully, - * without disabling basic html functionality, like clicking on - * hyperlinks or drag-selecting text. - */ - registerEvents:function() { - this.events = new OpenLayers.Events(this, this.div, null, true); - - this.events.register("mousedown", this, this.onmousedown); - this.events.register("mousemove", this, this.onmousemove); - this.events.register("mouseup", this, this.onmouseup); - this.events.register("click", this, this.onclick); - this.events.register("mouseout", this, this.onmouseout); - this.events.register("dblclick", this, this.ondblclick); - }, - - /** When mouse goes down within the popup, make a note of - * it locally, and then do not propagate the mousedown - * (but do so safely so that user can select text inside) - * - * @param {Event} evt - */ - onmousedown: function (evt) { - this.mousedown = true; - OpenLayers.Event.stop(evt, true); - }, - - /** If the drag was started within the popup, then - * do not propagate the mousemove (but do so safely - * so that user can select text inside) - * - * @param {Event} evt - */ - onmousemove: function (evt) { - if (this.mousedown) { - OpenLayers.Event.stop(evt, true); - } - }, - - /** When mouse comes up within the popup, after going down - * in it, reset the flag, and then (once again) do not - * propagate the event, but do so safely so that user can - * select text inside - * - * @param {Event} evt - */ - onmouseup: function (evt) { - if (this.mousedown) { - this.mousedown = false; - OpenLayers.Event.stop(evt, true); - } - }, - - /** Ignore clicks, but allowing default browser handling - * - * @param {Event} evt - */ - onclick: function (evt) { - OpenLayers.Event.stop(evt, true); - }, - - /** When mouse goes out of the popup set the flag to false so that - * if they let go and then drag back in, we won't be confused. - * - * @param {Event} evt - * - * @type Boolean - */ - onmouseout: function (evt) { - this.mousedown = false; - }, - - /** Ignore double-clicks, but allowing default browser handling - * - * @param {Event} evt - */ - ondblclick: function (evt) { - OpenLayers.Event.stop(evt, true); - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Popup" -}; diff --git a/pacotes/openlayers/lib/OpenLayers/Popup/Anchored.js b/pacotes/openlayers/lib/OpenLayers/Popup/Anchored.js deleted file mode 100644 index 04fe12b..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Popup/Anchored.js +++ /dev/null @@ -1,128 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Popup.js - */ -OpenLayers.Popup.Anchored = OpenLayers.Class.create(); -OpenLayers.Popup.Anchored.prototype = - OpenLayers.Class.inherit( OpenLayers.Popup, { - - /** "lr", "ll", "tr", "tl" - relative position of the popup. - * @type String */ - relativePosition: null, - - /** Object which must have expose a 'size' (OpenLayers.Size) and - * 'offset' (OpenLayers.Pixel) - * @type Object */ - anchor: null, - - /** - * @constructor - * - * @param {String} id - * @param {OpenLayers.LonLat} lonlat - * @param {OpenLayers.Size} size - * @param {String} contentHTML - * @param {Object} anchor Object which must expose a - * - 'size' (OpenLayers.Size) and - * - 'offset' (OpenLayers.Pixel) - * (this is generally an OpenLayers.Icon) - * @param {Boolean} closeBox - */ - initialize:function(id, lonlat, size, contentHTML, anchor, closeBox) { - var newArguments = new Array(id, lonlat, size, contentHTML, closeBox); - OpenLayers.Popup.prototype.initialize.apply(this, newArguments); - - this.anchor = (anchor != null) ? anchor - : { size: new OpenLayers.Size(0,0), - offset: new OpenLayers.Pixel(0,0)}; - }, - - /** - * @param {OpenLayers.Pixel} px - * - * @returns Reference to a div that contains the drawn popup - * @type DOMElement - */ - draw: function(px) { - if (px == null) { - if ((this.lonlat != null) && (this.map != null)) { - px = this.map.getLayerPxFromLonLat(this.lonlat); - } - } - - //calculate relative position - this.relativePosition = this.calculateRelativePosition(px); - - return OpenLayers.Popup.prototype.draw.apply(this, arguments); - }, - - /** - * @private - * - * @param {OpenLayers.Pixel} px - * - * @returns The relative position ("br" "tr" "tl "bl") at which the popup - * should be placed - * @type String - */ - calculateRelativePosition:function(px) { - var lonlat = this.map.getLonLatFromLayerPx(px); - - var extent = this.map.getExtent(); - var quadrant = extent.determineQuadrant(lonlat); - - return OpenLayers.Bounds.oppositeQuadrant(quadrant); - }, - - /** - * @param {OpenLayers.Pixel} px - */ - moveTo: function(px) { - - var newPx = this.calculateNewPx(px); - - var newArguments = new Array(newPx); - OpenLayers.Popup.prototype.moveTo.apply(this, newArguments); - }, - - /** - * @param {OpenLayers.Size} size - */ - setSize:function(size) { - OpenLayers.Popup.prototype.setSize.apply(this, arguments); - - if ((this.lonlat) && (this.map)) { - var px = this.map.getLayerPxFromLonLat(this.lonlat); - this.moveTo(px); - } - }, - - /** - * @private - * - * @param {OpenLayers.Pixel} px - * - * @returns The the new px position of the popup on the screen - * relative to the passed-in px - * @type OpenLayers.Pixel - */ - calculateNewPx:function(px) { - var newPx = px.offset(this.anchor.offset); - - var top = (this.relativePosition.charAt(0) == 't'); - newPx.y += (top) ? -this.size.h : this.anchor.size.h; - - var left = (this.relativePosition.charAt(1) == 'l'); - newPx.x += (left) ? -this.size.w : this.anchor.size.w; - - return newPx; - }, - - CLASS_NAME: "OpenLayers.Popup.Anchored" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js b/pacotes/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js deleted file mode 100644 index d5f8574..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Popup/AnchoredBubble.js +++ /dev/null @@ -1,168 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Popup/Anchored.js - */ -OpenLayers.Popup.AnchoredBubble = OpenLayers.Class.create(); - -//Border space for the rico corners -OpenLayers.Popup.AnchoredBubble.CORNER_SIZE = 5; - -OpenLayers.Popup.AnchoredBubble.prototype = - OpenLayers.Class.inherit( OpenLayers.Popup.Anchored, { - - rounded: false, - - /** - * @constructor - * - * @param {String} id - * @param {OpenLayers.LonLat} lonlat - * @param {OpenLayers.Size} size - * @param {String} contentHTML - * @param {Object} anchor Object which must expose a - * - 'size' (OpenLayers.Size) and - * - 'offset' (OpenLayers.Pixel) - * (this is generally an OpenLayers.Icon) - * @param {Boolean} closeBox - */ - initialize:function(id, lonlat, size, contentHTML, anchor, closeBox) { - OpenLayers.Popup.Anchored.prototype.initialize.apply(this, arguments); - }, - - /** - * @param {OpenLayers.Pixel} px - * - * @returns Reference to a div that contains the drawn popup - * @type DOMElement - */ - draw: function(px) { - - OpenLayers.Popup.Anchored.prototype.draw.apply(this, arguments); - - this.setContentHTML(); - - this.setRicoCorners(!this.rounded); - this.rounded = true; - - //set the popup color and opacity - this.setBackgroundColor(); - this.setOpacity(); - - return this.div; - }, - - /** - * @param {OpenLayers.Size} size - */ - setSize:function(size) { - OpenLayers.Popup.Anchored.prototype.setSize.apply(this, arguments); - - if (this.contentDiv != null) { - - var contentSize = this.size.clone(); - contentSize.h -= (2 * OpenLayers.Popup.AnchoredBubble.CORNER_SIZE); - contentSize.h -= (2 * this.padding); - - this.contentDiv.style.height = contentSize.h + "px"; - this.contentDiv.style.width = contentSize.w + "px"; - - if (this.map) { - //size has changed - must redo corners - this.setRicoCorners(!this.rounded); - this.rounded = true; - } - } - }, - - /** - * @param {String} color - */ - setBackgroundColor:function(color) { - if (color != undefined) { - this.backgroundColor = color; - } - - if (this.div != null) { - if (this.contentDiv != null) { - this.div.style.background = "transparent"; - OpenLayers.Rico.Corner.changeColor(this.contentDiv, this.backgroundColor); - } - } - }, - - /** - * @param {float} opacity - */ - setOpacity:function(opacity) { - if (opacity != undefined) { - this.opacity = opacity; - } - - if (this.div != null) { - if (this.contentDiv != null) { - OpenLayers.Rico.Corner.changeOpacity(this.contentDiv, this.opacity); - } - } - }, - - /** Bubble Popups can not have a border - * - * @param {int} border - */ - setBorder:function(border) { - this.border = 0; - }, - - /** - * @private - * - * @param {Boolean} firstTime Is this the first time the corners are being - * rounded? - * - * update the rico corners according to the popup's - * current relative postion - */ - setRicoCorners:function(firstTime) { - - var corners = this.getCornersToRound(this.relativePosition); - var options = {corners: corners, - color: this.backgroundColor, - bgColor: "transparent", - blend: false}; - - if (firstTime) { - OpenLayers.Rico.Corner.round(this.div, options); - } else { - OpenLayers.Rico.Corner.reRound(this.groupDiv, options); - //set the popup color and opacity - this.setBackgroundColor(); - this.setOpacity(); - } - }, - - /** - * @private - * - * @returns The proper corners string ("tr tl bl br") for rico - * to round - * @type String - */ - getCornersToRound:function() { - - var corners = ['tl', 'tr', 'bl', 'br']; - - //we want to round all the corners _except_ the opposite one. - var corner = OpenLayers.Bounds.oppositeQuadrant(this.relativePosition); - OpenLayers.Util.removeItem(corners, corner); - - return corners.join(" "); - }, - - CLASS_NAME: "OpenLayers.Popup.AnchoredBubble" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Renderer.js b/pacotes/openlayers/lib/OpenLayers/Renderer.js deleted file mode 100644 index 39f4b06..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Renderer.js +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class Renderer is the base class for all renderers. - * - * This is based on a merger code written by Paul Spencer and Bertil Chapuis. - * It is largely composed of virtual functions that are to be implemented - * in technology-specific subclasses, but there is some generic code too. - * - * The functions that *are* implemented here merely deal with the maintenance - * of the size and extent variables, as well as the cached 'resolution' - * value. - * - * A note to the user that all subclasses should use getResolution() instead - * of directly accessing this.resolution in order to correctly use the - * cacheing system. - * - */ -OpenLayers.Renderer = OpenLayers.Class.create(); -OpenLayers.Renderer.prototype = -{ - /** @type DOMElement */ - container: null, - - /** @type OpenLayers.Bounds */ - extent: null, - - /** @type OpenLayers.Size */ - size: null, - - /** cache of current map resolution - * @type float */ - resolution: null, - - /** Reference to the map -- this is set in Vector's setMap() - * @type OpenLayers.Map */ - map: null, - - /** - * @constructor - * - * @param {String} containerID - */ - initialize: function(containerID) { - this.container = $(containerID); - }, - - /** - * - */ - destroy: function() { - this.container = null; - this.extent = null; - this.size = null; - this.resolution = null; - this.map = null; - }, - - /** - * This should be overridden by specific subclasses - * - * @returns Whether or not the browser supports the VML renderer - * @type Boolean - */ - supported: function() { - return false; - }, - - /** - * Set the visible part of the layer. - * - * Resolution has probably changed, so we nullify the resolution - * cache (this.resolution) -- this way it will be re-computed when - * next it is needed. - * - * @param {OpenLayers.Bounds} extent - */ - setExtent: function(extent) { - this.extent = extent.clone(); - this.resolution = null; - }, - - /** - * Sets the size of the drawing surface. - * - * Resolution has probably changed, so we nullify the resolution - * cache (this.resolution) -- this way it will be re-computed when - * next it is needed. - * - * @param {OpenLayers.Size} size - */ - setSize: function(size) { - this.size = size.clone(); - this.resolution = null; - }, - - /** Uses cached copy of resolution if available to minimize computing - * - * @returns The current map's resolution - * @type float - */ - getResolution: function() { - this.resolution = this.resolution || this.map.getResolution(); - return this.resolution; - }, - - /** - * Draw the feature. The optional style argument can be used - * to override the feature's own style. This method should only - * be called from layer.drawFeature(). - * - * @param {OpenLayers.Feature.Vector} feature - * @param {Object} style - * @private - */ - drawFeature: function(feature, style) { - if(style == null) { - style = feature.style; - } - this.drawGeometry(feature.geometry, style, feature.id); - }, - - - /** - * virtual function - * - * Draw a geometry. This should only be called from the renderer itself. - * Use layer.drawFeature() from outside the renderer. - * - * @param geometry {OpenLayers.Geometry} - * @param style {Object} - * @param {String} featureId - * @private - */ - drawGeometry: function(geometry, style, featureId) {}, - - /** - * virtual function - * - * Clear all vectors from the renderer - * @private - */ - clear: function() {}, - - /** - * virtual function - * - * Returns a feature id from an event on the renderer. - * How this happens is specific to the renderer. This should be - * called from layer.getFeatureFromEvent(). - * - * @param evt {OpenLayers.Event} - * - * @returns A feature id or null - * @type String - * @private - */ - getFeatureIdFromEvent: function(evt) {}, - - /** - * This is called by the layer to erase features - * @param {Array(OpenLayers.Feature.Vector)} features - * @private - */ - eraseFeatures: function(features) { - if(!(features instanceof Array)) { - features = [features]; - } - for(var i=0; i 0) { - this.root.removeChild(this.root.firstChild); - } - } - }, - - /** This function is in charge of asking the specific renderer which type - * of node to create for the given geometry. All geometries in an - * Elements-based renderer consist of one node and some attributes. We - * have the nodeFactory() function which creates a node for us, but it - * takes a 'type' as input, and that is precisely what this function - * tells us. - * - * @param geometry {OpenLayers.Geometry} - * - * @returns The corresponding node type for the specified geometry - * @type String - * @private - */ - getNodeType: function(geometry) { }, - - /** - * Draw the geometry, creating new nodes, setting paths, setting style, - * setting featureId on the node. This method should only be called - * by the renderer itself. - * - * @param {OpenLayers.Geometry} geometry - * @param {Object} style - * @param {String} featureId - * @private - */ - drawGeometry: function(geometry, style, featureId) { - - if ((geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPoint") || - (geometry.CLASS_NAME == "OpenLayers.Geometry.MultiLineString") || - (geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPolygon")) { - for (var i = 0; i < geometry.components.length; i++) { - this.drawGeometry(geometry.components[i], style, featureId); - } - return; - }; - - //first we create the basic node and add it to the root - var nodeType = this.getNodeType(geometry); - var node = this.nodeFactory(geometry.id, nodeType, geometry); - node._featureId = featureId; - node._geometryClass = geometry.CLASS_NAME; - node._style = style; - this.root.appendChild(node); - - //now actually draw the node, and style it - this.drawGeometryNode(node, geometry); - }, - - /** - * Given a node, draw a geometry on the specified layer. - * node and geometry are required arguments, style is optional. - * This method is only called by the render itself. - * - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @param {Object} style - * @private - */ - drawGeometryNode: function(node, geometry, style) { - style = style || node._style; - - var options = { - 'isFilled': true, - 'isStroked': true - }; - switch (geometry.CLASS_NAME) { - case "OpenLayers.Geometry.Point": - this.drawPoint(node, geometry); - break; - case "OpenLayers.Geometry.LineString": - options.isFilled = false; - this.drawLineString(node, geometry); - break; - case "OpenLayers.Geometry.LinearRing": - this.drawLinearRing(node, geometry); - break; - case "OpenLayers.Geometry.Polygon": - this.drawPolygon(node, geometry); - break; - case "OpenLayers.Geometry.Surface": - this.drawSurface(node, geometry); - break; - case "OpenLayers.Geometry.Rectangle": - this.drawRectangle(node, geometry); - break; - default: - break; - } - - node._style = style; - node._options = options; - - //set style - //TBD simplify this - this.setStyle(node, style, options, geometry); - }, - - /** - * virtual functions for drawing different Geometries. - * These should all be implemented by subclasses. - * These methods are only called by the render itself. - * - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawPoint: function(node, geometry) {}, - drawLineString: function(node, geometry) {}, - drawLinearRing: function(node, geometry) {}, - drawPolygon: function(node, geometry) {}, - drawRectangle: function(node, geometry) {}, - drawCircle: function(node, geometry) {}, - drawCurve: function(node, geometry) {}, - drawSurface: function(node, geometry) {}, - - /** - * @param evt {Object} an OpenLayers.Event object - * - * @returns A geometry from an event that happened on a layer - * @type OpenLayers.Geometry - * @private - */ - getFeatureIdFromEvent: function(evt) { - var node = evt.target || evt.srcElement; - return node._featureId; - }, - - /** Erase a geometry from the renderer. In the case of a multi-geometry, - * we cycle through and recurse on ourselves. Otherwise, we look for a - * node with the geometry.id, destroy its geometry, and remove it from - * the DOM. - * - * @param {OpenLayers.Geometry} geometry - * @private - */ - eraseGeometry: function(geometry) { - if ((geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPoint") || - (geometry.CLASS_NAME == "OpenLayers.Geometry.MultiLineString") || - (geometry.CLASS_NAME == "OpenLayers.Geometry.MultiPolygon")) { - for (var i = 0; i < geometry.components.length; i++) { - this.eraseGeometry(geometry.components[i]); - } - } else { - var element = $(geometry.id); - if (element && element.parentNode) { - if (element.geometry) { - element.geometry.destroy(); - element.geometry = null; - } - element.parentNode.removeChild(element); - } - } - }, - - /** - * @private - * - * Create new node of the specified type, with the (optional) specified id. - * - * If node already exists with same ID and type, we remove it and then - * call ourselves again to recreate it. - * - * @param {String} id - * @param {String} type Kind of node to draw - * @param {OpenLayers.Geometry} geometry - * - * @returns A new node of the given type and id - * @type DOMElement - * @private - */ - nodeFactory: function(id, type, geometry) { - var node = $(id); - if (node) { - if (!this.nodeTypeCompare(node, type)) { - node.parentNode.removeChild(node); - node = this.nodeFactory(id, type, geometry); - } - } else { - node = this.createNode(type, id); - } - return node; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Renderer.Elements" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Renderer/SVG.js b/pacotes/openlayers/lib/OpenLayers/Renderer/SVG.js deleted file mode 100644 index bbae2f1..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Renderer/SVG.js +++ /dev/null @@ -1,462 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * @requires OpenLayers/Renderer/Elements.js - */ -OpenLayers.Renderer.SVG = OpenLayers.Class.create(); -OpenLayers.Renderer.SVG.prototype = - OpenLayers.Class.inherit(OpenLayers.Renderer.Elements, { - - /** @type String */ - xmlns: "http://www.w3.org/2000/svg", - - // Firefox has a limitation where values larger or smaller than about - // 15000 in an SVG document lock the browser up. This works around it. - /** @type Integer */ - maxPixel: 15000, - - - /** @type Float - @private */ - localResolution: null, - - /** - * @constructor - * - * @param {String} containerID - */ - initialize: function(containerID) { - if (!this.supported()) { - return; - } - OpenLayers.Renderer.Elements.prototype.initialize.apply(this, - arguments); - }, - - /** - * - */ - destroy: function() { - OpenLayers.Renderer.Elements.prototype.destroy.apply(this, arguments); - }, - - /** - * @returns Whether or not the browser supports the SVG renderer - * @type Boolean - */ - supported: function() { - var svgFeature = "http://www.w3.org/TR/SVG11/feature#SVG"; - var supported = (document.implementation && - (document.implementation.hasFeature("org.w3c.svg", "1.0") || - document.implementation.hasFeature(svgFeature, "1.1"))); - return supported; - }, - - /** - * @param {OpenLayers.Bounds} extent - * @private - */ - setExtent: function(extent) { - OpenLayers.Renderer.Elements.prototype.setExtent.apply(this, - arguments); - - var resolution = this.getResolution(); - - - // If the resolution has changed, start over changing the corner, because - // the features will redraw. - if (!this.localResolution || resolution != this.localResolution) { - this.left = -extent.left / resolution; - this.top = extent.top / resolution; - } - - - var left = 0; - var top = 0; - - // If the resolution has not changed, we already have features, and we need - // to adjust the viewbox to fit them. - if (this.localResolution && resolution == this.localResolution) { - left = (this.left) - (-extent.left / resolution); - top = (this.top) - (extent.top / resolution); - } - - // Store resolution for use later. - this.localResolution = resolution; - - // Set the viewbox -- the left/top will be pixels-dragged-since-res change, - // the width/height will be pixels. - var extentString = left + " " + top + " " + - extent.getWidth() / resolution + " " + extent.getHeight() / resolution; - //var extentString = extent.left / resolution + " " + -extent.top / resolution + " " + - this.rendererRoot.setAttributeNS(null, "viewBox", extentString); - }, - - /** - * function - * - * sets the size of the drawing surface - * - * @param size {OpenLayers.Size} the size of the drawing surface - * @private - */ - setSize: function(size) { - OpenLayers.Renderer.prototype.setSize.apply(this, arguments); - - this.rendererRoot.setAttributeNS(null, "width", this.size.w); - this.rendererRoot.setAttributeNS(null, "height", this.size.h); - }, - - - - - /** - * @param geometry {OpenLayers.Geometry} - * - * @returns The corresponding node type for the specified geometry - * @type String - * @private - */ - getNodeType: function(geometry) { - var nodeType = null; - switch (geometry.CLASS_NAME) { - case "OpenLayers.Geometry.Point": - nodeType = "circle"; - break; - case "OpenLayers.Geometry.Rectangle": - nodeType = "rect"; - break; - case "OpenLayers.Geometry.LineString": - nodeType = "polyline"; - break; - case "OpenLayers.Geometry.LinearRing": - nodeType = "polygon"; - break; - case "OpenLayers.Geometry.Polygon": - case "OpenLayers.Geometry.Curve": - case "OpenLayers.Geometry.Surface": - nodeType = "path"; - break; - default: - break; - } - return nodeType; - }, - - /** - * Use to set all the style attributes to a SVG node. - * - * Note: takes care to adjust stroke width and point radius - * to be resolution-relative - * - * @param node {SVGDomElement} an SVG element to decorate - * @param {Object} style - * @param {Object} options - * @option isFilled {boolean} - * @option isStroked {boolean} - * @private - */ - setStyle: function(node, style, options) { - style = style || node._style; - options = options || node._options; - - if (node._geometryClass == "OpenLayers.Geometry.Point") { - node.setAttributeNS(null, "r", style.pointRadius); - } - - if (options.isFilled) { - node.setAttributeNS(null, "fill", style.fillColor); - node.setAttributeNS(null, "fill-opacity", style.fillOpacity); - } else { - node.setAttributeNS(null, "fill", "none"); - } - - if (options.isStroked) { - node.setAttributeNS(null, "stroke", style.strokeColor); - node.setAttributeNS(null, "stroke-opacity", style.strokeOpacity); - node.setAttributeNS(null, "stroke-width", style.strokeWidth); - } else { - node.setAttributeNS(null, "stroke", "none"); - } - - if (style.pointerEvents) { - node.setAttributeNS(null, "pointer-events", style.pointerEvents); - } - - if (style.cursor) { - node.setAttributeNS(null, "cursor", style.cursor); - } - }, - - /** - * @private - * - * @param {String} type Kind of node to draw - * @param {String} id Id for node - * - * @returns A new node of the given type and id - * @type DOMElement - */ - createNode: function(type, id) { - var node = document.createElementNS(this.xmlns, type); - if (id) { - node.setAttributeNS(null, "id", id); - } - return node; - }, - - /** - * @private - * - * @param {String} type Kind of node to draw - * @param {String} id Id for node - * - * @returns Whether or not the specified node is of the specified type - * @type Boolean - */ - nodeTypeCompare: function(node, type) { - return (type == node.nodeName); - }, - - /** - * @returns The specific render engine's root element - * @type DOMElement - * @private - */ - createRenderRoot: function() { - var id = this.container.id + "_svgRoot"; - var rendererRoot = this.nodeFactory(id, "svg"); - return rendererRoot; - }, - - /** - * @returns The main root element to which we'll add vectors - * @type DOMElement - * @private - */ - createRoot: function() { - var id = this.container.id + "_root"; - - var root = this.nodeFactory(id, "g"); - - // flip the SVG display Y axis upside down so it - // matches the display Y axis of the map - root.setAttributeNS(null, "transform", "scale(1, -1)"); - - return root; - }, - - /************************************** - * * - * GEOMETRY DRAWING FUNCTIONS * - * * - **************************************/ - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawPoint: function(node, geometry) { - this.drawCircle(node, geometry, 1); - }, - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @param {float} radius - * @private - */ - drawCircle: function(node, geometry, radius) { - var resolution = this.getResolution(); - var x = (geometry.x / resolution + this.left); - var y = (geometry.y / resolution - this.top); - var draw = true; - if (x < -this.maxPixel || x > this.maxPixel) { draw = false; } - if (y < -this.maxPixel || y > this.maxPixel) { draw = false; } - - if (draw) { - node.setAttributeNS(null, "cx", x); - node.setAttributeNS(null, "cy", y); - node.setAttributeNS(null, "r", radius); - } else { - this.root.removeChild(node); - } - - }, - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawLineString: function(node, geometry) { - node.setAttributeNS(null, "points", this.getComponentsString(geometry.components)); - }, - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawLinearRing: function(node, geometry) { - node.setAttributeNS(null, "points", this.getComponentsString(geometry.components)); - }, - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawPolygon: function(node, geometry) { - var d = ""; - var draw = true; - for (var j = 0; j < geometry.components.length; j++) { - var linearRing = geometry.components[j]; - d += " M"; - for (var i = 0; i < linearRing.components.length; i++) { - var component = this.getShortString(linearRing.components[i]) - if (component) { - d += " " + component; - } else { - draw = false; - } - } - } - d += " z"; - if (draw) { - node.setAttributeNS(null, "d", d); - node.setAttributeNS(null, "fill-rule", "evenodd"); - } else { - node.setAttributeNS(null, "d", ""); - } - }, - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawRectangle: function(node, geometry) { - // This needs to be reworked - var x = (geometry.x / resolution + this.left); - var y = (geometry.y / resolution - this.top); - var draw = true; - if (x < -this.maxPixel || x > this.maxPixel) { draw = false; } - if (y < -this.maxPixel || y > this.maxPixel) { draw = false; } - if (draw) { - node.setAttributeNS(null, "x", x); - node.setAttributeNS(null, "y", y); - node.setAttributeNS(null, "width", geometry.width); - node.setAttributeNS(null, "height", geometry.height); - } else { - node.setAttributeNS(null, "x", ""); - node.setAttributeNS(null, "y", ""); - node.setAttributeNS(null, "width", 0); - node.setAttributeNS(null, "height", 0); - } - - }, - - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawCurve: function(node, geometry) { - var d = null; - var draw = true; - for (var i = 0; i < geometry.components.length; i++) { - if ((i%3) == 0 && (i/3) == 0) { - var component = this.getShortString(geometry.components[i]); - if (!component) { draw = false; } - d = "M " + component; - } else if ((i%3) == 1) { - var component = this.getShortString(geometry.components[i]); - if (!component) { draw = false; } - d += " C " + component; - } else { - var component = this.getShortString(geometry.components[i]); - if (!component) { draw = false; } - d += " " + component; - } - } - if (draw) { - node.setAttributeNS(null, "d", d); - } else { - node.setAttributeNS(null, "d", ""); - } - }, - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawSurface: function(node, geometry) { - - // create the svg path string representation - var d = null; - var draw = true; - for (var i = 0; i < geometry.components.length; i++) { - if ((i%3) == 0 && (i/3) == 0) { - var component = this.getShortString(geometry.components[i]); - if (!component) { draw = false; } - d = "M " + component; - } else if ((i%3) == 1) { - var component = this.getShortString(geometry.components[i]); - if (!component) { draw = false; } - d += " C " + component; - } else { - var component = this.getShortString(geometry.components[i]); - if (!component) { draw = false; } - d += " " + component; - } - } - d += " Z"; - if (draw) { - node.setAttributeNS(null, "d", d); - } else { - node.setAttributeNS(null, "d", ""); - } - }, - - /** - * @param {Array} components array of points - * @private - */ - getComponentsString: function(components) { - var strings = []; - for(var i = 0; i < components.length; i++) { - var component = this.getShortString(components[i]); - if (component) { - strings.push(component); - } - } - return strings.join(","); - }, - - - /** - * @param {OpenLayers.Geometry.Point} point - * @private - */ - getShortString: function(point) { - var resolution = this.getResolution(); - var x = (point.x / resolution + this.left); - var y = (point.y / resolution - this.top); - if (x < -this.maxPixel || x > this.maxPixel) { return false; } - if (y < -this.maxPixel || y > this.maxPixel) { return false; } - var string = x + "," + y; - return string; - - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Renderer.SVG" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/Renderer/VML.js b/pacotes/openlayers/lib/OpenLayers/Renderer/VML.js deleted file mode 100644 index 5cf577b..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Renderer/VML.js +++ /dev/null @@ -1,453 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -/** - * @class - * - * Note that for all calculations in this class, we use toFixed() to round a - * float value to an integer. This is done because it seems that VML doesn't - * support float values. - * - * @requires OpenLayers/Renderer/Elements.js - */ -OpenLayers.Renderer.VML = OpenLayers.Class.create(); -OpenLayers.Renderer.VML.prototype = - OpenLayers.Class.inherit(OpenLayers.Renderer.Elements, { - - /** @type String */ - xmlns: "urn:schemas-microsoft-com:vml", - - /** - * @constructor - * - * @param {String} containerID - */ - initialize: function(containerID) { - if (!this.supported()) { - return; - } - document.namespaces.add("v", "urn:schemas-microsoft-com:vml"); - var style = document.createStyleSheet(); - style.addRule('v\\:*', "behavior: url(#default#VML); " + - "position: relative; display: inline-block;"); - OpenLayers.Renderer.Elements.prototype.initialize.apply(this, - arguments); - }, - - /** - * - */ - destroy: function() { - OpenLayers.Renderer.Elements.prototype.destroy.apply(this, arguments); - }, - - /** - * @returns Whether or not the browser supports the VML renderer - * @type Boolean - */ - supported: function() { - var supported = document.namespaces; - return supported; - }, - - /** - * @param {OpenLayers.Bounds} extent - */ - setExtent: function(extent) { - OpenLayers.Renderer.Elements.prototype.setExtent.apply(this, - arguments); - var resolution = this.getResolution(); - - var org = extent.left/resolution + " " + - extent.top/resolution; - this.root.setAttribute("coordorigin", org); - - var size = extent.getWidth()/resolution + " " + - -extent.getHeight()/resolution; - this.root.setAttribute("coordsize", size); - }, - - - /** - * Set the size of the drawing surface - * - * @param size {OpenLayers.Size} the size of the drawing surface - */ - setSize: function(size) { - OpenLayers.Renderer.prototype.setSize.apply(this, arguments); - - this.rendererRoot.style.width = this.size.w; - this.rendererRoot.style.height = this.size.h; - - this.root.style.width = "100%"; - this.root.style.height = "100%"; - }, - - /** - * @param geometry {OpenLayers.Geometry} - * - * @returns The corresponding node type for the specified geometry - * @type String - * @private - */ - getNodeType: function(geometry) { - var nodeType = null; - switch (geometry.CLASS_NAME) { - case "OpenLayers.Geometry.Point": - nodeType = "v:oval"; - break; - case "OpenLayers.Geometry.Rectangle": - nodeType = "v:rect"; - break; - case "OpenLayers.Geometry.LineString": - case "OpenLayers.Geometry.LinearRing": - case "OpenLayers.Geometry.Polygon": - case "OpenLayers.Geometry.Curve": - case "OpenLayers.Geometry.Surface": - nodeType = "v:shape"; - break; - default: - break; - } - return nodeType; - }, - - /** - * Use to set all the style attributes to a VML node. - * - * @param {DOMElement} node - * @param {Object} style - * @param {Object} options - * @option isFilled {boolean} - * @option isStroked {boolean} - * @param {OpenLayers.Geometry} geometry - * @private - */ - setStyle: function(node, style, options, geometry) { - style = style || node._style; - options = options || node._options; - - if (node._geometryClass == "OpenLayers.Geometry.Point") { - this.drawCircle(node, geometry, style.pointRadius); - } - - //fill - var fillColor = (options.isFilled) ? style.fillColor : "none"; - node.setAttribute("fillcolor", fillColor); - var fills = node.getElementsByTagName("fill"); - var fill = (fills.length == 0) ? null : fills[0]; - if (!options.isFilled) { - if (fill) { - node.removeChild(fill); - } - } else { - if (!fill) { - fill = this.createNode('v:fill', node.id + "_fill"); - node.appendChild(fill); - } - fill.setAttribute("opacity", style.fillOpacity); - } - - - //stroke - var strokeColor = (options.isStroked) ? style.strokeColor : "none"; - node.setAttribute("strokecolor", strokeColor); - node.setAttribute("strokeweight", style.strokeWidth); - var strokes = node.getElementsByTagName("stroke"); - var stroke = (strokes.length == 0) ? null : strokes[0]; - if (!options.isStroked) { - if (stroke) { - node.removeChild(stroke); - } - } else { - if (!stroke) { - stroke = this.createNode('v:stroke', node.id + "_stroke"); - node.appendChild(stroke); - } - stroke.setAttribute("opacity", style.strokeOpacity); - } - - if (style.cursor) { - node.style.cursor = style.cursor; - } - }, - - - /** Get the geometry's bounds, convert it to our vml coordinate system, - * then set the node's position, size, and local coordinate system. - * - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - setNodeDimension: function(node, geometry) { - - var bbox = geometry.getBounds(); - - var resolution = this.getResolution(); - - var scaledBox = - new OpenLayers.Bounds((bbox.left/resolution).toFixed(), - (bbox.bottom/resolution).toFixed(), - (bbox.right/resolution).toFixed(), - (bbox.top/resolution).toFixed()); - - // Set the internal coordinate system to draw the path - node.style.left = scaledBox.left; - node.style.top = scaledBox.top; - node.style.width = scaledBox.getWidth(); - node.style.height = scaledBox.getHeight(); - - node.coordorigin = scaledBox.left + " " + scaledBox.top; - node.coordsize = scaledBox.getWidth()+ " " + scaledBox.getHeight(); - }, - - /** - * @private - * - * @param {String} type Kind of node to draw - * @param {String} id Id for node - * - * @returns A new node of the given type and id - * @type DOMElement - */ - createNode: function(type, id) { - var node = document.createElement(type); - if (id) { - node.setAttribute('id', id); - } - return node; - }, - - /** - * @private - * - * @param {String} type Kind of node to draw - * @param {String} id Id for node - * - * @returns Whether or not the specified node is of the specified type - * @type Boolean - */ - nodeTypeCompare: function(node, type) { - - //split type - var subType = type; - var splitIndex = subType.indexOf(":"); - if (splitIndex != -1) { - subType = subType.substr(splitIndex+1); - } - - //split nodeName - var nodeName = node.nodeName; - splitIndex = nodeName.indexOf(":"); - if (splitIndex != -1) { - nodeName = nodeName.substr(splitIndex+1); - } - - return (subType == nodeName); - }, - - /** - * @returns The specific render engine's root element - * @type DOMElement - * @private - */ - createRenderRoot: function() { - var id = this.container.id + "_vmlRoot"; - var rendererRoot = this.nodeFactory(id, "div"); - return rendererRoot; - }, - - /** - * @returns The main root element to which we'll add vectors - * @type DOMElement - * @private - */ - createRoot: function() { - var id = this.container.id + "_root"; - var root = this.nodeFactory(id, "v:group"); - return root; - }, - - /************************************** - * * - * GEOMETRY DRAWING FUNCTIONS * - * * - **************************************/ - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawPoint: function(node, geometry) { - this.drawCircle(node, geometry, 1); - }, - - /** Size and Center a circle given geometry (x,y center) and radius - * - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @param {float} radius - * @private - */ - drawCircle: function(node, geometry, radius) { - - var resolution = this.getResolution(); - - node.style.left = (geometry.x /resolution).toFixed() - radius; - node.style.top = (geometry.y /resolution).toFixed() - radius; - - var diameter = radius * 2; - - node.style.width = diameter; - node.style.height = diameter; - }, - - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawLineString: function(node, geometry) { - this.drawLine(node, geometry, false); - }, - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawLinearRing: function(node, geometry) { - this.drawLine(node, geometry, true); - }, - - /** - * @param {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @param {Boolean} closeLine Close the line? (make it a ring?) - * @private - */ - drawLine: function(node, geometry, closeLine) { - - this.setNodeDimension(node, geometry); - - var resolution = this.getResolution(); - - var path = "m"; - for (var i = 0; i < geometry.components.length; i++) { - var x = (geometry.components[i].x/resolution); - var y = (geometry.components[i].y/resolution); - path += " " + x.toFixed() + "," + y.toFixed() + " l "; - } - if (closeLine) { - path += " x"; - } - path += " e"; - - node.path = path; - }, - - /** - * @parm {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawPolygon: function(node, geometry) { - this.setNodeDimension(node, geometry); - - var resolution = this.getResolution(); - - var path = ""; - for (var j = 0; j < geometry.components.length; j++) { - var linearRing = geometry.components[j]; - - path += "m"; - for (var i = 0; i < linearRing.components.length; i++) { - var x = linearRing.components[i].x / resolution; - var y = linearRing.components[i].y / resolution; - path += " " + x.toFixed() + "," + y.toFixed(); - if (i==0) { - path += " l"; - } - } - path += " x "; - } - path += "e"; - node.path = path; - }, - - /** - * @parm {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawRectangle: function(node, geometry) { - var resolution = this.getResolution(); - - node.style.left = geometry.x/resolution; - node.style.top = geometry.y/resolution; - node.style.width = geometry.width/resolution; - node.style.height = geometry.height/resolution; - }, - - - - /** - * @parm {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawCurve: function(node, geometry) { - this.setNodeDimension(node, geometry); - - var resolution = this.getResolution(); - - var path = ""; - for (var i = 0; i < geometry.components.length; i++) { - var x = geometry.components[i].x / resolution; - var y = geometry.components[i].y / resolution; - - if ((i%3)==0 && (i/3)==0) { - path += "m" - } else if ((i%3)==1) { - path += " c" - } - path += " " + x + "," + y; - } - path += " x e"; - - node.path = path; - }, - - /** - * @parm {DOMElement} node - * @param {OpenLayers.Geometry} geometry - * @private - */ - drawSurface: function(node, geometry) { - - this.setNodeDimension(node, geometry); - - var resolution = this.getResolution(); - - var path = ""; - for (var i = 0; i < geometry.components.length; i++) { - var x = geometry.components[i].x / resolution; - var y = geometry.components[i].y / resolution; - if ((i%3)==0 && (i/3)==0) { - path += "m"; - } else if ((i%3)==1) { - path += " c"; - } - path += " " + x + "," + y; - } - path += " x e"; - - node.path = path; - }, - - CLASS_NAME: "OpenLayers.Renderer.VML" -}); diff --git a/pacotes/openlayers/lib/OpenLayers/SingleFile.js b/pacotes/openlayers/lib/OpenLayers/SingleFile.js deleted file mode 100644 index 005924e..0000000 --- a/pacotes/openlayers/lib/OpenLayers/SingleFile.js +++ /dev/null @@ -1,6 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - -_OPENLAYERS_SFL_=true; - diff --git a/pacotes/openlayers/lib/OpenLayers/Tile.js b/pacotes/openlayers/lib/OpenLayers/Tile.js deleted file mode 100644 index 09d2967..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Tile.js +++ /dev/null @@ -1,139 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/* - * @class - * @requires OpenLayers/Util.js - * - * This is a class designed to designate a single tile, however - * it is explicitly designed to do relatively little. Tiles store information - * about themselves -- such as the URL that they are related to, and their - * size - but do not add themselves to the layer div automatically, for - * example. - * - * TBD 3.0 - remove reference to url in above paragraph - * - */ -OpenLayers.Tile = OpenLayers.Class.create(); -OpenLayers.Tile.prototype = { - - /** @type String */ - id: null, - - /** @type OpenLayers.Layer */ - layer: null, - - /** TBD 3.0 - * @deprecated The base tile class does not need an url. This should be - * handled in subclasses. Does not belong here. - * - * @type String url of the request */ - url:null, - - /** @type OpenLayers.Bounds */ - bounds:null, - - /** @type OpenLayers.Size */ - size:null, - - /** Top Left pixel of the tile - * @type OpenLayers.Pixel */ - position:null, - - /** @type Boolean */ - drawn: false, - - /** TBD 3.0 -- remove 'url' from the list of parameters to the constructor. - * there is no need for the base tile class to have a url. - * - * @constructor - * - * @param {OpenLayers.Layer} layer - * @param {OpenLayers.Pixel} position - * @param {OpenLayers.Bounds} bounds - * @param {String} url - * @param {OpenLayers.Size} size - */ - initialize: function(layer, position, bounds, url, size) { - this.layer = layer; - this.position = position; - this.bounds = bounds; - this.url = url; - this.size = size; - - //give the tile a unique id based on its BBOX. - this.id = OpenLayers.Util.createUniqueID("Tile_"); - }, - - /** nullify references to prevent circular references and memory leaks - */ - destroy:function() { - this.layer = null; - this.bounds = null; - this.size = null; - this.position = null; - }, - - /** - */ - draw:function() { - this.clear(); - return ((this.layer.displayOutsideMaxExtent - || (this.layer.maxExtent - && this.bounds.intersectsBounds(this.layer.maxExtent, false))) - && !(this.layer.buffer == 0 - && !this.bounds.intersectsBounds(this.layer.map.getExtent(), false))); - }, - - /** - * @param {OpenLayers.Bounds} - * @param {OpenLayers.pixel} position - * @param {Boolean} redraw Redraw tile after moving? - * Default is true - */ - moveTo: function (bounds, position, redraw) { - if (redraw == null) { - redraw = true; - } - - this.clear(); - this.bounds = bounds.clone(); - this.position = position.clone(); - if (redraw) { - this.draw(); - } - }, - - /** Clear the tile of any bounds/position-related data so that it can - * be reused in a new location. - */ - clear: function() { - this.drawn = false; - }, - - getBoundsFromBaseLayer: function(position) { - var topLeft = this.layer.map.getLonLatFromLayerPx(position); - var bottomRightPx = position.clone(); - bottomRightPx.x += this.size.w; - bottomRightPx.y += this.size.h; - var bottomRight = this.layer.map.getLonLatFromLayerPx(bottomRightPx); - // Handle the case where the base layer wraps around the date line. - // Google does this, and it breaks WMS servers to request bounds in that fashion. - if (topLeft.lon > bottomRight.lon) { - if (topLeft.lon < 0) { - topLeft.lon = -180 - (topLeft.lon+180); - } else { - bottomRight.lon = 180+bottomRight.lon+180; - } - } - bounds = new OpenLayers.Bounds(topLeft.lon, bottomRight.lat, bottomRight.lon, topLeft.lat); - return bounds; - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Tile" -}; - - diff --git a/pacotes/openlayers/lib/OpenLayers/Tile/Image.js b/pacotes/openlayers/lib/OpenLayers/Tile/Image.js deleted file mode 100644 index cea0a5c..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Tile/Image.js +++ /dev/null @@ -1,207 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Tile.js - */ -OpenLayers.Tile.Image = OpenLayers.Class.create(); -OpenLayers.Tile.Image.prototype = - OpenLayers.Class.inherit( OpenLayers.Tile, { - - /** @type String */ - url: null, - - /** @type DOMElement img */ - imgDiv: null, - - /** - * The image element is appended to the frame. Any gutter on the image - * will be hidden behind the frame. - * - * @type DOMElement div */ - frame: null, - - /** TBD 3.0 - reorder the parameters to the init function to put URL - * as last, so we can continue to call tile.initialize() - * without changing the arguments. - * - * @constructor - * - * @param {OpenLayers.Grid} layer - * @param {OpenLayers.Pixel} position - * @param {OpenLayers.Bounds} bounds - * @param {String} url - * @param {OpenLayers.Size} size - */ - initialize: function(layer, position, bounds, url, size) { - OpenLayers.Tile.prototype.initialize.apply(this, arguments); - - this.url = url; - - this.frame = document.createElement('div'); - this.frame.style.overflow = 'hidden'; - this.frame.style.position = 'absolute'; - }, - - /** - * - */ - destroy: function() { - if (this.imgDiv != null) { - OpenLayers.Event.stopObservingElement(this.imgDiv.id); - if (this.imgDiv.parentNode == this.frame) { - this.frame.removeChild(this.imgDiv); - this.imgDiv.map = null; - } - } - this.imgDiv = null; - if ((this.frame != null) && (this.frame.parentNode == this.layer.div)) { - this.layer.div.removeChild(this.frame); - } - this.frame = null; - OpenLayers.Tile.prototype.destroy.apply(this, arguments); - }, - - /** - * - */ - draw:function() { - if (this.layer != this.layer.map.baseLayer && this.layer.reproject) { - this.bounds = this.getBoundsFromBaseLayer(this.position); - } - if (!OpenLayers.Tile.prototype.draw.apply(this, arguments)) { - return false; - } - if (this.imgDiv == null) { - this.initImgDiv(); - } - - this.imgDiv.viewRequestID = this.layer.map.viewRequestID; - - this.url = this.layer.getURL(this.bounds); - // position the frame - OpenLayers.Util.modifyDOMElement(this.frame, - null, this.position, this.size); - - if (this.layer.alpha) { - OpenLayers.Util.modifyAlphaImageDiv(this.imgDiv, - null, null, this.layer.imageSize, this.url); - } else { - this.imgDiv.src = this.url; - OpenLayers.Util.modifyDOMElement(this.imgDiv, - null, null, this.layer.imageSize) ; - } - this.drawn = true; - return true; - }, - - /** Clear the tile of any bounds/position-related data so that it can - * be reused in a new location. - */ - clear: function() { - OpenLayers.Tile.prototype.clear.apply(this, arguments); - if(this.imgDiv) { - this.imgDiv.style.display = "none"; - } - }, - - /** - * @param {OpenLayers.Bounds} - * @param {OpenLayers.pixel} position - * @param {Boolean} redraw - */ - moveTo: function (bounds, position, redraw) { - if (this.layer != this.layer.map.baseLayer && this.layer.reproject) { - bounds = this.getBoundsFromBaseLayer(position); - } - this.url = this.layer.getURL(bounds); - OpenLayers.Tile.prototype.moveTo.apply(this, arguments); - }, - - /** - * - */ - initImgDiv: function() { - if (this.layer.alpha) { - this.imgDiv = OpenLayers.Util.createAlphaImageDiv(null, - this.layer.imageOffset, - this.layer.imageSize, - null, - "relative", - null, - null, - null, - true); - } else { - this.imgDiv = OpenLayers.Util.createImage(null, - this.layer.imageOffset, - this.layer.imageSize, - null, - "relative", - null, - null, - true); - } - - this.imgDiv.className = 'olTileImage'; - - /* checkImgURL used to be used to called as a work around, but it - ended up hiding problems instead of solving them and broke things - like relative URLs. See discussion on the dev list: - http://openlayers.org/pipermail/dev/2007-January/000205.html - - OpenLayers.Event.observe( this.imgDiv, "load", - this.checkImgURL.bindAsEventListener(this) ); - */ - this.frame.appendChild(this.imgDiv); - this.layer.div.appendChild(this.frame); - - if(this.layer.opacity != null) { - - OpenLayers.Util.modifyDOMElement(this.imgDiv, null, null, null, - null, null, null, - this.layer.opacity); - } - - // we need this reference to check back the viewRequestID - this.imgDiv.map = this.layer.map; - - }, - - /** - * Make sure that the image that just loaded is the one this tile is meant - * to display, since panning/zooming might have changed the tile's URL in - * the meantime. If the tile URL did change before the image loaded, set - * the imgDiv display to 'none', as either (a) it will be reset to visible - * when the new URL loads in the image, or (b) we don't want to display - * this tile after all because its new bounds are outside our maxExtent. - * - * This function should no longer be neccesary with the improvements to - * Grid.js in OpenLayers 2.3. The lack of a good isEquivilantURL function - * caused problems in 2.2, but it's possible that with the improved - * isEquivilant URL function, this might be neccesary at some point. - * - * See discussion in the thread at - * http://openlayers.org/pipermail/dev/2007-January/000205.html - * - * @private - */ - checkImgURL: function () { - // Sometimes our image will load after it has already been removed - // from the map, in which case this check is not needed. - if (this.layer) { - var loaded = this.layer.alpha ? this.imgDiv.firstChild.src : this.imgDiv.src; - if (!OpenLayers.Util.isEquivalentUrl(loaded, this.url)) { - this.imgDiv.style.display = "none"; - } - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Tile.Image" - } -); diff --git a/pacotes/openlayers/lib/OpenLayers/Tile/WFS.js b/pacotes/openlayers/lib/OpenLayers/Tile/WFS.js deleted file mode 100644 index 6ebb5b1..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Tile/WFS.js +++ /dev/null @@ -1,124 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - * - * @requires OpenLayers/Tile.js - */ -OpenLayers.Tile.WFS = OpenLayers.Class.create(); -OpenLayers.Tile.WFS.prototype = - OpenLayers.Class.inherit( OpenLayers.Tile, { - - /** @type Array(OpenLayers.Feature)*/ - features: null, - - /** @type Array(String) */ - url: null, - - /** TBD 3.0 - reorder the parameters to the init function to put URL - * as last, so we can continue to call tile.initialize() - * without changing the arguments. - * - * @constructor - * - * @param {OpenLayers.Layer} layer - * @param {OpenLayers.Pixel} position - * @param {OpenLayers.Bounds} bounds - * @param {String} url - * @param {OpenLayers.Size} size - */ - initialize: function(layer, position, bounds, url, size) { - OpenLayers.Tile.prototype.initialize.apply(this, arguments); - this.url = url; - this.features = new Array(); - }, - - /** - * - */ - destroy: function() { - OpenLayers.Tile.prototype.destroy.apply(this, arguments); - this.destroyAllFeatures(); - this.features = null; - this.url = null; - }, - - /** Clear the tile of any bounds/position-related data so that it can - * be reused in a new location. - */ - clear: function() { - OpenLayers.Tile.prototype.clear.apply(this, arguments); - this.destroyAllFeatures(); - }, - - /** - * - */ - draw:function() { - if (OpenLayers.Tile.prototype.draw.apply(this, arguments)) { - this.loadFeaturesForRegion(this.requestSuccess); - } - }, - - /** get the full request string from the ds and the tile params - * and call the AJAX loadURL(). - * - * input are function pointers for what to do on success and failure. - * - * @param {function} success - * @param {function} failure - */ - loadFeaturesForRegion:function(success, failure) { - OpenLayers.loadURL(this.url, null, this, success); - }, - - /** Return from AJAX request - * - * @param {} request - */ - requestSuccess:function(request) { - var doc = request.responseXML; - - if (!doc || request.fileType!="XML") { - doc = OpenLayers.parseXMLString(request.responseText); - } - if (this.layer.vectorMode) { - var gml = new OpenLayers.Format.GML({extractAttributes: this.layer.options.extractAttributes}); - this.layer.addFeatures(gml.read(doc)); - } else { - var resultFeatures = OpenLayers.Ajax.getElementsByTagNameNS(doc, "http://www.opengis.net/gml","gml", "featureMember"); - this.addResults(resultFeatures); - } - }, - - /** - * @param {Object} results - */ - addResults: function(results) { - for (var i=0; i < results.length; i++) { - var feature = new this.layer.featureClass(this.layer, - results[i]); - this.features.push(feature); - } - }, - - - /** Iterate through and call destroy() on each feature, removing it from - * the local array - * - * @private - */ - destroyAllFeatures: function() { - while(this.features.length > 0) { - var feature = this.features.shift(); - feature.destroy(); - } - }, - - /** @final @type String */ - CLASS_NAME: "OpenLayers.Tile.WFS" - } -); diff --git a/pacotes/openlayers/lib/OpenLayers/Util.js b/pacotes/openlayers/lib/OpenLayers/Util.js deleted file mode 100644 index c0f43e3..0000000 --- a/pacotes/openlayers/lib/OpenLayers/Util.js +++ /dev/null @@ -1,968 +0,0 @@ -/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license. - * See http://svn.openlayers.org/trunk/openlayers/release-license.txt - * for the full text of the license. */ - - -/** - * @class - */ -OpenLayers.Util = new Object(); - -/** - * This is the old $() from prototype - */ -OpenLayers.Util.getElement = function() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') { - element = document.getElementById(element); - } - if (arguments.length == 1) { - return element; - } - elements.push(element); - } - return elements; -}; - -/** - * Maintain $() from prototype - */ -if ($ == null) { - var $ = OpenLayers.Util.getElement; -} - -/* from Prototype.js */ -OpenLayers.Util.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -}; - - -/** Remove an object from an array. Iterates through the array -* to find the item, then removes it. -* -* @param {Object} item -* -* @returns A reference to the array -* @type Array -*/ -OpenLayers.Util.removeItem = function(array, item) { - for(var i=0; i < array.length; i++) { - if(array[i] == item) { - array.splice(i,1); - //break;more than once?? - } - } - return array; -}; - -/** -*/ -OpenLayers.Util.clearArray = function(array) { - array.length = 0; -}; - -/** Seems to exist already in FF, but not in MOZ. - * - * @param {Array} array - * @param {Object} obj - */ -OpenLayers.Util.indexOf = function(array, obj) { - - for(var i=0; i < array.length; i++) { - if (array[i] == obj) return i; - } - return -1; -}; - - - -/** - * @param {String} id - * @param {OpenLayers.Pixel} px - * @param {OpenLayers.Size} sz - * @param {String} position - * @param {String} border - * @param {String} overflow - * @param {float} opacity Fractional value (0.0 - 1.0) - */ -OpenLayers.Util.modifyDOMElement = function(element, id, px, sz, position, - border, overflow, opacity) { - - if (id) { - element.id = id; - } - if (px) { - element.style.left = px.x + "px"; - element.style.top = px.y + "px"; - } - if (sz) { - element.style.width = sz.w + "px"; - element.style.height = sz.h + "px"; - } - if (position) { - element.style.position = position; - } - if (border) { - element.style.border = border; - } - if (overflow) { - element.style.overflow = overflow; - } - if (opacity) { - element.style.opacity = opacity; - element.style.filter = 'alpha(opacity=' + (opacity * 100) + ')'; - } -}; - -/** -* zIndex is NOT set -* -* @param {String} id -* @param {OpenLayers.Pixel} px -* @param {OpenLayers.Size} sz -* @param {String} imgURL -* @param {String} position -* @param {String} border -* @param {String} overflow -* @param {float} opacity Fractional value (0.0 - 1.0) -* -* @returns A DOM Div created with the specified attributes. -* @type DOMElement -*/ -OpenLayers.Util.createDiv = function(id, px, sz, imgURL, position, - border, overflow, opacity) { - - var dom = document.createElement('div'); - - if (imgURL) { - dom.style.backgroundImage = 'url(' + imgURL + ')'; - } - - //set generic properties - if (!id) { - id = OpenLayers.Util.createUniqueID("OpenLayersDiv"); - } - if (!position) { - position = "absolute"; - } - OpenLayers.Util.modifyDOMElement(dom, id, px, sz, position, - border, overflow, opacity); - - return dom; -}; - -/** -* @param {String} id -* @param {OpenLayers.Pixel} px -* @param {OpenLayers.Size} sz -* @param {String} imgURL -* @param {String} position -* @param {String} border -* @param {Boolean} delayDisplay -* @param {float} opacity Fractional value (0.0 - 1.0) -* -* @returns A DOM Image created with the specified attributes. -* @type DOMElement -*/ -OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border, - opacity, delayDisplay) { - - var image = document.createElement("img"); - - //set generic properties - if (!id) { - id = OpenLayers.Util.createUniqueID("OpenLayersDiv"); - } - if (!position) { - position = "relative"; - } - OpenLayers.Util.modifyDOMElement(image, id, px, sz, position, - border, null, opacity); - - if(delayDisplay) { - image.style.display = "none"; - OpenLayers.Event.observe(image, "load", - OpenLayers.Util.onImageLoad.bindAsEventListener(image)); - OpenLayers.Event.observe(image, "error", - OpenLayers.Util.onImageLoadError.bindAsEventListener(image)); - - } - - //set special properties - image.style.alt = id; - image.galleryImg = "no"; - if (imgURL) { - image.src = imgURL; - } - - - - return image; -}; - -/** - * @deprecated -- Use OpenLayers.Util.modifyDOMElement() or - * OpenLayers.Util.modifyAlphaImageDiv() - * - * Set the opacity of a DOM Element - * Note that for this function to work in IE, elements must "have layout" - * according to: - * http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/haslayout.asp - * - * @param {DOMElement} element Set the opacity on this DOM element - * @param {Float} opacity Opacity value (0.0 - 1.0) - */ -OpenLayers.Util.setOpacity = function(element, opacity) { - OpenLayers.Util.modifyDOMElement(element, null, null, null, - null, null, null, opacity); -} - -OpenLayers.Util.onImageLoad = function() { - // The complex check here is to solve issues described in #480. - // Every time a map view changes, it increments the 'viewRequestID' - // property. As the requests for the images for the new map view are sent - // out, they are tagged with this unique viewRequestID. - // - // If an image has no viewRequestID property set, we display it regardless, - // but if it does have a viewRequestID property, we check that it matches - // the viewRequestID set on the map. - // - // If the viewRequestID on the map has changed, that means that the user - // has changed the map view since this specific request was sent out, and - // therefore this tile does not need to be displayed (so we do not execute - // this code that turns its display on). - // - if (!this.viewRequestID || - (this.map && this.viewRequestID == this.map.viewRequestID)) { - this.style.backgroundColor = null; - this.style.display = ""; - } -}; - -OpenLayers.Util.onImageLoadErrorColor = "pink"; -OpenLayers.IMAGE_RELOAD_ATTEMPTS = 0; -OpenLayers.Util.onImageLoadError = function() { - this._attempts = (this._attempts) ? (this._attempts + 1) : 1; - if(this._attempts <= OpenLayers.IMAGE_RELOAD_ATTEMPTS) { - this.src = this.src; - } else { - this.style.backgroundColor = OpenLayers.Util.onImageLoadErrorColor; - } - this.style.display = ""; -}; - - -OpenLayers.Util.alphaHack = function() { - var arVersion = navigator.appVersion.split("MSIE"); - var version = parseFloat(arVersion[1]); - var filter = false; - - // IEs4Lin dies when trying to access document.body.filters, because - // the property is there, but requires a DLL that can't be provided. This - // means that we need to wrap this in a try/catch so that this can - // continue. - - try { - filter = document.body.filters; - } catch (e) { - } - - return ( filter && - (version >= 5.5) && (version < 7) ); -} - -/** -* @param {DOMElement} div Div containing Alpha-adjusted Image -* @param {String} id -* @param {OpenLayers.Pixel} px -* @param {OpenLayers.Size} sz -* @param {String} imgURL -* @param {String} position -* @param {String} border -* @param {String} sizing 'crop', 'scale', or 'image'. Default is "scale" -* @param {float} opacity Specified as fraction (0.4, etc) -*/ -OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL, - position, border, sizing, - opacity) { - - OpenLayers.Util.modifyDOMElement(div, id, px, sz); - - var img = div.childNodes[0]; - - if (imgURL) { - img.src = imgURL; - } - OpenLayers.Util.modifyDOMElement(img, div.id + "_innerImage", null, sz, - "relative", border); - if (opacity) { - div.style.opacity = opacity; - div.style.filter = 'alpha(opacity=' + (opacity * 100) + ')'; - } - - if (OpenLayers.Util.alphaHack()) { - - div.style.display = "inline-block"; - if (sizing == null) { - sizing = "scale"; - } - - div.style.filter = "progid:DXImageTransform.Microsoft" + - ".AlphaImageLoader(src='" + img.src + "', " + - "sizingMethod='" + sizing + "')"; - if (div.style.opacity) { - div.style.filter += " alpha(opacity=" + div.style.opacity * 100 + ")"; - } - - img.style.filter = "progid:DXImageTransform.Microsoft" + - ".Alpha(opacity=0)"; - } -}; - -/** -* @param {String} id -* @param {OpenLayers.Pixel} px -* @param {OpenLayers.Size} sz -* @param {String} imgURL -* @param {String} position -* @param {String} border -* @param {String} sizing 'crop', 'scale', or 'image'. Default is "scale" -* @param {Boolean} delayDisplay -* -* @returns A DOM Div created with a DOM Image inside it. If the hack is -* needed for transparency in IE, it is added. -* @type DOMElement -*/ -OpenLayers.Util.createAlphaImageDiv = function(id, px, sz, imgURL, - position, border, sizing, - opacity, delayDisplay) { - - var div = OpenLayers.Util.createDiv(); - var img = OpenLayers.Util.createImage(null, null, null, null, null, null, - null, false); - div.appendChild(img); - - if (delayDisplay) { - img.style.display = "none"; - OpenLayers.Event.observe(img, "load", - OpenLayers.Util.onImageLoad.bindAsEventListener(div)); - OpenLayers.Event.observe(img, "error", - OpenLayers.Util.onImageLoadError.bindAsEventListener(div)); - } - - OpenLayers.Util.modifyAlphaImageDiv(div, id, px, sz, imgURL, position, - border, sizing, opacity); - - return div; -}; - - -/** Creates a new hashtable and copies over all the keys from the -* passed-in object, but storing them under an uppercased -* version of the key at which they were stored. -* -* @param {Object} object -* -* @returns A new Object with all the same keys but uppercased -* @type Object -*/ -OpenLayers.Util.upperCaseObject = function (object) { - var uObject = new Object(); - for (var key in object) { - uObject[key.toUpperCase()] = object[key]; - } - return uObject; -}; - -/** Takes a hashtable and copies any keys that don't exist from -* another hashtable, by analogy with OpenLayers.Util.extend() from -* Prototype.js. -* -* @param {Object} to -* @param {Object} from -*/ -OpenLayers.Util.applyDefaults = function (to, from) { - for (var key in from) { - if (to[key] == null) { - to[key] = from[key]; - } - } -}; - -/** -* @param {Object} params -* -* @returns a concatenation of the properties of an object in -* http parameter notation. -* (ex. "key1=value1&key2=value2&key3=value3") -* If a parameter is actually a list, that parameter will then -* be set to a comma-seperated list of values (foo,bar) instead -* of being URL escaped (foo%3Abar). -* @type String -*/ -OpenLayers.Util.getParameterString = function(params) { - paramsArray = new Array(); - - for (var key in params) { - var value = params[key]; - if ((value != null) && (typeof value != 'function')) { - var encodedValue; - if (typeof value == 'object' && value.constructor == Array) { - /* value is an array; encode items and separate with "," */ - var encodedItemArray = new Array(); - for (var itemIndex=0; itemIndex 0)) - { - if (!index) { - index=0; - } - if (result[index].childNodes.length > 1) { - return result.childNodes[1].nodeValue; - } - else if (result[index].childNodes.length == 1) { - return result[index].firstChild.nodeValue; - } - } else { - return ""; - } -}; - -/** - * @param {XMLNode} node - * - * @returns The text value of the given node, without breaking in firefox or IE - * @type String - */ -OpenLayers.Util.getXmlNodeValue = function(node) { - var val = null; - OpenLayers.Util.Try( - function() { - val = node.text; - if (!val) - val = node.textContent; - if (!val) - val = node.firstChild.nodeValue; - }, - function() { - val = node.textContent; - }); - return val; -}; - -/** -* @param {Event} evt -* @param {HTMLDivElement} div -* -* @return {boolean} -*/ -OpenLayers.Util.mouseLeft = function (evt, div) { - // start with the element to which the mouse has moved - var target = (evt.relatedTarget) ? evt.relatedTarget : evt.toElement; - // walk up the DOM tree. - while (target != div && target != null) { - target = target.parentNode; - } - // if the target we stop at isn't the div, then we've left the div. - return (target != div); -}; - -OpenLayers.Util.rad = function(x) {return x*Math.PI/180;}; -OpenLayers.Util.distVincenty=function(p1, p2) { - var a = 6378137, b = 6356752.3142, f = 1/298.257223563; - var L = OpenLayers.Util.rad(p2.lon - p1.lon); - var U1 = Math.atan((1-f) * Math.tan(OpenLayers.Util.rad(p1.lat))); - var U2 = Math.atan((1-f) * Math.tan(OpenLayers.Util.rad(p2.lat))); - var sinU1 = Math.sin(U1), cosU1 = Math.cos(U1); - var sinU2 = Math.sin(U2), cosU2 = Math.cos(U2); - var lambda = L, lambdaP = 2*Math.PI; - var iterLimit = 20; - while (Math.abs(lambda-lambdaP) > 1e-12 && --iterLimit>0) { - var sinLambda = Math.sin(lambda), cosLambda = Math.cos(lambda); - var sinSigma = Math.sqrt((cosU2*sinLambda) * (cosU2*sinLambda) + - (cosU1*sinU2-sinU1*cosU2*cosLambda) * (cosU1*sinU2-sinU1*cosU2*cosLambda)); - if (sinSigma==0) return 0; // co-incident points - var cosSigma = sinU1*sinU2 + cosU1*cosU2*cosLambda; - var sigma = Math.atan2(sinSigma, cosSigma); - var alpha = Math.asin(cosU1 * cosU2 * sinLambda / sinSigma); - var cosSqAlpha = Math.cos(alpha) * Math.cos(alpha); - var cos2SigmaM = cosSigma - 2*sinU1*sinU2/cosSqAlpha; - var C = f/16*cosSqAlpha*(4+f*(4-3*cosSqAlpha)); - lambdaP = lambda; - lambda = L + (1-C) * f * Math.sin(alpha) * - (sigma + C*sinSigma*(cos2SigmaM+C*cosSigma*(-1+2*cos2SigmaM*cos2SigmaM))); - } - if (iterLimit==0) return NaN // formula failed to converge - var uSq = cosSqAlpha * (a*a - b*b) / (b*b); - var A = 1 + uSq/16384*(4096+uSq*(-768+uSq*(320-175*uSq))); - var B = uSq/1024 * (256+uSq*(-128+uSq*(74-47*uSq))); - var deltaSigma = B*sinSigma*(cos2SigmaM+B/4*(cosSigma*(-1+2*cos2SigmaM*cos2SigmaM)- - B/6*cos2SigmaM*(-3+4*sinSigma*sinSigma)*(-3+4*cos2SigmaM*cos2SigmaM))); - var s = b*A*(sigma-deltaSigma); - var d = s.toFixed(3)/1000; // round to 1mm precision - return d; -}; - -/** - * @param {String} url Optional url used to extract the query string. - * If null, query string is taken from page location. - * - * @returns An object of key/value pairs from the query string. - * @type Object - */ -OpenLayers.Util.getArgs = function(url) { - if(url == null) { - url = window.location.href; - } - var query = (url.indexOf('?') != -1) ? url.substring(url.indexOf('?') + 1) - : ''; - - var args = new Object(); - pairs = query.split(/[&;]/); - for(var i = 0; i < pairs.length; ++i) { - keyValue = pairs[i].split(/=/); - if(keyValue.length == 2) { - args[decodeURIComponent(keyValue[0])] = - decodeURIComponent(keyValue[1]); - } - } - return args; -} - -OpenLayers.Util.lastSeqID = 0; - -/** - * @param {String} prefix String to prefix random id. If null, default - * is "id_" - * - * @returns A unique id string, built on the passed in prefix - * @type String - */ -OpenLayers.Util.createUniqueID = function(prefix) { - if (prefix == null) { - prefix = "id_"; - } - OpenLayers.Util.lastSeqID += 1; - return prefix + OpenLayers.Util.lastSeqID; -}; - -/** Constant inches per unit - * -- borrowed from MapServer mapscale.c - * - * @type Object */ -OpenLayers.INCHES_PER_UNIT = { - 'inches': 1.0, - 'ft': 12.0, - 'mi': 63360.0, - 'm': 39.3701, - 'km': 39370.1, - 'dd': 4374754 -}; -OpenLayers.INCHES_PER_UNIT["in"]= OpenLayers.INCHES_PER_UNIT.inches; -OpenLayers.INCHES_PER_UNIT["degrees"] = OpenLayers.INCHES_PER_UNIT.dd; - -/** A sensible default - * @type int */ -OpenLayers.DOTS_PER_INCH = 72; - -/** - * @param {float} scale - * - * @returns A normalized scale value, in 1 / X format. - * This means that if a value less than one ( already 1/x) is passed - * in, it just returns scale directly. Otherwise, it returns - * 1 / scale - * @type float - */ -OpenLayers.Util.normalizeScale = function (scale) { - var normScale = (scale > 1.0) ? (1.0 / scale) - : scale; - return normScale; -}; - -/** - * @param {float} scale - * @param {String} units Index into OpenLayers.INCHES_PER_UNIT hashtable. - * Default is degrees - * - * @returns The corresponding resolution given passed-in scale and unit - * parameters. - * @type float - */ -OpenLayers.Util.getResolutionFromScale = function (scale, units) { - - if (units == null) { - units = "degrees"; - } - - var normScale = OpenLayers.Util.normalizeScale(scale); - - var resolution = 1 / (normScale * OpenLayers.INCHES_PER_UNIT[units] - * OpenLayers.DOTS_PER_INCH); - return resolution; -}; - -/** - * @param {float} resolution - * @param {String} units Index into OpenLayers.INCHES_PER_UNIT hashtable. - * Default is degrees - * - * @returns The corresponding scale given passed-in resolution and unit - * parameters. - * @type float - */ -OpenLayers.Util.getScaleFromResolution = function (resolution, units) { - - if (units == null) { - units = "degrees"; - } - - var scale = resolution * OpenLayers.INCHES_PER_UNIT[units] * - OpenLayers.DOTS_PER_INCH; - return scale; -}; - -/** @deprecated Please use directly OpenLayers.Event.stop() passing 'true' as - * the 2nd argument (preventDefault) - * - * Safely stop the propagation of an event *without* preventing - * the default browser action from occurring. - * - * @param {Event} evt - */ -OpenLayers.Util.safeStopPropagation = function(evt) { - OpenLayers.Event.stop(evt, true); -}; - -OpenLayers.Util.pagePosition = function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent==document.body) - if (OpenLayers.Element.getStyle(element,'position')=='absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } while (element = element.parentNode); - - return [valueL, valueT]; -}; - - -/** Test two URLs for equivalence. - * - * Setting 'ignoreCase' allows for case-independent comparison. - * - * Comparison is based on: - * - Protocol - * - Host (evaluated without the port) - * - Port (set 'ignorePort80' to ignore "80" values) - * - Hash ( set 'ignoreHash' to disable) - * - Pathname (for relative <-> absolute comparison) - * - Arguments (so they can be out of order) - * - * - * - * @param {String} url1 - * @param {String} url2 - * @param {Object} options allows for customization of comparison: - * 'ignoreCase' - Default is True - * 'ignorePort80' - Default is True - * 'ignoreHash' - Default is True - * - * @returns Whether or not the two URLs are equivalent - * @type Boolean - */ -OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) { - options = options || new Object(); - - OpenLayers.Util.applyDefaults(options, { - ignoreCase: true, - ignorePort80: true, - ignoreHash: true - }); - - urlObj1 = OpenLayers.Util.createUrlObject(url1, options); - urlObj2 = OpenLayers.Util.createUrlObject(url2, options); - - //compare all keys (host, port, etc) - for(var key in urlObj1) { - if (options.test) { - alert(key + "\n1:" + urlObj1[key] + "\n2:" + urlObj2[key]); - } - var val1 = urlObj1[key]; - var val2 = urlObj2[key]; - - switch(key) { - case "args": - //do nothing, they'll be treated below - break; - case "host": - case "port": - case "protocol": - if ((val1 == "") || (val2 == "")) { - //these will be blank for relative urls, so no need to - // compare them here -- call break. - // - break; - } - // otherwise continue with default compare - // - default: - if ( (key != "args") && (urlObj1[key] != urlObj2[key]) ) { - return false; - } - break; - } - - } - - // compare search args - irrespective of order - for(var key in urlObj1.args) { - if(urlObj1.args[key] != urlObj2.args[key]) { - return false; - } - delete urlObj2.args[key]; - } - // urlObj2 shouldn't have any args left - for(var key in urlObj2.args) { - return false; - } - - return true; -}; - -/** - * @private - * - * @param {String} url - * @param {Object} options - * - * @returns An object with separate url, a, port, host, and args parsed out - * and ready for comparison - * @type Object - */ -OpenLayers.Util.createUrlObject = function(url, options) { - options = options || new Object(); - - var urlObject = new Object(); - - if (options.ignoreCase) { - url = url.toLowerCase(); - } - - var a = document.createElement('a'); - a.href = url; - - //host (without port) - urlObject.host = a.host; - var port = a.port; - if (port.length <= 0) { - var newHostLength = urlObject.host.length - (port.length); - urlObject.host = urlObject.host.substring(0, newHostLength); - } - - //protocol - urlObject.protocol = a.protocol; - - //port - urlObject.port = ((port == "80") && (options.ignorePort80)) ? "" : port; - - //hash - urlObject.hash = (options.ignoreHash) ? "" : a.hash; - - //args - var queryString = a.search; - if (!queryString) { - var qMark = url.indexOf("?"); - queryString = (qMark != -1) ? url.substr(qMark) : ""; - } - urlObject.args = OpenLayers.Util.getArgs(queryString); - - - //pathname (this part allows for relative <-> absolute comparison) - if ( ((urlObject.protocol == "file:") && (url.indexOf("file:") != -1)) || - ((urlObject.protocol != "file:") && (urlObject.host != "")) ) { - - urlObject.pathname = a.pathname; - - //Test to see if the pathname includes the arguments (Opera) - var qIndex = urlObject.pathname.indexOf("?"); - if (qIndex != -1) { - urlObject.pathname = urlObject.pathname.substring(0, qIndex); - } - - } else { - var relStr = OpenLayers.Util.removeTail(url); - - var backs = 0; - do { - var index = relStr.indexOf("../"); - - if (index == 0) { - backs++ - relStr = relStr.substr(3); - } else if (index >= 0) { - var prevChunk = relStr.substr(0,index - 1); - - var slash = prevChunk.indexOf("/"); - prevChunk = (slash != -1) ? prevChunk.substr(0, slash +1) - : ""; - - var postChunk = relStr.substr(index + 3); - relStr = prevChunk + postChunk; - } - } while(index != -1) - - var windowAnchor = document.createElement("a"); - var windowUrl = window.location.href; - if (options.ignoreCase) { - windowUrl = windowUrl.toLowerCase(); - } - windowAnchor.href = windowUrl; - - //set protocol of window - urlObject.protocol = windowAnchor.protocol; - - var splitter = (windowAnchor.pathname.indexOf("/") != -1) ? "/" : "\\"; - var dirs = windowAnchor.pathname.split(splitter); - dirs.pop(); //remove filename - while ((backs > 0) && (dirs.length > 0)) { - dirs.pop(); - backs--; - } - relStr = dirs.join("/") + "/"+ relStr; - urlObject.pathname = relStr; - } - - if ((urlObject.protocol == "file:") || (urlObject.protocol == "")) { - urlObject.host = "localhost"; - } - - return urlObject; -}; - -/** - * @param {String} url - * - * @returns The string with all queryString and Hash removed - * @type String - */ -OpenLayers.Util.removeTail = function(url) { - var head = null; - - var qMark = url.indexOf("?"); - var hashMark = url.indexOf("#"); - - if (qMark == -1) { - head = (hashMark != -1) ? url.substr(0,hashMark) : url; - } else { - head = (hashMark != -1) ? url.substr(0,Math.min(qMark, hashMark)) - : url.substr(0, qMark); - } - return head; -}; diff --git a/pacotes/openlayers/lib/Prototype.js b/pacotes/openlayers/lib/Prototype.js deleted file mode 100644 index 07baf10..0000000 --- a/pacotes/openlayers/lib/Prototype.js +++ /dev/null @@ -1,1781 +0,0 @@ -/* Prototype JavaScript framework, version 1.4.0 - * (c) 2005 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://prototype.conio.net/ - * -/*--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.4.0', - ScriptFragment: '(?:)((\n|\r|.)*?)(?:<\/script>)', - - emptyFunction: function() {}, - K: function(x) {return x} -} - -var Class = { - create: function() { - return function() { - this.initialize.apply(this, arguments); - } - } -} - -var Abstract = new Object(); - -Object.extend = function(destination, source) { - for (property in source) { - destination[property] = source[property]; - } - return destination; -} - -Object.inspect = function(object) { - try { - if (object == undefined) return 'undefined'; - if (object == null) return 'null'; - return object.inspect ? object.inspect() : object.toString(); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } -} - -Function.prototype.bind = function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } -} - -Function.prototype.bindAsEventListener = function(object) { - var __method = this; - return function(event) { - return __method.call(object, event || window.event); - } -} - -Object.extend(Number.prototype, { - toColorPart: function() { - var digits = this.toString(16); - if (this < 16) return '0' + digits; - return digits; - }, - - succ: function() { - return this + 1; - }, - - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; - } -}); - -var Try = { - these: function() { - var returnValue; - - for (var i = 0; i < arguments.length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) {} - } - - return returnValue; - } -} - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create(); -PeriodicalExecuter.prototype = { - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.callback(); - } finally { - this.currentlyExecuting = false; - } - } - } -} - -/*--------------------------------------------------------------------------*/ - -function $() { - var elements = new Array(); - - for (var i = 0; i < arguments.length; i++) { - var element = arguments[i]; - if (typeof element == 'string') - element = document.getElementById(element); - - if (arguments.length == 1) - return element; - - elements.push(element); - } - - return elements; -} -Object.extend(String.prototype, { - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - stripScripts: function() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - }, - - extractScripts: function() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - }, - - evalScripts: function() { - return this.extractScripts().map(eval); - }, - - escapeHTML: function() { - var div = document.createElement('div'); - var text = document.createTextNode(this); - div.appendChild(text); - return div.innerHTML; - }, - - unescapeHTML: function() { - var div = document.createElement('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0] ? div.childNodes[0].nodeValue : ''; - }, - - toQueryParams: function() { - var pairs = this.match(/^\??(.*)$/)[1].split('&'); - return pairs.inject({}, function(params, pairString) { - var pair = pairString.split('='); - params[pair[0]] = pair[1]; - return params; - }); - }, - - toArray: function() { - return this.split(''); - }, - - camelize: function() { - var oStringList = this.split('-'); - if (oStringList.length == 1) return oStringList[0]; - - var camelizedString = this.indexOf('-') == 0 - ? oStringList[0].charAt(0).toUpperCase() + oStringList[0].substring(1) - : oStringList[0]; - - for (var i = 1, len = oStringList.length; i < len; i++) { - var s = oStringList[i]; - camelizedString += s.charAt(0).toUpperCase() + s.substring(1); - } - - return camelizedString; - }, - - inspect: function() { - return "'" + this.replace('\\', '\\\\').replace("'", '\\\'') + "'"; - } -}); - -String.prototype.parseQuery = String.prototype.toQueryParams; - -var $break = new Object(); -var $continue = new Object(); - -var Enumerable = { - each: function(iterator) { - var index = 0; - try { - this._each(function(value) { - try { - iterator(value, index++); - } catch (e) { - if (e != $continue) throw e; - } - }); - } catch (e) { - if (e != $break) throw e; - } - }, - - all: function(iterator) { - var result = true; - this.each(function(value, index) { - result = result && !!(iterator || Prototype.K)(value, index); - if (!result) throw $break; - }); - return result; - }, - - any: function(iterator) { - var result = true; - this.each(function(value, index) { - if (result = !!(iterator || Prototype.K)(value, index)) - throw $break; - }); - return result; - }, - - collect: function(iterator) { - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function (iterator) { - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw $break; - } - }); - return result; - }, - - findAll: function(iterator) { - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(pattern, iterator) { - var results = []; - this.each(function(value, index) { - var stringValue = value.toString(); - if (stringValue.match(pattern)) - results.push((iterator || Prototype.K)(value, index)); - }) - return results; - }, - - include: function(object) { - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - }, - - inject: function(memo, iterator) { - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.collect(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value >= (result || value)) - result = value; - }); - return result; - }, - - min: function(iterator) { - var result; - this.each(function(value, index) { - value = (iterator || Prototype.K)(value, index); - if (value <= (result || value)) - result = value; - }); - return result; - }, - - partition: function(iterator) { - var trues = [], falses = []; - this.each(function(value, index) { - ((iterator || Prototype.K)(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value, index) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator) { - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator) { - return this.collect(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.collect(Prototype.K); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (typeof args.last() == 'function') - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - iterator(value = collections.pluck(index)); - return value; - }); - }, - - inspect: function() { - return '#'; - } -} - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray -}); -var $A = Array.from = function(iterable) { - if (!iterable) return []; - if (iterable.toArray) { - return iterable.toArray(); - } else { - var results = []; - for (var i = 0; i < iterable.length; i++) - results.push(iterable[i]); - return results; - } -} - -Object.extend(Array.prototype, Enumerable); - -Array.prototype._reverse = Array.prototype.reverse; - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0; i < this.length; i++) - iterator(this[i]); - }, - - clear: function() { - this.length = 0; - return this; - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - }, - - compact: function() { - return this.select(function(value) { - return value != undefined || value != null; - }); - }, - - flatten: function() { - return this.inject([], function(array, value) { - return array.concat(value.constructor == Array ? - value.flatten() : [value]); - }); - }, - - without: function() { - var values = $A(arguments); - return this.select(function(value) { - return !values.include(value); - }); - }, - - indexOf: function(object) { - for (var i = 0; i < this.length; i++) - if (this[i] == object) return i; - return -1; - }, - - reverse: function(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - }, - - shift: function() { - var result = this[0]; - for (var i = 0; i < this.length - 1; i++) - this[i] = this[i + 1]; - this.length--; - return result; - }, - - inspect: function() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - } -}); -var Hash = { - _each: function(iterator) { - for (key in this) { - var value = this[key]; - if (typeof value == 'function') continue; - - var pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - }, - - keys: function() { - return this.pluck('key'); - }, - - values: function() { - return this.pluck('value'); - }, - - merge: function(hash) { - return $H(hash).inject($H(this), function(mergedHash, pair) { - mergedHash[pair.key] = pair.value; - return mergedHash; - }); - }, - - toQueryString: function() { - return this.map(function(pair) { - return pair.map(encodeURIComponent).join('='); - }).join('&'); - }, - - inspect: function() { - return '#'; - } -} - -function $H(object) { - var hash = Object.extend({}, object || {}); - Object.extend(hash, Enumerable); - Object.extend(hash, Hash); - return hash; -} -ObjectRange = Class.create(); -Object.extend(ObjectRange.prototype, Enumerable); -Object.extend(ObjectRange.prototype, { - initialize: function(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - }, - - _each: function(iterator) { - var value = this.start; - do { - iterator(value); - value = value.succ(); - } while (this.include(value)); - }, - - include: function(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } -}); - -var $R = function(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -} - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')}, - function() {return new XMLHttpRequest()} - ) || false; - }, - - activeRequestCount: 0 -} - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responderToAdd) { - if (!this.include(responderToAdd)) - this.responders.push(responderToAdd); - }, - - unregister: function(responderToRemove) { - this.responders = this.responders.without(responderToRemove); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (responder[callback] && typeof responder[callback] == 'function') { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) {} - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { - Ajax.activeRequestCount++; - }, - - onComplete: function() { - Ajax.activeRequestCount--; - } -}); - -Ajax.Base = function() {}; -Ajax.Base.prototype = { - setOptions: function(options) { - this.options = { - method: 'post', - asynchronous: true, - parameters: '' - } - Object.extend(this.options, options || {}); - }, - - responseIsSuccess: function() { - return this.transport.status == undefined - || this.transport.status == 0 - || (this.transport.status >= 200 && this.transport.status < 300); - }, - - responseIsFailure: function() { - return !this.responseIsSuccess(); - } -} - -Ajax.Request = Class.create(); -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Request.prototype = Object.extend(new Ajax.Base(), { - initialize: function(url, options) { - this.transport = Ajax.getTransport(); - this.setOptions(options); - this.request(url); - }, - - request: function(url) { - var parameters = this.options.parameters || ''; - if (parameters.length > 0) parameters += '&_='; - - try { - this.url = url; - if (this.options.method == 'get' && parameters.length > 0) - this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; - - Ajax.Responders.dispatch('onCreate', this, this.transport); - - this.transport.open(this.options.method, this.url, - this.options.asynchronous); - - if (this.options.asynchronous) { - this.transport.onreadystatechange = this.onStateChange.bind(this); - setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); - } - - this.setRequestHeaders(); - - var body = this.options.postBody ? this.options.postBody : parameters; - this.transport.send(this.options.method == 'post' ? body : null); - - } catch (e) { - this.dispatchException(e); - } - }, - - setRequestHeaders: function() { - var requestHeaders = - ['X-Requested-With', 'XMLHttpRequest', - 'X-Prototype-Version', Prototype.Version]; - - if (this.options.method == 'post') { - requestHeaders.push('Content-type', - 'application/x-www-form-urlencoded'); - - /* Force "Connection: close" for Mozilla browsers to work around - * a bug where XMLHttpReqeuest sends an incorrect Content-length - * header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType) - requestHeaders.push('Connection', 'close'); - } - - if (this.options.requestHeaders) - requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); - - for (var i = 0; i < requestHeaders.length; i += 2) - this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState != 1) - this.respondToReadyState(this.transport.readyState); - }, - - header: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) {} - }, - - evalJSON: function() { - try { - return eval(this.header('X-JSON')); - } catch (e) {} - }, - - evalResponse: function() { - try { - return eval(this.transport.responseText); - } catch (e) { - this.dispatchException(e); - } - }, - - respondToReadyState: function(readyState) { - var event = Ajax.Request.Events[readyState]; - var transport = this.transport, json = this.evalJSON(); - - if (event == 'Complete') { - try { - (this.options['on' + this.transport.status] - || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(transport, json); - } catch (e) { - this.dispatchException(e); - } - - if ((this.header('Content-type') || '').match(/^text\/javascript/i)) - this.evalResponse(); - } - - try { - (this.options['on' + event] || Prototype.emptyFunction)(transport, json); - Ajax.Responders.dispatch('on' + event, this, transport, json); - } catch (e) { - this.dispatchException(e); - } - - /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ - if (event == 'Complete') - this.transport.onreadystatechange = Prototype.emptyFunction; - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Updater = Class.create(); - -Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), { - initialize: function(container, url, options) { - this.containers = { - success: container.success ? $(container.success) : $(container), - failure: container.failure ? $(container.failure) : - (container.success ? null : $(container)) - } - - this.transport = Ajax.getTransport(); - this.setOptions(options); - - var onComplete = this.options.onComplete || Prototype.emptyFunction; - this.options.onComplete = (function(transport, object) { - this.updateContent(); - onComplete(transport, object); - }).bind(this); - - this.request(url); - }, - - updateContent: function() { - var receiver = this.responseIsSuccess() ? - this.containers.success : this.containers.failure; - var response = this.transport.responseText; - - if (!this.options.evalScripts) - response = response.stripScripts(); - - if (receiver) { - if (this.options.insertion) { - new this.options.insertion(receiver, response); - } else { - Element.update(receiver, response); - } - } - - if (this.responseIsSuccess()) { - if (this.onComplete) - setTimeout(this.onComplete.bind(this), 10); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(); -Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), { - initialize: function(container, url, options) { - this.setOptions(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = {}; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(request) { - if (this.options.decay) { - this.decay = (request.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = request.responseText; - } - this.timer = setTimeout(this.onTimerEvent.bind(this), - this.decay * this.frequency * 1000); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); -document.getElementsByClassName = function(className, parentElement) { - var children = ($(parentElement) || document.body).getElementsByTagName('*'); - return $A(children).inject([], function(elements, child) { - if (child.className.match(new RegExp("(^|\\s)" + className + "(\\s|$)"))) - elements.push(child); - return elements; - }); -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Element) { - var Element = new Object(); -} - -Object.extend(Element, { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - Element[Element.visible(element) ? 'hide' : 'show'](element); - } - }, - - hide: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = 'none'; - } - }, - - show: function() { - for (var i = 0; i < arguments.length; i++) { - var element = $(arguments[i]); - element.style.display = ''; - } - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - }, - - update: function(element, html) { - $(element).innerHTML = html.stripScripts(); - setTimeout(function() {html.evalScripts()}, 10); - }, - - getHeight: function(element) { - element = $(element); - return element.offsetHeight; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).include(className); - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).add(className); - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - return Element.classNames(element).remove(className); - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - for (var i = 0; i < element.childNodes.length; i++) { - var node = element.childNodes[i]; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - Element.remove(node); - } - }, - - empty: function(element) { - return $(element).innerHTML.match(/^\s*$/); - }, - - scrollTo: function(element) { - element = $(element); - var x = element.x ? element.x : element.offsetLeft, - y = element.y ? element.y : element.offsetTop; - window.scrollTo(x, y); - }, - - getStyle: function(element, style) { - element = $(element); - var value = element.style[style.camelize()]; - if (!value) { - if (document.defaultView && document.defaultView.getComputedStyle) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css.getPropertyValue(style) : null; - } else if (element.currentStyle) { - value = element.currentStyle[style.camelize()]; - } - } - - if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) - if (Element.getStyle(element, 'position') == 'static') value = 'auto'; - - return value == 'auto' ? null : value; - }, - - setStyle: function(element, style) { - element = $(element); - for (name in style) - element.style[name.camelize()] = style[name]; - }, - - getDimensions: function(element) { - element = $(element); - if (Element.getStyle(element, 'display') != 'none') - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = ''; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = 'none'; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - // Opera returns the offset relative to the positioning context, when an - // element is position relative but top and left have not been defined - if (window.opera) { - element.style.top = 0; - element.style.left = 0; - } - } - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return; - element._overflow = element.style.overflow; - if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden') - element.style.overflow = 'hidden'; - }, - - undoClipping: function(element) { - element = $(element); - if (element._overflow) return; - element.style.overflow = element._overflow; - element._overflow = undefined; - } -}); - -var Toggle = new Object(); -Toggle.display = Element.toggle; - -/*--------------------------------------------------------------------------*/ - -Abstract.Insertion = function(adjacency) { - this.adjacency = adjacency; -} - -Abstract.Insertion.prototype = { - initialize: function(element, content) { - this.element = $(element); - this.content = content.stripScripts(); - - if (this.adjacency && this.element.insertAdjacentHTML) { - try { - this.element.insertAdjacentHTML(this.adjacency, this.content); - } catch (e) { - if (this.element.tagName.toLowerCase() == 'tbody') { - this.insertContent(this.contentFromAnonymousTable()); - } else { - throw e; - } - } - } else { - this.range = this.element.ownerDocument.createRange(); - if (this.initializeRange) this.initializeRange(); - this.insertContent([this.range.createContextualFragment(this.content)]); - } - - setTimeout(function() {content.evalScripts()}, 10); - }, - - contentFromAnonymousTable: function() { - var div = document.createElement('div'); - div.innerHTML = '' + this.content + '
'; - return $A(div.childNodes[0].childNodes[0].childNodes); - } -} - -var Insertion = new Object(); - -Insertion.Before = Class.create(); -Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), { - initializeRange: function() { - this.range.setStartBefore(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, this.element); - }).bind(this)); - } -}); - -Insertion.Top = Class.create(); -Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(true); - }, - - insertContent: function(fragments) { - fragments.reverse(false).each((function(fragment) { - this.element.insertBefore(fragment, this.element.firstChild); - }).bind(this)); - } -}); - -Insertion.Bottom = Class.create(); -Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), { - initializeRange: function() { - this.range.selectNodeContents(this.element); - this.range.collapse(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.appendChild(fragment); - }).bind(this)); - } -}); - -Insertion.After = Class.create(); -Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), { - initializeRange: function() { - this.range.setStartAfter(this.element); - }, - - insertContent: function(fragments) { - fragments.each((function(fragment) { - this.element.parentNode.insertBefore(fragment, - this.element.nextSibling); - }).bind(this)); - } -}); - -/*--------------------------------------------------------------------------*/ - -Element.ClassNames = Class.create(); -Element.ClassNames.prototype = { - initialize: function(element) { - this.element = $(element); - }, - - _each: function(iterator) { - this.element.className.split(/\s+/).select(function(name) { - return name.length > 0; - })._each(iterator); - }, - - set: function(className) { - this.element.className = className; - }, - - add: function(classNameToAdd) { - if (this.include(classNameToAdd)) return; - this.set(this.toArray().concat(classNameToAdd).join(' ')); - }, - - remove: function(classNameToRemove) { - if (!this.include(classNameToRemove)) return; - this.set(this.select(function(className) { - return className != classNameToRemove; - }).join(' ')); - }, - - toString: function() { - return this.toArray().join(' '); - } -} - -Object.extend(Element.ClassNames.prototype, Enumerable); -var Field = { - clear: function() { - for (var i = 0; i < arguments.length; i++) - $(arguments[i]).value = ''; - }, - - focus: function(element) { - $(element).focus(); - }, - - present: function() { - for (var i = 0; i < arguments.length; i++) - if ($(arguments[i]).value == '') return false; - return true; - }, - - select: function(element) { - $(element).select(); - }, - - activate: function(element) { - element = $(element); - element.focus(); - if (element.select) - element.select(); - } -} - -/*--------------------------------------------------------------------------*/ - -var Form = { - serialize: function(form) { - var elements = Form.getElements($(form)); - var queryComponents = new Array(); - - for (var i = 0; i < elements.length; i++) { - var queryComponent = Form.Element.serialize(elements[i]); - if (queryComponent) - queryComponents.push(queryComponent); - } - - return queryComponents.join('&'); - }, - - getElements: function(form) { - form = $(form); - var elements = new Array(); - - for (tagName in Form.Element.Serializers) { - var tagElements = form.getElementsByTagName(tagName); - for (var j = 0; j < tagElements.length; j++) - elements.push(tagElements[j]); - } - return elements; - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) - return inputs; - - var matchingInputs = new Array(); - for (var i = 0; i < inputs.length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || - (name && input.name != name)) - continue; - matchingInputs.push(input); - } - - return matchingInputs; - }, - - disable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.blur(); - element.disabled = 'true'; - } - }, - - enable: function(form) { - var elements = Form.getElements(form); - for (var i = 0; i < elements.length; i++) { - var element = elements[i]; - element.disabled = ''; - } - }, - - findFirstElement: function(form) { - return Form.getElements(form).find(function(element) { - return element.type != 'hidden' && !element.disabled && - ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); - }); - }, - - focusFirstElement: function(form) { - Field.activate(Form.findFirstElement(form)); - }, - - reset: function(form) { - $(form).reset(); - } -} - -Form.Element = { - serialize: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) { - var key = encodeURIComponent(parameter[0]); - if (key.length == 0) return; - - if (parameter[1].constructor != Array) - parameter[1] = [parameter[1]]; - - return parameter[1].map(function(value) { - return key + '=' + encodeURIComponent(value); - }).join('&'); - } - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - var parameter = Form.Element.Serializers[method](element); - - if (parameter) - return parameter[1]; - } -} - -Form.Element.Serializers = { - input: function(element) { - switch (element.type.toLowerCase()) { - case 'submit': - case 'hidden': - case 'password': - case 'text': - return Form.Element.Serializers.textarea(element); - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element); - } - return false; - }, - - inputSelector: function(element) { - if (element.checked) - return [element.name, element.value]; - }, - - textarea: function(element) { - return [element.name, element.value]; - }, - - select: function(element) { - return Form.Element.Serializers[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - }, - - selectOne: function(element) { - var value = '', opt, index = element.selectedIndex; - if (index >= 0) { - opt = element.options[index]; - value = opt.value; - if (!value && !('value' in opt)) - value = opt.text; - } - return [element.name, value]; - }, - - selectMany: function(element) { - var value = new Array(); - for (var i = 0; i < element.length; i++) { - var opt = element.options[i]; - if (opt.selected) { - var optValue = opt.value; - if (!optValue && !('value' in opt)) - optValue = opt.text; - value.push(optValue); - } - } - return [element.name, value]; - } -} - -/*--------------------------------------------------------------------------*/ - -var $F = Form.Element.getValue; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = function() {} -Abstract.TimedObserver.prototype = { - initialize: function(element, frequency, callback) { - this.frequency = frequency; - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - this.registerCallback(); - }, - - registerCallback: function() { - setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - onTimerEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - } -} - -Form.Element.Observer = Class.create(); -Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(); -Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = function() {} -Abstract.EventObserver.prototype = { - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - var elements = Form.getElements(this.element); - for (var i = 0; i < elements.length; i++) - this.registerCallback(elements[i]); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - case 'password': - case 'text': - case 'textarea': - case 'select-one': - case 'select-multiple': - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -} - -Form.Element.EventObserver = Class.create(); -Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(); -Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), { - getValue: function() { - return Form.serialize(this.element); - } -}); -if (!window.Event) { - var Event = new Object(); -} - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - - element: function(event) { - return event.target || event.srcElement; - }, - - isLeftClick: function(event) { - return (((event.which) && (event.which == 1)) || - ((event.button) && (event.button == 1))); - }, - - pointerX: function(event) { - return event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)); - }, - - pointerY: function(event) { - return event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)); - }, - - stop: function(event) { - if (event.preventDefault) { - event.preventDefault(); - event.stopPropagation(); - } else { - event.returnValue = false; - event.cancelBubble = true; - } - }, - - // find the first node with the given tagName, starting from the - // node the event was triggered on; traverses the DOM upwards - findElement: function(event, tagName) { - var element = Event.element(event); - while (element.parentNode && (!element.tagName || - (element.tagName.toUpperCase() != tagName.toUpperCase()))) - element = element.parentNode; - return element; - }, - - observers: false, - - _observeAndCache: function(element, name, observer, useCapture) { - if (!this.observers) this.observers = []; - if (element.addEventListener) { - this.observers.push([element, name, observer, useCapture]); - element.addEventListener(name, observer, useCapture); - } else if (element.attachEvent) { - this.observers.push([element, name, observer, useCapture]); - element.attachEvent('on' + name, observer); - } - }, - - unloadCache: function() { - if (!Event.observers) return; - for (var i = 0; i < Event.observers.length; i++) { - Event.stopObserving.apply(this, Event.observers[i]); - Event.observers[i][0] = null; - } - Event.observers = false; - }, - - observe: function(elementParam, name, observer, useCapture) { - var element = $(elementParam); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.attachEvent)) - name = 'keydown'; - - this._observeAndCache(element, name, observer, useCapture); - }, - - stopObserving: function(elementParam, name, observer, useCapture) { - var element = $(elementParam); - useCapture = useCapture || false; - - if (name == 'keypress' && - (navigator.appVersion.match(/Konqueror|Safari|KHTML/) - || element.detachEvent)) - name = 'keydown'; - - if (element.removeEventListener) { - element.removeEventListener(name, observer, useCapture); - } else if (element.detachEvent) { - element.detachEvent('on' + name, observer); - } - } -}); - -/* prevent memory leaks in IE */ -Event.observe(window, 'unload', Event.unloadCache, false); -var Position = { - // set to true if needed, warning: firefox performance problems - // NOT neeeded for page scrolling, only if draggable contained in - // scrollable elements - includeScrollOffsets: false, - - // must be called before calling withinIncludingScrolloffset, every time the - // page is scrolled - prepare: function() { - this.deltaX = window.pageXOffset - || document.documentElement.scrollLeft - || document.body.scrollLeft - || 0; - this.deltaY = window.pageYOffset - || document.documentElement.scrollTop - || document.body.scrollTop - || 0; - }, - - realOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return [valueL, valueT]; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return [valueL, valueT]; - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - p = Element.getStyle(element, 'position'); - if (p == 'relative' || p == 'absolute') break; - } - } while (element); - return [valueL, valueT]; - }, - - offsetParent: function(element) { - if (element.offsetParent) return element.offsetParent; - if (element == document.body) return element; - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return element; - - return document.body; - }, - - // caches x/y coordinate pair to use with overlap - within: function(element, x, y) { - if (this.includeScrollOffsets) - return this.withinIncludingScrolloffsets(element, x, y); - this.xcomp = x; - this.ycomp = y; - this.offset = this.cumulativeOffset(element); - - return (y >= this.offset[1] && - y < this.offset[1] + element.offsetHeight && - x >= this.offset[0] && - x < this.offset[0] + element.offsetWidth); - }, - - withinIncludingScrolloffsets: function(element, x, y) { - var offsetcache = this.realOffset(element); - - this.xcomp = x + offsetcache[0] - this.deltaX; - this.ycomp = y + offsetcache[1] - this.deltaY; - this.offset = this.cumulativeOffset(element); - - return (this.ycomp >= this.offset[1] && - this.ycomp < this.offset[1] + element.offsetHeight && - this.xcomp >= this.offset[0] && - this.xcomp < this.offset[0] + element.offsetWidth); - }, - - // within must be called directly before - overlap: function(mode, element) { - if (!mode) return 0; - if (mode == 'vertical') - return ((this.offset[1] + element.offsetHeight) - this.ycomp) / - element.offsetHeight; - if (mode == 'horizontal') - return ((this.offset[0] + element.offsetWidth) - this.xcomp) / - element.offsetWidth; - }, - - clone: function(source, target) { - source = $(source); - target = $(target); - target.style.position = 'absolute'; - var offsets = this.cumulativeOffset(source); - target.style.top = offsets[1] + 'px'; - target.style.left = offsets[0] + 'px'; - target.style.width = source.offsetWidth + 'px'; - target.style.height = source.offsetHeight + 'px'; - }, - - page: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent==document.body) - if (Element.getStyle(element,'position')=='absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } while (element = element.parentNode); - - return [valueL, valueT]; - }, - - clone: function(source, target) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || {}) - - // find page position of source - source = $(source); - var p = Position.page(source); - - // find coordinate system to use - target = $(target); - var delta = [0, 0]; - var parent = null; - // delta [0,0] will do fine with position: fixed elements, - // position:absolute needs offsetParent deltas - if (Element.getStyle(target,'position') == 'absolute') { - parent = Position.offsetParent(target); - delta = Position.page(parent); - } - - // correct by body offsets (fixes Safari) - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - // set position - if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if(options.setWidth) target.style.width = source.offsetWidth + 'px'; - if(options.setHeight) target.style.height = source.offsetHeight + 'px'; - }, - - absolutize: function(element) { - element = $(element); - if (element.style.position == 'absolute') return; - Position.prepare(); - - var offsets = Position.positionedOffset(element); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px';; - element.style.left = left + 'px';; - element.style.width = width + 'px';; - element.style.height = height + 'px';; - }, - - relativize: function(element) { - element = $(element); - if (element.style.position == 'relative') return; - Position.prepare(); - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - } -} - -// Safari returns margins on body which is incorrect if the child is absolutely -// positioned. For performance reasons, redefine Position.cumulativeOffset for -// KHTML/WebKit only. -if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) { - Position.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return [valueL, valueT]; - } -} diff --git a/pacotes/openlayers/lib/Rico/Color.js b/pacotes/openlayers/lib/Rico/Color.js deleted file mode 100644 index ec7d23d..0000000 --- a/pacotes/openlayers/lib/Rico/Color.js +++ /dev/null @@ -1,235 +0,0 @@ -OpenLayers.Rico.Color = OpenLayers.Class.create(); - -OpenLayers.Rico.Color.prototype = { - - initialize: function(red, green, blue) { - this.rgb = { r: red, g : green, b : blue }; - }, - - setRed: function(r) { - this.rgb.r = r; - }, - - setGreen: function(g) { - this.rgb.g = g; - }, - - setBlue: function(b) { - this.rgb.b = b; - }, - - setHue: function(h) { - - // get an HSB model, and set the new hue... - var hsb = this.asHSB(); - hsb.h = h; - - // convert back to RGB... - this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); - }, - - setSaturation: function(s) { - // get an HSB model, and set the new hue... - var hsb = this.asHSB(); - hsb.s = s; - - // convert back to RGB and set values... - this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, hsb.b); - }, - - setBrightness: function(b) { - // get an HSB model, and set the new hue... - var hsb = this.asHSB(); - hsb.b = b; - - // convert back to RGB and set values... - this.rgb = OpenLayers.Rico.Color.HSBtoRGB( hsb.h, hsb.s, hsb.b ); - }, - - darken: function(percent) { - var hsb = this.asHSB(); - this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.max(hsb.b - percent,0)); - }, - - brighten: function(percent) { - var hsb = this.asHSB(); - this.rgb = OpenLayers.Rico.Color.HSBtoRGB(hsb.h, hsb.s, Math.min(hsb.b + percent,1)); - }, - - blend: function(other) { - this.rgb.r = Math.floor((this.rgb.r + other.rgb.r)/2); - this.rgb.g = Math.floor((this.rgb.g + other.rgb.g)/2); - this.rgb.b = Math.floor((this.rgb.b + other.rgb.b)/2); - }, - - isBright: function() { - var hsb = this.asHSB(); - return this.asHSB().b > 0.5; - }, - - isDark: function() { - return ! this.isBright(); - }, - - asRGB: function() { - return "rgb(" + this.rgb.r + "," + this.rgb.g + "," + this.rgb.b + ")"; - }, - - asHex: function() { - return "#" + this.rgb.r.toColorPart() + this.rgb.g.toColorPart() + this.rgb.b.toColorPart(); - }, - - asHSB: function() { - return OpenLayers.Rico.Color.RGBtoHSB(this.rgb.r, this.rgb.g, this.rgb.b); - }, - - toString: function() { - return this.asHex(); - } - -}; - -OpenLayers.Rico.Color.createFromHex = function(hexCode) { - if(hexCode.length==4) { - var shortHexCode = hexCode; - var hexCode = '#'; - for(var i=1;i<4;i++) hexCode += (shortHexCode.charAt(i) + -shortHexCode.charAt(i)); - } - if ( hexCode.indexOf('#') == 0 ) - hexCode = hexCode.substring(1); - var red = hexCode.substring(0,2); - var green = hexCode.substring(2,4); - var blue = hexCode.substring(4,6); - return new OpenLayers.Rico.Color( parseInt(red,16), parseInt(green,16), parseInt(blue,16) ); -} - -/** - * Factory method for creating a color from the background of - * an HTML element. - */ -OpenLayers.Rico.Color.createColorFromBackground = function(elem) { - - var actualColor = - RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem), - "backgroundColor", - "background-color"); - - if ( actualColor == "transparent" && elem.parentNode ) - return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode); - - if ( actualColor == null ) - return new OpenLayers.Rico.Color(255,255,255); - - if ( actualColor.indexOf("rgb(") == 0 ) { - var colors = actualColor.substring(4, actualColor.length - 1 ); - var colorArray = colors.split(","); - return new OpenLayers.Rico.Color( parseInt( colorArray[0] ), - parseInt( colorArray[1] ), - parseInt( colorArray[2] ) ); - - } - else if ( actualColor.indexOf("#") == 0 ) { - return OpenLayers.Rico.Color.createFromHex(actualColor); - } - else - return new OpenLayers.Rico.Color(255,255,255); -} - -OpenLayers.Rico.Color.HSBtoRGB = function(hue, saturation, brightness) { - - var red = 0; - var green = 0; - var blue = 0; - - if (saturation == 0) { - red = parseInt(brightness * 255.0 + 0.5); - green = red; - blue = red; - } - else { - var h = (hue - Math.floor(hue)) * 6.0; - var f = h - Math.floor(h); - var p = brightness * (1.0 - saturation); - var q = brightness * (1.0 - saturation * f); - var t = brightness * (1.0 - (saturation * (1.0 - f))); - - switch (parseInt(h)) { - case 0: - red = (brightness * 255.0 + 0.5); - green = (t * 255.0 + 0.5); - blue = (p * 255.0 + 0.5); - break; - case 1: - red = (q * 255.0 + 0.5); - green = (brightness * 255.0 + 0.5); - blue = (p * 255.0 + 0.5); - break; - case 2: - red = (p * 255.0 + 0.5); - green = (brightness * 255.0 + 0.5); - blue = (t * 255.0 + 0.5); - break; - case 3: - red = (p * 255.0 + 0.5); - green = (q * 255.0 + 0.5); - blue = (brightness * 255.0 + 0.5); - break; - case 4: - red = (t * 255.0 + 0.5); - green = (p * 255.0 + 0.5); - blue = (brightness * 255.0 + 0.5); - break; - case 5: - red = (brightness * 255.0 + 0.5); - green = (p * 255.0 + 0.5); - blue = (q * 255.0 + 0.5); - break; - } - } - - return { r : parseInt(red), g : parseInt(green) , b : parseInt(blue) }; -} - -OpenLayers.Rico.Color.RGBtoHSB = function(r, g, b) { - - var hue; - var saturation; - var brightness; - - var cmax = (r > g) ? r : g; - if (b > cmax) - cmax = b; - - var cmin = (r < g) ? r : g; - if (b < cmin) - cmin = b; - - brightness = cmax / 255.0; - if (cmax != 0) - saturation = (cmax - cmin)/cmax; - else - saturation = 0; - - if (saturation == 0) - hue = 0; - else { - var redc = (cmax - r)/(cmax - cmin); - var greenc = (cmax - g)/(cmax - cmin); - var bluec = (cmax - b)/(cmax - cmin); - - if (r == cmax) - hue = bluec - greenc; - else if (g == cmax) - hue = 2.0 + redc - bluec; - else - hue = 4.0 + greenc - redc; - - hue = hue / 6.0; - if (hue < 0) - hue = hue + 1.0; - } - - return { h : hue, s : saturation, b : brightness }; -} - diff --git a/pacotes/openlayers/lib/Rico/Corner.js b/pacotes/openlayers/lib/Rico/Corner.js deleted file mode 100644 index 14d5d40..0000000 --- a/pacotes/openlayers/lib/Rico/Corner.js +++ /dev/null @@ -1,314 +0,0 @@ -/** -* -* Copyright 2005 Sabre Airline Solutions -* -* 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 -* -* Unless required by applicable law or agreed to in writing, software distributed under the -* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -* either express or implied. See the License for the specific language governing permissions -* and limitations under the License. -**/ - - -OpenLayers.Rico = new Object(); -OpenLayers.Rico.Corner = { - - round: function(e, options) { - e = OpenLayers.Util.getElement(e); - this._setOptions(options); - - var color = this.options.color; - if ( this.options.color == "fromElement" ) - color = this._background(e); - - var bgColor = this.options.bgColor; - if ( this.options.bgColor == "fromParent" ) - bgColor = this._background(e.offsetParent); - - this._roundCornersImpl(e, color, bgColor); - }, - - /** This is a helper function to change the background - * color of
that has had Rico rounded corners added. - * - * It seems we cannot just set the background color for the - * outer
so each element used to create the - * corners must have its background color set individually. - * - * @param {DOM} theDiv - A child of the outer
that was - * supplied to the `round` method. - * - * @param {String} newColor - The new background color to use. - */ - changeColor: function(theDiv, newColor) { - - theDiv.style.backgroundColor = newColor; - - var spanElements = theDiv.parentNode.getElementsByTagName("span"); - - for (var currIdx = 0; currIdx < spanElements.length; currIdx++) { - spanElements[currIdx].style.backgroundColor = newColor; - } - }, - - - /** This is a helper function to change the background - * opacity of
that has had Rico rounded corners added. - * - * See changeColor (above) for algorithm explanation - * - * @param {DOM} theDiv A child of the outer
that was - * supplied to the `round` method. - * - * @param {int} newOpacity The new opacity to use (0-1). - */ - changeOpacity: function(theDiv, newOpacity) { - - var mozillaOpacity = newOpacity; - var ieOpacity = 'alpha(opacity=' + newOpacity * 100 + ')'; - - theDiv.style.opacity = mozillaOpacity; - theDiv.style.filter = ieOpacity; - - var spanElements = theDiv.parentNode.getElementsByTagName("span"); - - for (var currIdx = 0; currIdx < spanElements.length; currIdx++) { - spanElements[currIdx].style.opacity = mozillaOpacity; - spanElements[currIdx].style.filter = ieOpacity; - } - - }, - - /** this function takes care of redoing the rico cornering - * - * you can't just call updateRicoCorners() again and pass it a - * new options string. you have to first remove the divs that - * rico puts on top and below the content div. - * - * @param {DOM} theDiv - A child of the outer
that was - * supplied to the `round` method. - * - * @param {Array} options - list of options - */ - reRound: function(theDiv, options) { - - var topRico = theDiv.parentNode.childNodes[0]; - //theDiv would be theDiv.parentNode.childNodes[1] - var bottomRico = theDiv.parentNode.childNodes[2]; - - theDiv.parentNode.removeChild(topRico); - theDiv.parentNode.removeChild(bottomRico); - - this.round(theDiv.parentNode, options); - }, - - _roundCornersImpl: function(e, color, bgColor) { - if(this.options.border) - this._renderBorder(e,bgColor); - if(this._isTopRounded()) - this._roundTopCorners(e,color,bgColor); - if(this._isBottomRounded()) - this._roundBottomCorners(e,color,bgColor); - }, - - _renderBorder: function(el,bgColor) { - var borderValue = "1px solid " + this._borderColor(bgColor); - var borderL = "border-left: " + borderValue; - var borderR = "border-right: " + borderValue; - var style = "style='" + borderL + ";" + borderR + "'"; - el.innerHTML = "
" + el.innerHTML + "
" - }, - - _roundTopCorners: function(el, color, bgColor) { - var corner = this._createCorner(bgColor); - for(var i=0 ; i < this.options.numSlices ; i++ ) - corner.appendChild(this._createCornerSlice(color,bgColor,i,"top")); - el.style.paddingTop = 0; - el.insertBefore(corner,el.firstChild); - }, - - _roundBottomCorners: function(el, color, bgColor) { - var corner = this._createCorner(bgColor); - for(var i=(this.options.numSlices-1) ; i >= 0 ; i-- ) - corner.appendChild(this._createCornerSlice(color,bgColor,i,"bottom")); - el.style.paddingBottom = 0; - el.appendChild(corner); - }, - - _createCorner: function(bgColor) { - var corner = document.createElement("div"); - corner.style.backgroundColor = (this._isTransparent() ? "transparent" : bgColor); - return corner; - }, - - _createCornerSlice: function(color,bgColor, n, position) { - var slice = document.createElement("span"); - - var inStyle = slice.style; - inStyle.backgroundColor = color; - inStyle.display = "block"; - inStyle.height = "1px"; - inStyle.overflow = "hidden"; - inStyle.fontSize = "1px"; - - var borderColor = this._borderColor(color,bgColor); - if ( this.options.border && n == 0 ) { - inStyle.borderTopStyle = "solid"; - inStyle.borderTopWidth = "1px"; - inStyle.borderLeftWidth = "0px"; - inStyle.borderRightWidth = "0px"; - inStyle.borderBottomWidth = "0px"; - inStyle.height = "0px"; // assumes css compliant box model - inStyle.borderColor = borderColor; - } - else if(borderColor) { - inStyle.borderColor = borderColor; - inStyle.borderStyle = "solid"; - inStyle.borderWidth = "0px 1px"; - } - - if ( !this.options.compact && (n == (this.options.numSlices-1)) ) - inStyle.height = "2px"; - - this._setMargin(slice, n, position); - this._setBorder(slice, n, position); - return slice; - }, - - _setOptions: function(options) { - this.options = { - corners : "all", - color : "fromElement", - bgColor : "fromParent", - blend : true, - border : false, - compact : false - } - OpenLayers.Util.extend(this.options, options || {}); - - this.options.numSlices = this.options.compact ? 2 : 4; - if ( this._isTransparent() ) - this.options.blend = false; - }, - - _whichSideTop: function() { - if ( this._hasString(this.options.corners, "all", "top") ) - return ""; - - if ( this.options.corners.indexOf("tl") >= 0 && this.options.corners.indexOf("tr") >= 0 ) - return ""; - - if (this.options.corners.indexOf("tl") >= 0) - return "left"; - else if (this.options.corners.indexOf("tr") >= 0) - return "right"; - return ""; - }, - - _whichSideBottom: function() { - if ( this._hasString(this.options.corners, "all", "bottom") ) - return ""; - - if ( this.options.corners.indexOf("bl")>=0 && this.options.corners.indexOf("br")>=0 ) - return ""; - - if(this.options.corners.indexOf("bl") >=0) - return "left"; - else if(this.options.corners.indexOf("br")>=0) - return "right"; - return ""; - }, - - _borderColor : function(color,bgColor) { - if ( color == "transparent" ) - return bgColor; - else if ( this.options.border ) - return this.options.border; - else if ( this.options.blend ) - return this._blend( bgColor, color ); - else - return ""; - }, - - - _setMargin: function(el, n, corners) { - var marginSize = this._marginSize(n); - var whichSide = corners == "top" ? this._whichSideTop() : this._whichSideBottom(); - - if ( whichSide == "left" ) { - el.style.marginLeft = marginSize + "px"; el.style.marginRight = "0px"; - } - else if ( whichSide == "right" ) { - el.style.marginRight = marginSize + "px"; el.style.marginLeft = "0px"; - } - else { - el.style.marginLeft = marginSize + "px"; el.style.marginRight = marginSize + "px"; - } - }, - - _setBorder: function(el,n,corners) { - var borderSize = this._borderSize(n); - var whichSide = corners == "top" ? this._whichSideTop() : this._whichSideBottom(); - if ( whichSide == "left" ) { - el.style.borderLeftWidth = borderSize + "px"; el.style.borderRightWidth = "0px"; - } - else if ( whichSide == "right" ) { - el.style.borderRightWidth = borderSize + "px"; el.style.borderLeftWidth = "0px"; - } - else { - el.style.borderLeftWidth = borderSize + "px"; el.style.borderRightWidth = borderSize + "px"; - } - if (this.options.border != false) - el.style.borderLeftWidth = borderSize + "px"; el.style.borderRightWidth = borderSize + "px"; - }, - - _marginSize: function(n) { - if ( this._isTransparent() ) - return 0; - - var marginSizes = [ 5, 3, 2, 1 ]; - var blendedMarginSizes = [ 3, 2, 1, 0 ]; - var compactMarginSizes = [ 2, 1 ]; - var smBlendedMarginSizes = [ 1, 0 ]; - - if ( this.options.compact && this.options.blend ) - return smBlendedMarginSizes[n]; - else if ( this.options.compact ) - return compactMarginSizes[n]; - else if ( this.options.blend ) - return blendedMarginSizes[n]; - else - return marginSizes[n]; - }, - - _borderSize: function(n) { - var transparentBorderSizes = [ 5, 3, 2, 1 ]; - var blendedBorderSizes = [ 2, 1, 1, 1 ]; - var compactBorderSizes = [ 1, 0 ]; - var actualBorderSizes = [ 0, 2, 0, 0 ]; - - if ( this.options.compact && (this.options.blend || this._isTransparent()) ) - return 1; - else if ( this.options.compact ) - return compactBorderSizes[n]; - else if ( this.options.blend ) - return blendedBorderSizes[n]; - else if ( this.options.border ) - return actualBorderSizes[n]; - else if ( this._isTransparent() ) - return transparentBorderSizes[n]; - return 0; - }, - - _hasString: function(str) { for(var i=1 ; i= 0) return true; return false; }, - _blend: function(c1, c2) { var cc1 = OpenLayers.Rico.Color.createFromHex(c1); cc1.blend(OpenLayers.Rico.Color.createFromHex(c2)); return cc1; }, - _background: function(el) { try { return OpenLayers.Rico.Color.createColorFromBackground(el).asHex(); } catch(err) { return "#ffffff"; } }, - _isTransparent: function() { return this.options.color == "transparent"; }, - _isTopRounded: function() { return this._hasString(this.options.corners, "all", "top", "tl", "tr"); }, - _isBottomRounded: function() { return this._hasString(this.options.corners, "all", "bottom", "bl", "br"); }, - _hasSingleTextChild: function(el) { return el.childNodes.length == 1 && el.childNodes[0].nodeType == 3; } -} diff --git a/pacotes/openlayers/license.txt b/pacotes/openlayers/license.txt deleted file mode 100644 index 3f8302b..0000000 --- a/pacotes/openlayers/license.txt +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2005-2006 MetaCarta, Inc. -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of MetaCarta, Inc. nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pacotes/openlayers/news.txt b/pacotes/openlayers/news.txt deleted file mode 100644 index 1335106..0000000 --- a/pacotes/openlayers/news.txt +++ /dev/null @@ -1,56 +0,0 @@ -OpenLayers 2.0 Release Notes - - * Deprecated Methods which were removed: - - For details, see r1228 - - * OpenLayers.Map - * removed: getFullExtent() -- use getMaxExtent() instead - * removed: zoomToFullExtent() -- use zoomToMaxExtent() instead - * OpenLayers.Layer.Grid - * removed: setTileSize() -- user should instead pass a 'tileSize' property - as one of the options when initializing the Grid Layer. ex: - - var url = "http://octo.metacarta.com/cgi-bin/mapserv"; - var options = {tileSize: new OpenLayers.Size(500,50)}; - var map = new OpenLayers.Map('map', options); - layer = new OpenLayers.Layer.WMS(name, url, params); - - * OpenLayers.Layer.HTTPRequest - * removed: changeParams() -- use mergeNewParams() instead - * OpenLayers.Pixel - * removed: copyOf() -- use clone() instead - * OpenLayers.Size - * removed: copyOf() -- use clone() instead - * OpenLayers.LonLat - * removed: copyOf() -- use clone() instead - * OpenLayers.Bounds - * removed: copyOf() -- use clone() instead - * Array - * removed: copyOf() -- use clone() instead - - * MouseWheel - * It is now possible to zoom in/out with the mouse wheel instead of clicks. - - * Spiral Gridding - * Instead of loading from the top to bottom of the map, Openlayers will - now start loading tiles from the center of the map. - - * Tile Re-Use - * In order to lower memory constraints and reduce element creation times, - OpenLayers now creates a single set of images/tiles and reuses them as - you scroll around the map. - - * New Layer Support - * Google - * Virtual Earth - * GeoRSS (RSS 1.0 and 2.0 in FF, IE, RSS 2.0 in Safari) - * KaMap - * Untiled WMS - - * Scale Based Methods - * It is now possible to set zooms based on the concept of scale. See - documentation in the options for the Map constructor. - -OpenLayers 1.0 - Initial release. diff --git a/pacotes/openlayers/readme.txt b/pacotes/openlayers/readme.txt deleted file mode 100644 index 2a16c3a..0000000 --- a/pacotes/openlayers/readme.txt +++ /dev/null @@ -1,66 +0,0 @@ -OpenLayers --=-=-=-=-=- -Copyright (c) 2005-2006 MetaCarta, Inc. - -OpenLayers is a JavaScript library for building map applications -on the web. OpenLayers is made available under a BSD-license. -Please see license.txt in this distribution for more details. - ------------------- -Getting OpenLayers ------------------- - -OpenLayers lives at http://www.openlayers.org/. - -You can get OpenLayers from - http://trac.openlayers.org/wiki/HowToDownload. - ---------------------- -Installing OpenLayers ---------------------- - -You can use OpenLayers as-is by copying build/OpenLayers.js and the -entire theme/ and img/ directories up to your webserver, putting them -in the same directory. The files can be in subdirectories on your website, or right in the root of the site, as in these examples. To include the OpenLayers library in your web page from the root of the site, use: - - - - - - - - diff --git a/pacotes/openlayers/tests/BaseTypes/test_Class.html b/pacotes/openlayers/tests/BaseTypes/test_Class.html deleted file mode 100644 index dd3f366..0000000 --- a/pacotes/openlayers/tests/BaseTypes/test_Class.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/BaseTypes/test_LonLat.html b/pacotes/openlayers/tests/BaseTypes/test_LonLat.html deleted file mode 100644 index d1fa92e..0000000 --- a/pacotes/openlayers/tests/BaseTypes/test_LonLat.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/BaseTypes/test_Pixel.html b/pacotes/openlayers/tests/BaseTypes/test_Pixel.html deleted file mode 100644 index cb79bc0..0000000 --- a/pacotes/openlayers/tests/BaseTypes/test_Pixel.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/BaseTypes/test_Size.html b/pacotes/openlayers/tests/BaseTypes/test_Size.html deleted file mode 100644 index 5820758..0000000 --- a/pacotes/openlayers/tests/BaseTypes/test_Size.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Control/test_KeyboardDefaults.html b/pacotes/openlayers/tests/Control/test_KeyboardDefaults.html deleted file mode 100644 index c8cb53c..0000000 --- a/pacotes/openlayers/tests/Control/test_KeyboardDefaults.html +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Control/test_LayerSwitcher.html b/pacotes/openlayers/tests/Control/test_LayerSwitcher.html deleted file mode 100644 index 43d3da6..0000000 --- a/pacotes/openlayers/tests/Control/test_LayerSwitcher.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Control/test_MouseToolbar.html b/pacotes/openlayers/tests/Control/test_MouseToolbar.html deleted file mode 100644 index 1c3ca4d..0000000 --- a/pacotes/openlayers/tests/Control/test_MouseToolbar.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Control/test_NavToolbar.html b/pacotes/openlayers/tests/Control/test_NavToolbar.html deleted file mode 100644 index a06a3cd..0000000 --- a/pacotes/openlayers/tests/Control/test_NavToolbar.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Control/test_OverviewMap.html b/pacotes/openlayers/tests/Control/test_OverviewMap.html deleted file mode 100644 index 2a56df0..0000000 --- a/pacotes/openlayers/tests/Control/test_OverviewMap.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Control/test_PanZoom.html b/pacotes/openlayers/tests/Control/test_PanZoom.html deleted file mode 100644 index efd1b9b..0000000 --- a/pacotes/openlayers/tests/Control/test_PanZoom.html +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Control/test_PanZoomBar.html b/pacotes/openlayers/tests/Control/test_PanZoomBar.html deleted file mode 100644 index 1bb045d..0000000 --- a/pacotes/openlayers/tests/Control/test_PanZoomBar.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Control/test_Permalink.html b/pacotes/openlayers/tests/Control/test_Permalink.html deleted file mode 100644 index a268e7f..0000000 --- a/pacotes/openlayers/tests/Control/test_Permalink.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - -
-
Edit
-
- - diff --git a/pacotes/openlayers/tests/Control/test_Scale.html b/pacotes/openlayers/tests/Control/test_Scale.html deleted file mode 100644 index 192cebd..0000000 --- a/pacotes/openlayers/tests/Control/test_Scale.html +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - Scale
-
- - diff --git a/pacotes/openlayers/tests/Feature/test_Vector.html b/pacotes/openlayers/tests/Feature/test_Vector.html deleted file mode 100644 index 52e83e2..0000000 --- a/pacotes/openlayers/tests/Feature/test_Vector.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Format/test_GML.html b/pacotes/openlayers/tests/Format/test_GML.html deleted file mode 100644 index 2d08ee7..0000000 --- a/pacotes/openlayers/tests/Format/test_GML.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Format/test_GeoRSS.html b/pacotes/openlayers/tests/Format/test_GeoRSS.html deleted file mode 100644 index 0d61cb1..0000000 --- a/pacotes/openlayers/tests/Format/test_GeoRSS.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Format/test_WKT.html b/pacotes/openlayers/tests/Format/test_WKT.html deleted file mode 100644 index db019c6..0000000 --- a/pacotes/openlayers/tests/Format/test_WKT.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/pacotes/openlayers/tests/Geometry/test_Collection.html b/pacotes/openlayers/tests/Geometry/test_Collection.html deleted file mode 100644 index e26a351..0000000 --- a/pacotes/openlayers/tests/Geometry/test_Collection.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_Curve.html b/pacotes/openlayers/tests/Geometry/test_Curve.html deleted file mode 100644 index 8cee64e..0000000 --- a/pacotes/openlayers/tests/Geometry/test_Curve.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_LineString.html b/pacotes/openlayers/tests/Geometry/test_LineString.html deleted file mode 100644 index 4ab0a91..0000000 --- a/pacotes/openlayers/tests/Geometry/test_LineString.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_LinearRing.html b/pacotes/openlayers/tests/Geometry/test_LinearRing.html deleted file mode 100644 index cca2423..0000000 --- a/pacotes/openlayers/tests/Geometry/test_LinearRing.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_MultiLineString.html b/pacotes/openlayers/tests/Geometry/test_MultiLineString.html deleted file mode 100644 index 5f9cd27..0000000 --- a/pacotes/openlayers/tests/Geometry/test_MultiLineString.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_MultiPoint.html b/pacotes/openlayers/tests/Geometry/test_MultiPoint.html deleted file mode 100644 index 19fc12d..0000000 --- a/pacotes/openlayers/tests/Geometry/test_MultiPoint.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_MultiPolygon.html b/pacotes/openlayers/tests/Geometry/test_MultiPolygon.html deleted file mode 100644 index 3e05f72..0000000 --- a/pacotes/openlayers/tests/Geometry/test_MultiPolygon.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_Point.html b/pacotes/openlayers/tests/Geometry/test_Point.html deleted file mode 100644 index c0f0195..0000000 --- a/pacotes/openlayers/tests/Geometry/test_Point.html +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_Polygon.html b/pacotes/openlayers/tests/Geometry/test_Polygon.html deleted file mode 100644 index ebf7c2c..0000000 --- a/pacotes/openlayers/tests/Geometry/test_Polygon.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_Rectangle.html b/pacotes/openlayers/tests/Geometry/test_Rectangle.html deleted file mode 100644 index 4a7671a..0000000 --- a/pacotes/openlayers/tests/Geometry/test_Rectangle.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Geometry/test_Surface.html b/pacotes/openlayers/tests/Geometry/test_Surface.html deleted file mode 100644 index 5831f1f..0000000 --- a/pacotes/openlayers/tests/Geometry/test_Surface.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/Layer/test_EventPane.html b/pacotes/openlayers/tests/Layer/test_EventPane.html deleted file mode 100644 index 24d5ed9..0000000 --- a/pacotes/openlayers/tests/Layer/test_EventPane.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_FixedZoomLevels.html b/pacotes/openlayers/tests/Layer/test_FixedZoomLevels.html deleted file mode 100644 index 0fac98c..0000000 --- a/pacotes/openlayers/tests/Layer/test_FixedZoomLevels.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_GML.html b/pacotes/openlayers/tests/Layer/test_GML.html deleted file mode 100644 index 6230671..0000000 --- a/pacotes/openlayers/tests/Layer/test_GML.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - -
- - - diff --git a/pacotes/openlayers/tests/Layer/test_GeoRSS.html b/pacotes/openlayers/tests/Layer/test_GeoRSS.html deleted file mode 100644 index e5dae31..0000000 --- a/pacotes/openlayers/tests/Layer/test_GeoRSS.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_Google.html b/pacotes/openlayers/tests/Layer/test_Google.html deleted file mode 100644 index 1869e3a..0000000 --- a/pacotes/openlayers/tests/Layer/test_Google.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_Grid.html b/pacotes/openlayers/tests/Layer/test_Grid.html deleted file mode 100644 index 4856182..0000000 --- a/pacotes/openlayers/tests/Layer/test_Grid.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - - - - diff --git a/pacotes/openlayers/tests/Layer/test_HTTPRequest.html b/pacotes/openlayers/tests/Layer/test_HTTPRequest.html deleted file mode 100644 index 3a8f23d..0000000 --- a/pacotes/openlayers/tests/Layer/test_HTTPRequest.html +++ /dev/null @@ -1,209 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_Image.html b/pacotes/openlayers/tests/Layer/test_Image.html deleted file mode 100644 index 8763261..0000000 --- a/pacotes/openlayers/tests/Layer/test_Image.html +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - -
-
- - diff --git a/pacotes/openlayers/tests/Layer/test_KaMap.html b/pacotes/openlayers/tests/Layer/test_KaMap.html deleted file mode 100644 index de11585..0000000 --- a/pacotes/openlayers/tests/Layer/test_KaMap.html +++ /dev/null @@ -1,222 +0,0 @@ - - - - - - - - - diff --git a/pacotes/openlayers/tests/Layer/test_MapServer.html b/pacotes/openlayers/tests/Layer/test_MapServer.html deleted file mode 100644 index a0ee514..0000000 --- a/pacotes/openlayers/tests/Layer/test_MapServer.html +++ /dev/null @@ -1,249 +0,0 @@ - - - Z - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_MapServer_Untiled.html b/pacotes/openlayers/tests/Layer/test_MapServer_Untiled.html deleted file mode 100644 index c98a1cc..0000000 --- a/pacotes/openlayers/tests/Layer/test_MapServer_Untiled.html +++ /dev/null @@ -1,163 +0,0 @@ - -A - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_Markers.html b/pacotes/openlayers/tests/Layer/test_Markers.html deleted file mode 100644 index d1d7a08..0000000 --- a/pacotes/openlayers/tests/Layer/test_Markers.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_MultiMap.html b/pacotes/openlayers/tests/Layer/test_MultiMap.html deleted file mode 100644 index bb7f141..0000000 --- a/pacotes/openlayers/tests/Layer/test_MultiMap.html +++ /dev/null @@ -1,105 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_TMS.html b/pacotes/openlayers/tests/Layer/test_TMS.html deleted file mode 100644 index 134d89e..0000000 --- a/pacotes/openlayers/tests/Layer/test_TMS.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_Text.html b/pacotes/openlayers/tests/Layer/test_Text.html deleted file mode 100644 index a59fd07..0000000 --- a/pacotes/openlayers/tests/Layer/test_Text.html +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_Vector.html b/pacotes/openlayers/tests/Layer/test_Vector.html deleted file mode 100644 index c368c14..0000000 --- a/pacotes/openlayers/tests/Layer/test_Vector.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_WFS.html b/pacotes/openlayers/tests/Layer/test_WFS.html deleted file mode 100644 index 332dcba..0000000 --- a/pacotes/openlayers/tests/Layer/test_WFS.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Layer/test_WMS.html b/pacotes/openlayers/tests/Layer/test_WMS.html deleted file mode 100644 index 2a7588a..0000000 --- a/pacotes/openlayers/tests/Layer/test_WMS.html +++ /dev/null @@ -1,302 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/tests/Marker/test_Box.html b/pacotes/openlayers/tests/Marker/test_Box.html deleted file mode 100644 index 8d0f582..0000000 --- a/pacotes/openlayers/tests/Marker/test_Box.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - -
- - \ No newline at end of file diff --git a/pacotes/openlayers/tests/README.txt b/pacotes/openlayers/tests/README.txt deleted file mode 100644 index dc1f192..0000000 --- a/pacotes/openlayers/tests/README.txt +++ /dev/null @@ -1,16 +0,0 @@ -This directory contains unit tests for the OpenLayers library. - -Tests use the Test.AnotherWay library from . The test -runner is 'run-tests.html' and new test files need to be added to -'list-tests.html'. - -The following file naming conventions are used: - - * A filename that starts with `test_` and has an `.html` extension - contains tests. These should contain tests for a specific class. - - * A filename starting with `page_` and has an `.html` extension is a - supporting HTML file used in one or more tests. - - * A filename starting with 'data_` is a supporting data file used in one - or more tests. diff --git a/pacotes/openlayers/tests/Tile/test_Image.html b/pacotes/openlayers/tests/Tile/test_Image.html deleted file mode 100644 index 00cbfb8..0000000 --- a/pacotes/openlayers/tests/Tile/test_Image.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - -
- - - diff --git a/pacotes/openlayers/tests/atom-1.0.xml b/pacotes/openlayers/tests/atom-1.0.xml deleted file mode 100644 index f0d5d6f..0000000 --- a/pacotes/openlayers/tests/atom-1.0.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - tumulus - - - - http://pleiades.stoa.org/places/tumulus - - - Unnamed Tumulus - - http://pleiades.stoa.org/places/638896 - - An ancient tumulus, attested during the Classical period (modern location: Karaburun). Its ancient name is not known. - 36.7702 29.9805 - - - Unnamed Tumulus - - http://pleiades.stoa.org/places/638924 - - An ancient tumulus, attested during the Classical period (modern location: Kızılbel). Its ancient name is not known. - 36.7263 29.8619 - - - - diff --git a/pacotes/openlayers/tests/data_Layer_Text_textfile.txt b/pacotes/openlayers/tests/data_Layer_Text_textfile.txt deleted file mode 100644 index 8250988..0000000 --- a/pacotes/openlayers/tests/data_Layer_Text_textfile.txt +++ /dev/null @@ -1,3 +0,0 @@ -point image -10,20 http://boston.openguides.org/markers/ORANGE.png -15,25 http://boston.openguides.org/markers/ORANGE.png diff --git a/pacotes/openlayers/tests/data_Layer_Text_textfile_2.txt b/pacotes/openlayers/tests/data_Layer_Text_textfile_2.txt deleted file mode 100644 index 91a8093..0000000 --- a/pacotes/openlayers/tests/data_Layer_Text_textfile_2.txt +++ /dev/null @@ -1,3 +0,0 @@ -point title description image -10,20 a b http://boston.openguides.org/markers/ORANGE.png -15,25 c d http://boston.openguides.org/markers/ORANGE.png diff --git a/pacotes/openlayers/tests/georss.txt b/pacotes/openlayers/tests/georss.txt deleted file mode 100644 index 8ad1561..0000000 --- a/pacotes/openlayers/tests/georss.txt +++ /dev/null @@ -1,378 +0,0 @@ - - - -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: http://platial.typepad.com/news/2006/04/really_simple_t.html for more info. -http://platial.com -Crschmidt's Places At Platial - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -http://platial.com/place/90306 -Knitting Room -Address: 2 lake St, Arlington, MA
Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

Map this on Platial
Grab this on Platial ]]>
-42.405696 -71.142197 -crschmidt -2006-06-08T17:35:01.942452+00:00 -
- -http://platial.com/place/67230 -Knitting Room -Address: 2 lake St, Arlington, MA
Tags: knitting, yarn, pins and needles, handspun, hand dyed, novelty yarn, fancy, simple, young, hip, friendly, needles, addy, cute hats

Map this on Platial
Grab this on Platial ]]>
-42.405524 -71.142273 -crschmidt -2006-04-24T11:35:26.733857+00:00 -
- -http://platial.com/place/65645 -†¢¢™£ˆøœ -Address: 151 Erie St., Cambridge, MA
Tags: platial graffiti

Map this on Platial
Grab this on Platial ]]>
-42.352455 -71.110210 -crschmidt -2006-04-20T08:56:12.696224+00:00 -
- -http://platial.com/place/62200 -Allen Hall -Address: 1301 W Gregory Dr, Urbana, IL
Tags: dorm, uiuc, college



Map this on Platial
Grab this on Platial ]]>
-40.104172 -88.220623 -crschmidt -2006-04-14T08:01:01.872873+00:00 -
- -http://platial.com/place/28232 -Bagby Hot Springs, OR -Tags: 20s, rosalie, romance, childhood, hike, camping, soak, relax, beautiful, hot springs, bathhouse, favorite, popular, crowded, organized, honeymoon tub, plumbing made from hollowed out trees, hot springs, mt hood, notorious car break in spot, rash, bacteria

Map this on Platial
Grab this on Platial ]]>
-44.936000 -122.173000 -crschmidt -2006-01-03T23:10:18.553063+00:00 -
- -http://platial.com/place/43666 -Shooting Location for "The Field of Dreams" Film -Address: Dyersville, Iowa
Tags: iowa, baseball, movie locations, field of dreams, kevin costner, costner, dyersville, kinsella, james earl jones, chicago black sox, shoeless joe, joe jackson, famous farms, film, movie, cinema, shooting location

Map this on Platial
Grab this on Platial ]]>
-42.481213 -91.111679 -echinodermata -2006-03-23T11:40:17.654061+00:00 -
- -http://platial.com/place/28394 -Moffetts (Bonneville) Hot Springs, WA -Tags: soak, hot springs, relax, nature

Map this on Platial
Grab this on Platial ]]>
-45.658000 -121.962000 -crschmidt -2006-01-03T23:16:27.329816+00:00 -
- -http://platial.com/place/28251 -Austin Hot Springs, OR -Tags: soak, hot springs, relax, nature, popular, crowded

Map this on Platial
Grab this on Platial ]]>
-45.021000 -122.009000 -crschmidt -2006-01-03T23:11:04.489886+00:00 -
- -http://platial.com/place/28392 -Rock Creek Hot Springs, WA -Tags: soak, hot springs, relax, nature

Map this on Platial
Grab this on Platial ]]>
-45.723000 -121.927000 -crschmidt -2006-01-03T23:16:22.636855+00:00 -
- -http://platial.com/place/28391 -St. Martins (Wind River) Hot Springs, WA -Tags: hot springs, soak, relax, nature, wonderful

Map this on Platial
Grab this on Platial ]]>
-45.728000 -121.800000 -crschmidt -2006-01-03T23:16:20.383244+00:00 -
- -http://platial.com/place/28231 -Breitenbush Hot Springs, OR -Tags: hot springs, resort, relax, nature, beautiful, http:www.breitenbush.com, soaking

Map this on Platial
Grab this on Platial ]]>
-44.782000 -121.975000 -crschmidt -2006-01-03T23:10:16.529195+00:00 -
- -http://platial.com/place/28393 -Collins Hot Springs, WA -Tags: portland, nice, hot springs, soak

Map this on Platial
Grab this on Platial ]]>
-45.701000 -121.728000 -crschmidt -2006-01-03T23:16:24.648745+00:00 -
- -http://platial.com/place/31685 -Darwin's Ltd. -Address: 148 Mount Auburn St, Cambridge, MA
Tags: coffee, beer, sandwiches, freewifi



Map this on Platial
Grab this on Platial ]]>
-42.373974 -71.125053 -crschmidt -2006-01-10T09:24:08.152985+00:00 -
- -http://platial.com/place/28596 -Huckleberry Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.115000 -110.684000 -crschmidt -2006-01-03T23:24:32.283094+00:00 -
- -http://platial.com/place/28595 -South Entrance Hot Springs, WY -


Map this on Platial
Grab this on Platial ]]>
-44.142000 -110.656000 -crschmidt -2006-01-03T23:24:30.279497+00:00 -
- -http://platial.com/place/28594 -Crawfish Creek Hot Springs, WY -


Map this on Platial
Grab this on Platial ]]>
-44.157000 -110.699000 -crschmidt -2006-01-03T23:24:28.280271+00:00 -
- -http://platial.com/place/28593 -Crawfish Creek Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.165000 -110.723000 -crschmidt -2006-01-03T23:24:20.364077+00:00 -
- -http://platial.com/place/28592 -Snake Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.169000 -110.583000 -crschmidt -2006-01-03T23:24:12.234974+00:00 -
- -http://platial.com/place/28591 -Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.187000 -110.726000 -crschmidt -2006-01-03T23:24:10.027857+00:00 -
- -http://platial.com/place/28590 -Hot Springs on Upper Snake River, WY -
Map this on Platial
Grab this on Platial ]]>
-44.204000 -110.486000 -crschmidt -2006-01-03T23:24:07.79658+00:00 -
- -http://platial.com/place/28589 -Hot Springs on lewis Lake, WY -
Map this on Platial
Grab this on Platial ]]>
-44.276000 -110.636000 -crschmidt -2006-01-03T23:24:05.683418+00:00 -
- -http://platial.com/place/28588 -Rustic Geyser, WY -
Map this on Platial
Grab this on Platial ]]>
-44.282000 -110.506000 -crschmidt -2006-01-03T23:24:03.66329+00:00 -
- -http://platial.com/place/28587 -Bechler River Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.285000 -110.900000 -crschmidt -2006-01-03T23:24:01.611442+00:00 -
- -http://platial.com/place/28586 -Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.290000 -110.504000 -crschmidt -2006-01-03T23:23:59.658699+00:00 -
- -http://platial.com/place/28585 -Heart Lake Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.299000 -110.517000 -crschmidt -2006-01-03T23:23:57.181801+00:00 -
- -http://platial.com/place/28584 -Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.307000 -110.526000 -crschmidt -2006-01-03T23:23:55.240485+00:00 -
- -http://platial.com/place/28583 -Hot Springs on lewis Lake, WY -
Map this on Platial
Grab this on Platial ]]>
-44.309000 -110.654000 -crschmidt -2006-01-03T23:23:53.22295+00:00 -
- -http://platial.com/place/28582 -Shoshone Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.354000 -110.800000 -crschmidt -2006-01-03T23:23:51.179049+00:00 -
- -http://platial.com/place/28581 -Hot Springs on Continental Divide, WY -
Map this on Platial
Grab this on Platial ]]>
-44.401000 -110.936000 -crschmidt -2006-01-03T23:23:49.077176+00:00 -
- -http://platial.com/place/28580 -Hot Springs on Upper Firehole River, WY -
Map this on Platial
Grab this on Platial ]]>
-44.404000 -110.824000 -crschmidt -2006-01-03T23:23:47.054664+00:00 -
- -http://platial.com/place/28579 -Summit Lake Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.410000 -110.953000 -crschmidt -2006-01-03T23:23:45.039394+00:00 -
- -http://platial.com/place/28578 -Lone Star Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.414000 -110.817000 -crschmidt -2006-01-03T23:23:42.938808+00:00 -
- -http://platial.com/place/28577 -West. Thumb Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.417000 -110.570000 -crschmidt -2006-01-03T23:23:40.90238+00:00 -
- -http://platial.com/place/28576 -Lone Star Geyser, WY -
Map this on Platial
Grab this on Platial ]]>
-44.418000 -110.805000 -crschmidt -2006-01-03T23:23:38.844625+00:00 -
- -http://platial.com/place/28575 -Smoke Jumper Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.421000 -110.952000 -crschmidt -2006-01-03T23:23:36.818513+00:00 -
- -http://platial.com/place/28574 -West. Thumb Geyser Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.422000 -110.574000 -crschmidt -2006-01-03T23:23:34.767729+00:00 -
- -http://platial.com/place/28573 -Potts Hot Spring Basin, WY -
Map this on Platial
Grab this on Platial ]]>
-44.433000 -110.581000 -crschmidt -2006-01-03T23:23:32.749915+00:00 -
- -http://platial.com/place/28572 -Hot Springs, WY -
Map this on Platial
Grab this on Platial ]]>
-44.433000 -110.813000 -crschmidt -2006-01-03T23:23:30.829745+00:00 -
- -http://platial.com/place/28571 -Hot Springs on Continental Divide, WY -
Map this on Platial
Grab this on Platial ]]>
-44.438000 -110.977000 -crschmidt -2006-01-03T23:23:28.730401+00:00 -
- -http://platial.com/place/28570 -SouthEastern Group, WY -
Map this on Platial
Grab this on Platial ]]>
-44.459000 -110.817000 -crschmidt -2006-01-03T23:23:26.706763+00:00 -
-
\ No newline at end of file diff --git a/pacotes/openlayers/tests/grid_inittiles.html b/pacotes/openlayers/tests/grid_inittiles.html deleted file mode 100644 index da665d5..0000000 --- a/pacotes/openlayers/tests/grid_inittiles.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - -

Grid Test

-

Map should display with two centered tiles. If there appear to be a combination of two zoom levels, then this test is failed, and something is broken in OpenLayers.

-
- - diff --git a/pacotes/openlayers/tests/list-tests.html b/pacotes/openlayers/tests/list-tests.html deleted file mode 100644 index b681465..0000000 --- a/pacotes/openlayers/tests/list-tests.html +++ /dev/null @@ -1,63 +0,0 @@ -
    -
  • BaseTypes/test_Class.html
  • -
  • BaseTypes/test_Pixel.html
  • -
  • BaseTypes/test_Size.html
  • -
  • BaseTypes/test_LonLat.html
  • -
  • BaseTypes/test_Bounds.html
  • -
  • test_Geometry.html
  • -
  • Geometry/test_Point.html
  • -
  • Geometry/test_Curve.html
  • -
  • Geometry/test_LineString.html
  • -
  • Geometry/test_MultiLineString.html
  • -
  • Geometry/test_LinearRing.html
  • -
  • Geometry/test_Collection.html
  • -
  • Geometry/test_MultiPoint.html
  • -
  • Geometry/test_Polygon.html
  • -
  • Geometry/test_MultiPolygon.html
  • -
  • Geometry/test_Rectangle.html
  • -
  • Geometry/test_Surface.html
  • -
  • test_Format.html
  • -
  • Format/test_GeoRSS.html
  • -
  • Format/test_GML.html
  • -
  • Format/test_WKT.html
  • -
  • test_Icon.html
  • -
  • test_Marker.html
  • -
  • Marker/test_Box.html
  • -
  • test_Popup.html
  • -
  • test_Feature.html
  • -
  • Feature/test_Vector.html
  • -
  • test_Events.html
  • -
  • test_Util.html
  • -
  • test_Layer.html
  • -
  • test_Renderer.html
  • -
  • Layer/test_EventPane.html
  • -
  • Layer/test_FixedZoomLevels.html
  • -
  • Layer/test_GeoRSS.html
  • -
  • Layer/test_Google.html
  • -
  • Layer/test_Grid.html
  • -
  • Layer/test_HTTPRequest.html
  • -
  • Layer/test_Image.html
  • -
  • Layer/test_KaMap.html
  • -
  • Layer/test_Markers.html
  • -
  • Layer/test_MultiMap.html
  • -
  • Layer/test_MapServer.html
  • -
  • Layer/test_MapServer_Untiled.html
  • -
  • Layer/test_Text.html
  • -
  • Layer/test_WMS.html
  • -
  • Layer/test_WFS.html
  • -
  • Layer/test_TMS.html
  • -
  • Layer/test_Vector.html
  • -
  • Layer/test_GML.html
  • -
  • test_Tile.html
  • -
  • Tile/test_Image.html
  • -
  • test_Control.html
  • -
  • Control/test_OverviewMap.html
  • -
  • Control/test_NavToolbar.html
  • -
  • Control/test_MouseToolbar.html
  • -
  • Control/test_LayerSwitcher.html
  • -
  • Control/test_PanZoom.html
  • -
  • Control/test_PanZoomBar.html
  • -
  • Control/test_Permalink.html
  • -
  • Control/test_Scale.html
  • -
  • test_Map.html
  • -
diff --git a/pacotes/openlayers/tests/run-tests.html b/pacotes/openlayers/tests/run-tests.html deleted file mode 100644 index 5c43d06..0000000 --- a/pacotes/openlayers/tests/run-tests.html +++ /dev/null @@ -1,2384 +0,0 @@ - - Run the testsuite - - - - - -
-
Test pages:
-
- -
-
-
- - - - -
- do not close windows opened by tests -
-
- -

Record mouse input for the page:

-

-

or enter page url:

-

-
-
- -
-
-Results: - - -
-
-
-
-
-
- - - - - - --
- -

-  - -

- -
 
-

-cursor is over -

- -

- keyboard control: press - ctrl - - shift - -

- -

-s -to start recording - -

- -

-h -to hide/show this window -

- -

-m -to record mousemove - -

- -

-p -to pause recording - -

- -

-c -to add checkpoint -

- -

-checkpoints: -

-
-
-
- -
- diff --git a/pacotes/openlayers/tests/test_Bounds.html b/pacotes/openlayers/tests/test_Bounds.html deleted file mode 100644 index 947febd..0000000 --- a/pacotes/openlayers/tests/test_Bounds.html +++ /dev/null @@ -1,300 +0,0 @@ - - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Class.html b/pacotes/openlayers/tests/test_Class.html deleted file mode 100644 index f1f6714..0000000 --- a/pacotes/openlayers/tests/test_Class.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Control.html b/pacotes/openlayers/tests/test_Control.html deleted file mode 100644 index 8099dcc..0000000 --- a/pacotes/openlayers/tests/test_Control.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Control_LayerSwitcher.html b/pacotes/openlayers/tests/test_Control_LayerSwitcher.html deleted file mode 100644 index 3ee7e92..0000000 --- a/pacotes/openlayers/tests/test_Control_LayerSwitcher.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Control_MouseToolbar.html b/pacotes/openlayers/tests/test_Control_MouseToolbar.html deleted file mode 100644 index 85fea77..0000000 --- a/pacotes/openlayers/tests/test_Control_MouseToolbar.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Control_OverviewMap.html b/pacotes/openlayers/tests/test_Control_OverviewMap.html deleted file mode 100644 index 1eb3a6f..0000000 --- a/pacotes/openlayers/tests/test_Control_OverviewMap.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Control_PanZoom.html b/pacotes/openlayers/tests/test_Control_PanZoom.html deleted file mode 100644 index 205d818..0000000 --- a/pacotes/openlayers/tests/test_Control_PanZoom.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Control_PanZoomBar.html b/pacotes/openlayers/tests/test_Control_PanZoomBar.html deleted file mode 100644 index 9f22cb2..0000000 --- a/pacotes/openlayers/tests/test_Control_PanZoomBar.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Control_Permalink.html b/pacotes/openlayers/tests/test_Control_Permalink.html deleted file mode 100644 index 57bf909..0000000 --- a/pacotes/openlayers/tests/test_Control_Permalink.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - -
- Edit
-
- - diff --git a/pacotes/openlayers/tests/test_Events.html b/pacotes/openlayers/tests/test_Events.html deleted file mode 100644 index 1f84922..0000000 --- a/pacotes/openlayers/tests/test_Events.html +++ /dev/null @@ -1,317 +0,0 @@ - - - - - - -
-
-
- - diff --git a/pacotes/openlayers/tests/test_Feature.html b/pacotes/openlayers/tests/test_Feature.html deleted file mode 100644 index aaaae5b..0000000 --- a/pacotes/openlayers/tests/test_Feature.html +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Format.html b/pacotes/openlayers/tests/test_Format.html deleted file mode 100644 index 8e42d95..0000000 --- a/pacotes/openlayers/tests/test_Format.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Geometry.html b/pacotes/openlayers/tests/test_Geometry.html deleted file mode 100644 index 3d09944..0000000 --- a/pacotes/openlayers/tests/test_Geometry.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Icon.html b/pacotes/openlayers/tests/test_Icon.html deleted file mode 100644 index 5aaba8c..0000000 --- a/pacotes/openlayers/tests/test_Icon.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Layer.html b/pacotes/openlayers/tests/test_Layer.html deleted file mode 100644 index 920f470..0000000 --- a/pacotes/openlayers/tests/test_Layer.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - -
-
- - diff --git a/pacotes/openlayers/tests/test_Layer_EventPane.html b/pacotes/openlayers/tests/test_Layer_EventPane.html deleted file mode 100644 index 6e6efb2..0000000 --- a/pacotes/openlayers/tests/test_Layer_EventPane.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Layer_FixedZoomLevels.html b/pacotes/openlayers/tests/test_Layer_FixedZoomLevels.html deleted file mode 100644 index 8b177e3..0000000 --- a/pacotes/openlayers/tests/test_Layer_FixedZoomLevels.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Layer_GeoRSS.html b/pacotes/openlayers/tests/test_Layer_GeoRSS.html deleted file mode 100644 index bd317df..0000000 --- a/pacotes/openlayers/tests/test_Layer_GeoRSS.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Layer_Google.html b/pacotes/openlayers/tests/test_Layer_Google.html deleted file mode 100644 index 2b02510..0000000 --- a/pacotes/openlayers/tests/test_Layer_Google.html +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Layer_Grid.html b/pacotes/openlayers/tests/test_Layer_Grid.html deleted file mode 100644 index 394f817..0000000 --- a/pacotes/openlayers/tests/test_Layer_Grid.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Layer_HTTPRequest.html b/pacotes/openlayers/tests/test_Layer_HTTPRequest.html deleted file mode 100644 index 1daf3ae..0000000 --- a/pacotes/openlayers/tests/test_Layer_HTTPRequest.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Layer_Image.html b/pacotes/openlayers/tests/test_Layer_Image.html deleted file mode 100644 index 207f825..0000000 --- a/pacotes/openlayers/tests/test_Layer_Image.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - -
-
- - diff --git a/pacotes/openlayers/tests/test_Layer_KaMap.html b/pacotes/openlayers/tests/test_Layer_KaMap.html deleted file mode 100644 index 4638b17..0000000 --- a/pacotes/openlayers/tests/test_Layer_KaMap.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Layer_Markers.html b/pacotes/openlayers/tests/test_Layer_Markers.html deleted file mode 100644 index 592a2d3..0000000 --- a/pacotes/openlayers/tests/test_Layer_Markers.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Layer_MultiMap.html b/pacotes/openlayers/tests/test_Layer_MultiMap.html deleted file mode 100644 index 251dc83..0000000 --- a/pacotes/openlayers/tests/test_Layer_MultiMap.html +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Layer_TMS.html b/pacotes/openlayers/tests/test_Layer_TMS.html deleted file mode 100644 index 65f5cf9..0000000 --- a/pacotes/openlayers/tests/test_Layer_TMS.html +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Layer_Text.html b/pacotes/openlayers/tests/test_Layer_Text.html deleted file mode 100644 index f8cfc96..0000000 --- a/pacotes/openlayers/tests/test_Layer_Text.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Layer_WMS.html b/pacotes/openlayers/tests/test_Layer_WMS.html deleted file mode 100644 index 0cefe15..0000000 --- a/pacotes/openlayers/tests/test_Layer_WMS.html +++ /dev/null @@ -1,244 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_LonLat.html b/pacotes/openlayers/tests/test_LonLat.html deleted file mode 100644 index aa9f8d1..0000000 --- a/pacotes/openlayers/tests/test_LonLat.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Map.html b/pacotes/openlayers/tests/test_Map.html deleted file mode 100644 index d7e8c8d..0000000 --- a/pacotes/openlayers/tests/test_Map.html +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Marker.html b/pacotes/openlayers/tests/test_Marker.html deleted file mode 100644 index 04f9c1b..0000000 --- a/pacotes/openlayers/tests/test_Marker.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Pixel.html b/pacotes/openlayers/tests/test_Pixel.html deleted file mode 100644 index 43acf9c..0000000 --- a/pacotes/openlayers/tests/test_Pixel.html +++ /dev/null @@ -1,96 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Popup.html b/pacotes/openlayers/tests/test_Popup.html deleted file mode 100644 index e96bab2..0000000 --- a/pacotes/openlayers/tests/test_Popup.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Renderer.html b/pacotes/openlayers/tests/test_Renderer.html deleted file mode 100644 index 8ee8242..0000000 --- a/pacotes/openlayers/tests/test_Renderer.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/test_Size.html b/pacotes/openlayers/tests/test_Size.html deleted file mode 100644 index 104680e..0000000 --- a/pacotes/openlayers/tests/test_Size.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Tile.html b/pacotes/openlayers/tests/test_Tile.html deleted file mode 100644 index 180e560..0000000 --- a/pacotes/openlayers/tests/test_Tile.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - diff --git a/pacotes/openlayers/tests/test_Tile_Image.html b/pacotes/openlayers/tests/test_Tile_Image.html deleted file mode 100644 index 345a856..0000000 --- a/pacotes/openlayers/tests/test_Tile_Image.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - -
- - - diff --git a/pacotes/openlayers/tests/test_Util.html b/pacotes/openlayers/tests/test_Util.html deleted file mode 100644 index 907ee3e..0000000 --- a/pacotes/openlayers/tests/test_Util.html +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - -
- - diff --git a/pacotes/openlayers/tests/throws.js b/pacotes/openlayers/tests/throws.js deleted file mode 100644 index d6b8897..0000000 --- a/pacotes/openlayers/tests/throws.js +++ /dev/null @@ -1,83 +0,0 @@ -/* - - throws.js -- Adds a `throws_` method to AnotherWay test objects. - - Copyright 2005 MetaCarta, Inc., released under the BSD License. - - - A reference to this file needs to be added to `run-tests.html` in the - head element after the AnotherWay classes are created: - - - - Then, it can be used just like the `ok`, `fail` and other such methods - in your unit tests. - - e.g. - - t.throws_(function () {new OpenLayers.View.Map.Dynamic();}, - ReferenceError("No container supplied."), - "OpenLayers.View.Map.Dynamic instantiation with no container " - + "must throw."); - - This was inspired by the `assertRaises` method of Python's unittest - library. - - Possible future enhancements: - - * Contribute to official AnotherWay distribution. - * Use `apply` rather than require a inner function (or as an option). - * Preserve the stack fields. - - */ - -Test.AnotherWay._test_object_t.prototype.throws_ = -function (fn, expectedException, doc) { - /* - - Executes the supplied function object catching any exception(s) - thrown, then verifies the supplied expected exception occurred. - - If no exception is thrown the test fails. - - If an exception is thrown and it does not match the supplied - expected exception the test fails. - - If the exception thrown matches the supplied expected exception - the test passes. - - Two exceptions "match" if Test.AnotherWay's `eq` method considers - the two equal when their respective stacks are ignored. - - fn - The function object to be executed - expectedException - The exception object expected to result - doc - Description of the test - - Note: The name of this method is `throws_` (with a trailing - underscore) as `throws` is a reserved identifier and can - not be used as a method name. - - Note: This function does not preserve the stack field associated - with either exception. - - */ - var theCaughtException = null; - - try { - fn(); - } catch (innerCaughtException) { - // As `innerCaughtException` is not visible outside the scope - // of this `catch` block we need to make it visible explicitly. - theCaughtException = innerCaughtException; - } - - if (theCaughtException) { - // We delete the stacks before comparison as they will never match. - delete theCaughtException.stack; - delete expectedException.stack; - this.eq(theCaughtException, expectedException, doc); - } else { - this.fail(doc); - } -} - diff --git a/pacotes/openlayers/theme/default/img/add_point_off.png b/pacotes/openlayers/theme/default/img/add_point_off.png deleted file mode 100644 index aefd09c..0000000 Binary files a/pacotes/openlayers/theme/default/img/add_point_off.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/add_point_on.png b/pacotes/openlayers/theme/default/img/add_point_on.png deleted file mode 100644 index 1294a2c..0000000 Binary files a/pacotes/openlayers/theme/default/img/add_point_on.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/drag-rectangle-off.png b/pacotes/openlayers/theme/default/img/drag-rectangle-off.png deleted file mode 100644 index a46d497..0000000 Binary files a/pacotes/openlayers/theme/default/img/drag-rectangle-off.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/drag-rectangle-on.png b/pacotes/openlayers/theme/default/img/drag-rectangle-on.png deleted file mode 100644 index eafd311..0000000 Binary files a/pacotes/openlayers/theme/default/img/drag-rectangle-on.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/draw_line_off.png b/pacotes/openlayers/theme/default/img/draw_line_off.png deleted file mode 100644 index 7f15612..0000000 Binary files a/pacotes/openlayers/theme/default/img/draw_line_off.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/draw_line_on.png b/pacotes/openlayers/theme/default/img/draw_line_on.png deleted file mode 100644 index ba09186..0000000 Binary files a/pacotes/openlayers/theme/default/img/draw_line_on.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/draw_point_off.png b/pacotes/openlayers/theme/default/img/draw_point_off.png deleted file mode 100644 index fde94bd..0000000 Binary files a/pacotes/openlayers/theme/default/img/draw_point_off.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/draw_point_on.png b/pacotes/openlayers/theme/default/img/draw_point_on.png deleted file mode 100644 index 8804221..0000000 Binary files a/pacotes/openlayers/theme/default/img/draw_point_on.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/draw_polygon_off.png b/pacotes/openlayers/theme/default/img/draw_polygon_off.png deleted file mode 100644 index 53ce9d7..0000000 Binary files a/pacotes/openlayers/theme/default/img/draw_polygon_off.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/draw_polygon_on.png b/pacotes/openlayers/theme/default/img/draw_polygon_on.png deleted file mode 100644 index 2a33376..0000000 Binary files a/pacotes/openlayers/theme/default/img/draw_polygon_on.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/icolimites.png b/pacotes/openlayers/theme/default/img/icolimites.png deleted file mode 100644 index 3f96d72..0000000 Binary files a/pacotes/openlayers/theme/default/img/icolimites.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/move_feature_off.png b/pacotes/openlayers/theme/default/img/move_feature_off.png deleted file mode 100644 index 9f588db..0000000 Binary files a/pacotes/openlayers/theme/default/img/move_feature_off.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/move_feature_on.png b/pacotes/openlayers/theme/default/img/move_feature_on.png deleted file mode 100644 index 072f066..0000000 Binary files a/pacotes/openlayers/theme/default/img/move_feature_on.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/pan_off.png b/pacotes/openlayers/theme/default/img/pan_off.png deleted file mode 100644 index 30b2aed..0000000 Binary files a/pacotes/openlayers/theme/default/img/pan_off.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/pan_on.png b/pacotes/openlayers/theme/default/img/pan_on.png deleted file mode 100644 index d73e7dd..0000000 Binary files a/pacotes/openlayers/theme/default/img/pan_on.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/panning-hand-off.png b/pacotes/openlayers/theme/default/img/panning-hand-off.png deleted file mode 100644 index 5071704..0000000 Binary files a/pacotes/openlayers/theme/default/img/panning-hand-off.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/panning-hand-on.png b/pacotes/openlayers/theme/default/img/panning-hand-on.png deleted file mode 100644 index f748675..0000000 Binary files a/pacotes/openlayers/theme/default/img/panning-hand-on.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/remove_point_off.png b/pacotes/openlayers/theme/default/img/remove_point_off.png deleted file mode 100644 index 76c8606..0000000 Binary files a/pacotes/openlayers/theme/default/img/remove_point_off.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/img/remove_point_on.png b/pacotes/openlayers/theme/default/img/remove_point_on.png deleted file mode 100644 index 0ff28fc..0000000 Binary files a/pacotes/openlayers/theme/default/img/remove_point_on.png and /dev/null differ diff --git a/pacotes/openlayers/theme/default/style.css b/pacotes/openlayers/theme/default/style.css deleted file mode 100644 index f4a5672..0000000 --- a/pacotes/openlayers/theme/default/style.css +++ /dev/null @@ -1,165 +0,0 @@ -div.olMapViewport { - -moz-user-select: none -} - -.olLayerGoogleCopyright { - left: 2px; - bottom: 2px; -} -.olLayerGooglePoweredBy { - left: 2px; - bottom: 15px; -} - -.olControlScale { - right: 3px; - bottom: 3em; - display: block; - position: absolute; -} -.olControlPermalink { - right: 3px; - bottom: 1.5em; - display: block; - position: absolute; -} - -div.olControlMousePosition { - bottom: 0em; - right: 3px; - display: block; - position: absolute; - font-family: Arial; - font-size: smaller; -} - -.olControlOverviewMapContainer { - position: absolute; - bottom: 0px; - right: 0px; -} - -.olControlOverviewMapElement { - padding: 10px 18px 10px 10px; - background-color: #00008B; - -moz-border-radius: 1em 0 0 0; -} - -.olControlOverviewMapMinimizeButton { - right: 0px; - bottom: 80px; -} - -.olControlOverviewMapMaximizeButton { - right: 0px; - bottom: 80px; -} - -.olControlOverviewMapExtentRectangle { - cursor: move; - border: 2px dotted red; -} -.olLayerGeoRSSDescription { - float:left; - width:100%; - overflow:auto; - font-size:1.0em; -} -.olLayerGeoRSSClose { - float:right; - color:gray; - font-size:1.2em; - font-family:sans-serif; -} -.olLayerGeoRSSTitle { - float:left;font-size:1.2em; -} - -.olPopupContent { - padding:5px; -} -.olControlNavToolbar div { - display:block; - width: 28px; - height: 28px; - top: 300px; - left: 6px; - position: relative; -} - -.olControlNavToolbar .olControlNavigationItemActive { - background-image: url("img/panning-hand-on.png"); - background-repeat: no-repeat; -} -.olControlNavToolbar .olControlNavigationItemInactive { - background-image: url("img/panning-hand-off.png"); - background-repeat: no-repeat; -} -.olControlNavToolbar .olControlZoomBoxItemActive { - background-image: url("img/drag-rectangle-on.png"); - background-repeat: no-repeat; -} -.olControlNavToolbar .olControlZoomBoxItemInactive { - background-image: url("img/drag-rectangle-off.png"); - background-repeat: no-repeat; -} -.olControlEditingToolbar { - float:right; - right: 0px; - height: 30px; - width: 200px; -} -.olControlEditingToolbar div { - float:right; - width: 24px; - height: 24px; - margin: 5px; -} -.olControlEditingToolbar .olControlNavigationItemActive { - background-image: url("img/pan_on.png"); - background-repeat: no-repeat; -} -.olControlEditingToolbar .olControlNavigationItemInactive { - background-image: url("img/pan_off.png"); - background-repeat: no-repeat; -} -.olControlEditingToolbar .olControlDrawFeaturePointItemActive { - background-image: url("img/draw_point_on.png"); - background-repeat: no-repeat; -} -.olControlEditingToolbar .olControlDrawFeaturePointItemInactive { - background-image: url("img/draw_point_off.png"); - background-repeat: no-repeat; -} -.olControlEditingToolbar .olControlDrawFeaturePathItemInactive { - background-image: url("img/draw_line_off.png"); - background-repeat: no-repeat; -} -.olControlEditingToolbar .olControlDrawFeaturePathItemActive { - background-image: url("img/draw_line_on.png"); - background-repeat: no-repeat; -} -.olControlEditingToolbar .olControlDrawFeaturePolygonItemInactive { - background-image: url("img/draw_polygon_off.png"); - background-repeat: no-repeat; -} -.olControlEditingToolbar .olControlDrawFeaturePolygonItemActive { - background-image: url("img/draw_polygon_on.png"); - background-repeat: no-repeat; -} -.olControlPanel div { - display:block; - width: 22px; - height: 22px; - margin: 5px; -} -.olControlPanel .olControlZoomToMaxExtentItemInactive { - width: 22px; - height: 22px; - background-image: url("img/icolimites.png"); -} -.olControlPanel .olControlZoomOutItemInactive { - width: 22px; - height: 22px; - background-image: url("img/icolimites.png"); -} \ No newline at end of file diff --git a/pacotes/openlayers/tools/README.txt b/pacotes/openlayers/tools/README.txt deleted file mode 100644 index cee5121..0000000 --- a/pacotes/openlayers/tools/README.txt +++ /dev/null @@ -1,14 +0,0 @@ -This directory contains tools used in the packaging or deployment of OpenLayers. - -Javascript minimizing tools: - - * jsmin.c, jsmin.py: - jsmin.py is a direct translation of the jsmin.c code into Python. jsmin.py - will therefore run anyplace Python runs... but at significantly slower speed. - - * shrinksafe.py - shrinksafe.py calls out to a third party javascript shrinking service. This - creates file sizes about 4% smaller (as of commit 501) of the OpenLayers - code. However, this also has the side effect of making you dependant on the - web service -- and since that service sometimes goes dead, it's risky to - depend on it. diff --git a/pacotes/openlayers/tools/jsmin.c b/pacotes/openlayers/tools/jsmin.c deleted file mode 100644 index 86d53da..0000000 --- a/pacotes/openlayers/tools/jsmin.c +++ /dev/null @@ -1,272 +0,0 @@ -/* jsmin.c - 2006-05-04 - -Copyright (c) 2002 Douglas Crockford (www.crockford.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The Software shall be used for Good, not Evil. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include -#include - -static int theA; -static int theB; -static int theLookahead = EOF; - - -/* isAlphanum -- return true if the character is a letter, digit, underscore, - dollar sign, or non-ASCII character. -*/ - -static int -isAlphanum(int c) -{ - return ((c >= 'a' && c <= 'z') || (c >= '0' && c <= '9') || - (c >= 'A' && c <= 'Z') || c == '_' || c == '$' || c == '\\' || - c > 126); -} - - -/* get -- return the next character from stdin. Watch out for lookahead. If - the character is a control character, translate it to a space or - linefeed. -*/ - -static int -get() -{ - int c = theLookahead; - theLookahead = EOF; - if (c == EOF) { - c = getc(stdin); - } - if (c >= ' ' || c == '\n' || c == EOF) { - return c; - } - if (c == '\r') { - return '\n'; - } - return ' '; -} - - -/* peek -- get the next character without getting it. -*/ - -static int -peek() -{ - theLookahead = get(); - return theLookahead; -} - - -/* next -- get the next character, excluding comments. peek() is used to see - if a '/' is followed by a '/' or '*'. -*/ - -static int -next() -{ - int c = get(); - if (c == '/') { - switch (peek()) { - case '/': - for (;;) { - c = get(); - if (c <= '\n') { - return c; - } - } - case '*': - get(); - for (;;) { - switch (get()) { - case '*': - if (peek() == '/') { - get(); - return ' '; - } - break; - case EOF: - fprintf(stderr, "Error: JSMIN Unterminated comment.\n"); - exit(1); - } - } - default: - return c; - } - } - return c; -} - - -/* action -- do something! What you do is determined by the argument: - 1 Output A. Copy B to A. Get the next B. - 2 Copy B to A. Get the next B. (Delete A). - 3 Get the next B. (Delete B). - action treats a string as a single character. Wow! - action recognizes a regular expression if it is preceded by ( or , or =. -*/ - -static void -action(int d) -{ - switch (d) { - case 1: - putc(theA, stdout); - case 2: - theA = theB; - if (theA == '\'' || theA == '"') { - for (;;) { - putc(theA, stdout); - theA = get(); - if (theA == theB) { - break; - } - if (theA <= '\n') { - fprintf(stderr, -"Error: JSMIN unterminated string literal: %c\n", theA); - exit(1); - } - if (theA == '\\') { - putc(theA, stdout); - theA = get(); - } - } - } - case 3: - theB = next(); - if (theB == '/' && (theA == '(' || theA == ',' || theA == '=' || - theA == ':' || theA == '[' || theA == '!' || theA == '&' || - theA == '|')) { - putc(theA, stdout); - putc(theB, stdout); - for (;;) { - theA = get(); - if (theA == '/') { - break; - } else if (theA =='\\') { - putc(theA, stdout); - theA = get(); - } else if (theA <= '\n') { - fprintf(stderr, -"Error: JSMIN unterminated Regular Expression literal.\n", theA); - exit(1); - } - putc(theA, stdout); - } - theB = next(); - } - } -} - - -/* jsmin -- Copy the input to the output, deleting the characters which are - insignificant to JavaScript. Comments will be removed. Tabs will be - replaced with spaces. Carriage returns will be replaced with linefeeds. - Most spaces and linefeeds will be removed. -*/ - -static void -jsmin() -{ - theA = '\n'; - action(3); - while (theA != EOF) { - switch (theA) { - case ' ': - if (isAlphanum(theB)) { - action(1); - } else { - action(2); - } - break; - case '\n': - switch (theB) { - case '{': - case '[': - case '(': - case '+': - case '-': - action(1); - break; - case ' ': - action(3); - break; - default: - if (isAlphanum(theB)) { - action(1); - } else { - action(2); - } - } - break; - default: - switch (theB) { - case ' ': - if (isAlphanum(theA)) { - action(1); - break; - } - action(3); - break; - case '\n': - switch (theA) { - case '}': - case ']': - case ')': - case '+': - case '-': - case '"': - case '\'': - action(1); - break; - default: - if (isAlphanum(theA)) { - action(1); - } else { - action(3); - } - } - break; - default: - action(1); - break; - } - } - } -} - - -/* main -- Output any command line arguments as comments - and then minify the input. -*/ -extern int -main(int argc, char* argv[]) -{ - int i; - for (i = 1; i < argc; i += 1) { - fprintf(stdout, "// %s\n", argv[i]); - } - jsmin(); - return 0; -} diff --git a/pacotes/openlayers/tools/jsmin.py b/pacotes/openlayers/tools/jsmin.py deleted file mode 100644 index d188790..0000000 --- a/pacotes/openlayers/tools/jsmin.py +++ /dev/null @@ -1,216 +0,0 @@ -#!/usr/bin/python - -# This code is original from jsmin by Douglas Crockford, it was translated to -# Python by Baruch Even. The original code had the following copyright and -# license. -# -# /* jsmin.c -# 2007-01-08 -# -# Copyright (c) 2002 Douglas Crockford (www.crockford.com) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy of -# this software and associated documentation files (the "Software"), to deal in -# the Software without restriction, including without limitation the rights to -# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -# of the Software, and to permit persons to whom the Software is furnished to do -# so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# The Software shall be used for Good, not Evil. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# */ - -from StringIO import StringIO - -def jsmin(js): - ins = StringIO(js) - outs = StringIO() - JavascriptMinify().minify(ins, outs) - str = outs.getvalue() - if len(str) > 0 and str[0] == '\n': - str = str[1:] - return str - -def isAlphanum(c): - """return true if the character is a letter, digit, underscore, - dollar sign, or non-ASCII character. - """ - return ((c >= 'a' and c <= 'z') or (c >= '0' and c <= '9') or - (c >= 'A' and c <= 'Z') or c == '_' or c == '$' or c == '\\' or (c is not None and ord(c) > 126)); - -class UnterminatedComment(Exception): - pass - -class UnterminatedStringLiteral(Exception): - pass - -class UnterminatedRegularExpression(Exception): - pass - -class JavascriptMinify(object): - - def _outA(self): - self.outstream.write(self.theA) - def _outB(self): - self.outstream.write(self.theB) - - def _get(self): - """return the next character from stdin. Watch out for lookahead. If - the character is a control character, translate it to a space or - linefeed. - """ - c = self.theLookahead - self.theLookahead = None - if c == None: - c = self.instream.read(1) - if c >= ' ' or c == '\n': - return c - if c == '': # EOF - return '\000' - if c == '\r': - return '\n' - return ' ' - - def _peek(self): - self.theLookahead = self._get() - return self.theLookahead - - def _next(self): - """get the next character, excluding comments. peek() is used to see - if a '/' is followed by a '/' or '*'. - """ - c = self._get() - if c == '/': - p = self._peek() - if p == '/': - c = self._get() - while c > '\n': - c = self._get() - return c - if p == '*': - c = self._get() - while 1: - c = self._get() - if c == '*': - if self._peek() == '/': - self._get() - return ' ' - if c == '\000': - raise UnterminatedComment() - - return c - - def _action(self, action): - """do something! What you do is determined by the argument: - 1 Output A. Copy B to A. Get the next B. - 2 Copy B to A. Get the next B. (Delete A). - 3 Get the next B. (Delete B). - action treats a string as a single character. Wow! - action recognizes a regular expression if it is preceded by ( or , or =. - """ - if action <= 1: - self._outA() - - if action <= 2: - self.theA = self.theB - if self.theA == "'" or self.theA == '"': - while 1: - self._outA() - self.theA = self._get() - if self.theA == self.theB: - break - if self.theA <= '\n': - raise UnterminatedStringLiteral() - if self.theA == '\\': - self._outA() - self.theA = self._get() - - - if action <= 3: - self.theB = self._next() - if self.theB == '/' and (self.theA == '(' or self.theA == ',' or - self.theA == '=' or self.theA == ':' or - self.theA == '[' or self.theA == '?' or - self.theA == '!' or self.theA == '&' or - self.theA == '|'): - self._outA() - self._outB() - while 1: - self.theA = self._get() - if self.theA == '/': - break - elif self.theA == '\\': - self._outA() - self.theA = self._get() - elif self.theA <= '\n': - raise UnterminatedRegularExpression() - self._outA() - self.theB = self._next() - - - def _jsmin(self): - """Copy the input to the output, deleting the characters which are - insignificant to JavaScript. Comments will be removed. Tabs will be - replaced with spaces. Carriage returns will be replaced with linefeeds. - Most spaces and linefeeds will be removed. - """ - self.theA = '\n' - self._action(3) - - while self.theA != '\000': - if self.theA == ' ': - if isAlphanum(self.theB): - self._action(1) - else: - self._action(2) - elif self.theA == '\n': - if self.theB in ['{', '[', '(', '+', '-']: - self._action(1) - elif self.theB == ' ': - self._action(3) - else: - if isAlphanum(self.theB): - self._action(1) - else: - self._action(2) - else: - if self.theB == ' ': - if isAlphanum(self.theA): - self._action(1) - else: - self._action(3) - elif self.theB == '\n': - if self.theA in ['}', ']', ')', '+', '-', '"', '\'']: - self._action(1) - else: - if isAlphanum(self.theA): - self._action(1) - else: - self._action(3) - else: - self._action(1) - - def minify(self, instream, outstream): - self.instream = instream - self.outstream = outstream - self.theA = None - self.thaB = None - self.theLookahead = None - - self._jsmin() - self.instream.close() - -if __name__ == '__main__': - import sys - jsm = JavascriptMinify() - jsm.minify(sys.stdin, sys.stdout) diff --git a/pacotes/openlayers/tools/mergejs.py b/pacotes/openlayers/tools/mergejs.py deleted file mode 100644 index 7dafd25..0000000 --- a/pacotes/openlayers/tools/mergejs.py +++ /dev/null @@ -1,257 +0,0 @@ -#!/usr/bin/env python -# -# Merge multiple JavaScript source code files into one. -# -# Usage: -# This script requires source files to have dependencies specified in them. -# -# Dependencies are specified with a comment of the form: -# -# // @requires -# -# e.g. -# -# // @requires Geo/DataSource.js -# -# or (ideally) within a class comment definition -# -# /** -# * @class -# * -# * @requires OpenLayers/Layer.js -# */ -# -# This script should be executed like so: -# -# mergejs.py [...] -# -# e.g. -# -# mergejs.py openlayers.js Geo/ CrossBrowser/ -# -# This example will cause the script to walk the `Geo` and -# `CrossBrowser` directories--and subdirectories thereof--and import -# all `*.js` files encountered. The dependency declarations will be extracted -# and then the source code from imported files will be output to -# a file named `openlayers.js` in an order which fulfils the dependencies -# specified. -# -# -# Note: This is a very rough initial version of this code. -# -# -- Copyright 2005-2006 MetaCarta, Inc. / OpenLayers project -- -# - -# TODO: Allow files to be excluded. e.g. `Crossbrowser/DebugMode.js`? -# TODO: Report error when dependency can not be found rather than KeyError. - -import re -import os -import sys - -SUFFIX_JAVASCRIPT = ".js" - -RE_REQUIRE = "@requires (.*)\n" # TODO: Ensure in comment? -class SourceFile: - """ - Represents a Javascript source code file. - """ - - def __init__(self, filepath, source): - """ - """ - self.filepath = filepath - self.source = source - - self.requiredBy = [] - - - def _getRequirements(self): - """ - Extracts the dependencies specified in the source code and returns - a list of them. - """ - # TODO: Cache? - return re.findall(RE_REQUIRE, self.source) - - requires = property(fget=_getRequirements, doc="") - - - -def usage(filename): - """ - Displays a usage message. - """ - print "%s [-c ] [...]" % filename - - -class Config: - """ - Represents a parsed configuration file. - - A configuration file should be of the following form: - - [first] - 3rd/prototype.js - core/application.js - core/params.js - - [last] - core/api.js - - [exclude] - 3rd/logger.js - - All headings are required. - - The files listed in the `first` section will be forced to load - *before* all other files (in the order listed). The files in `last` - section will be forced to load *after* all the other files (in the - order listed). - - The files list in the `exclude` section will not be imported. - - """ - - def __init__(self, filename): - """ - Parses the content of the named file and stores the values. - """ - lines = [line.strip() # Assumes end-of-line character is present - for line in open(filename) - if line.strip()] # Skip blank lines - - self.forceFirst = lines[lines.index("[first]") + 1:lines.index("[last]")] - - self.forceLast = lines[lines.index("[last]") + 1:lines.index("[include]")] - self.include = lines[lines.index("[include]") + 1:lines.index("[exclude]")] - self.exclude = lines[lines.index("[exclude]") + 1:] - -def run (sourceDirectory, outputFilename = None, configFile = None): - cfg = None - if configFile: - cfg = Config(configFile) - - allFiles = [] - - ## Find all the Javascript source files - for root, dirs, files in os.walk(sourceDirectory): - for filename in files: - if filename.endswith(SUFFIX_JAVASCRIPT) and not filename.startswith("."): - filepath = os.path.join(root, filename)[len(sourceDirectory)+1:] - filepath = filepath.replace("\\", "/") - if cfg and cfg.include: - if filepath in cfg.include or filepath in cfg.forceFirst: - allFiles.append(filepath) - elif (not cfg) or (filepath not in cfg.exclude): - allFiles.append(filepath) - - ## Header inserted at the start of each file in the output - HEADER = "/* " + "=" * 70 + " %s\n" + " " + "=" * 70 + " */\n\n" - - files = {} - - order = [] # List of filepaths to output, in a dependency satisfying order - - ## Import file source code - ## TODO: Do import when we walk the directories above? - for filepath in allFiles: - print "Importing: %s" % filepath - fullpath = os.path.join(sourceDirectory, filepath) - content = open(fullpath, "U").read() # TODO: Ensure end of line @ EOF? - files[filepath] = SourceFile(filepath, content) # TODO: Chop path? - - print - - from toposort import toposort - - complete = False - resolution_pass = 1 - - while not complete: - order = [] # List of filepaths to output, in a dependency satisfying order - nodes = [] - routes = [] - ## Resolve the dependencies - print "Resolution pass %s... " % resolution_pass - resolution_pass += 1 - - for filepath, info in files.items(): - nodes.append(filepath) - for neededFilePath in info.requires: - routes.append((neededFilePath, filepath)) - - for dependencyLevel in toposort(nodes, routes): - for filepath in dependencyLevel: - order.append(filepath) - if not files.has_key(filepath): - print "Importing: %s" % filepath - fullpath = os.path.join(sourceDirectory, filepath) - content = open(fullpath, "U").read() # TODO: Ensure end of line @ EOF? - files[filepath] = SourceFile(filepath, content) # TODO: Chop path? - - - - # Double check all dependencies have been met - complete = True - try: - for fp in order: - if max([order.index(rfp) for rfp in files[fp].requires] + - [order.index(fp)]) != order.index(fp): - complete = False - except: - complete = False - - print - - - ## Move forced first and last files to the required position - if cfg: - print "Re-ordering files..." - order = cfg.forceFirst + [item - for item in order - if ((item not in cfg.forceFirst) and - (item not in cfg.forceLast))] + cfg.forceLast - - print - ## Output the files in the determined order - result = [] - - for fp in order: - f = files[fp] - print "Exporting: ", f.filepath - result.append(HEADER % f.filepath) - source = f.source - result.append(source) - if not source.endswith("\n"): - result.append("\n") - - print "\nTotal files merged: %d " % len(files) - - if outputFilename: - print "\nGenerating: %s" % (outputFilename) - open(outputFilename, "w").write("".join(result)) - return "".join(result) - -if __name__ == "__main__": - import getopt - - options, args = getopt.getopt(sys.argv[1:], "-c:") - - try: - outputFilename = args[0] - except IndexError: - usage(sys.argv[0]) - raise SystemExit - else: - sourceDirectory = args[1] - if not sourceDirectory: - usage(sys.argv[0]) - raise SystemExit - - configFile = None - if options and options[0][0] == "-c": - configFile = options[0][1] - print "Parsing configuration file: %s" % filename - - run( sourceDirectory, outputFilename, configFile ) diff --git a/pacotes/openlayers/tools/release.sh b/pacotes/openlayers/tools/release.sh deleted file mode 100644 index e58ad3c..0000000 --- a/pacotes/openlayers/tools/release.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -VERSION=$1 -echo "Building OpenLayers $VERSION" -svn export http://svn.openlayers.org/tags/openlayers/release-$VERSION OpenLayers-$VERSION -cd OpenLayers-$VERSION/build -./build.py full -mkdir /www/openlayers/htdocs/api/$VERSION -cp OpenLayers.js /www/openlayers/htdocs/api/$VERSION -cd .. -cp -a img/ /www/openlayers/htdocs/api/$VERSION -cp -a theme/ /www/openlayers/htdocs/api/$VERSION -rm tools/*.pyc -cd .. -tar -zvcf OpenLayers-$VERSION.tar.gz OpenLayers-$VERSION -zip -9r OpenLayers-$VERSION.zip OpenLayers-$VERSION -cp OpenLayers-$VERSION.{tar.gz,zip} /www/openlayers/htdocs/download/ diff --git a/pacotes/openlayers/tools/shrinksafe.py b/pacotes/openlayers/tools/shrinksafe.py deleted file mode 100644 index 4e62731..0000000 --- a/pacotes/openlayers/tools/shrinksafe.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python -# -# Script to provide a wrapper around the ShrinkSafe "web service" -# -# - -# -# We use this script for two reasons: -# -# * This avoids having to install and configure Java and the standalone -# ShrinkSafe utility. -# -# * The current ShrinkSafe standalone utility was broken when we last -# used it. -# - -import sys - -import urllib -import urllib2 - -URL_SHRINK_SAFE = "http://alex.dojotoolkit.org/shrinksafe/shrinksafe.php" - -# This would normally be dynamically generated: -BOUNDARY_MARKER = "---------------------------72288400411964641492083565382" - -if __name__ == "__main__": - ## Grab the source code - try: - sourceFilename = sys.argv[1] - except: - print "Usage: %s (|-)" % sys.argv[0] - raise SystemExit - - if sourceFilename == "-": - sourceCode = sys.stdin.read() - sourceFilename = "stdin.js" - else: - sourceCode = open(sourceFilename).read() - - ## Create the request replicating posting of the form from the web page - request = urllib2.Request(url=URL_SHRINK_SAFE) - request.add_header("Content-Type", - "multipart/form-data; boundary=%s" % BOUNDARY_MARKER) - request.add_data(""" ---%s -Content-Disposition: form-data; name="shrinkfile[]"; filename="%s" -Content-Type: application/x-javascript - -%s -""" % (BOUNDARY_MARKER, sourceFilename, sourceCode)) - - ## Deliver the result - print urllib2.urlopen(request).read(), diff --git a/pacotes/openlayers/tools/toposort.py b/pacotes/openlayers/tools/toposort.py deleted file mode 100644 index c3b1be6..0000000 --- a/pacotes/openlayers/tools/toposort.py +++ /dev/null @@ -1,260 +0,0 @@ -# -# According to this file -# is licensed under a BSD-style license. We only use the section -# originally by Tim Peters. -# -# TODO: The use of this code needs to be okayed by someone. -# - -class RecursionError( OverflowError, ValueError ): - '''Unable to calculate result because of recursive structure''' - - -def sort(nodes, routes, noRecursion=1): - '''Passed a list of node IDs and a list of source,dest ID routes - attempt to create a list of stages where each sub list - is one stage in a process. - ''' - children, parents = _buildChildrenLists(routes) - # first stage is those nodes - # having no incoming routes... - stage = [] - stages = [stage] - taken = [] - for node in nodes: - if (not parents.get(node)): - stage.append (node) - if nodes and not stage: - # there is no element which does not depend on - # some other element!!! - stage.append( nodes[0]) - taken.extend( stage ) - nodes = filter ( lambda x, l=stage: x not in l, nodes ) - while nodes: - previousStageChildren = [] - nodelen = len(nodes) - # second stage are those nodes - # which are direct children of the first stage - for node in stage: - for child in children.get (node, []): - if child not in previousStageChildren and child not in taken: - previousStageChildren.append(child) - elif child in taken and noRecursion: - raise RecursionError( (child, node) ) - # unless they are children of other direct children... - # TODO, actually do that... - stage = previousStageChildren - removes = [] - for current in stage: - currentParents = parents.get( current, [] ) - for parent in currentParents: - if parent in stage and parent != current: - # might wind up removing current... - if not current in parents.get(parent, []): - # is not mutually dependent... - removes.append( current ) - for remove in removes: - while remove in stage: - stage.remove( remove ) - stages.append( stage) - taken.extend( stage ) - nodes = filter ( lambda x, l=stage: x not in l, nodes ) - if nodelen == len(nodes): - if noRecursion: - raise RecursionError( nodes ) - else: - stages.append( nodes[:] ) - nodes = [] - return stages - -def _buildChildrenLists (routes): - childrenTable = {} - parentTable = {} - for sourceID,destinationID in routes: - currentChildren = childrenTable.get( sourceID, []) - currentParents = parentTable.get( destinationID, []) - if not destinationID in currentChildren: - currentChildren.append ( destinationID) - if not sourceID in currentParents: - currentParents.append ( sourceID) - childrenTable[sourceID] = currentChildren - parentTable[destinationID] = currentParents - return childrenTable, parentTable - - -def toposort (nodes, routes, noRecursion=1): - '''Topological sort from Tim Peters, fairly efficient - in comparison (it seems).''' - #first calculate the recursion depth - - dependencies = {} - inversedependencies = {} - if not nodes: - return [] - if not routes: - return [nodes] - for node in nodes: - dependencies[ node ] = (0, node) - inversedependencies[ node ] = [] - - - for depended, depends in routes: - # is it a null rule - try: - newdependencylevel, object = dependencies.get ( depends, (0, depends)) - except TypeError: - print depends - raise - dependencies[ depends ] = (newdependencylevel + 1, depends) - # "dependency (existence) of depended-on" - newdependencylevel,object = dependencies.get ( depended, (0, depended) ) - dependencies[ depended ] = (newdependencylevel, depended) - # Inverse dependency set up - dependencieslist = inversedependencies.get ( depended, []) - dependencieslist.append (depends) - inversedependencies[depended] = dependencieslist - ### Now we do the actual sorting - # The first task is to create the sortable - # list of dependency-levels - sortinglist = dependencies.values() - sortinglist.sort () - output = [] - while sortinglist: - deletelist = [] - generation = [] - output.append( generation) - while sortinglist and sortinglist[0][0] == 0: - number, object = sortinglist[0] - generation.append ( object ) - deletelist.append( object ) - for inverse in inversedependencies.get(object, () ): - try: - oldcount, inverse = dependencies [ inverse] - if oldcount > 0: - # will be dealt with on later pass - dependencies [ inverse] = (oldcount-1, inverse) - else: - # will be dealt with on this pass, - # so needs not to be in the sorting list next time - deletelist.append( inverse ) - # just in case a loop comes through - inversedependencies[object] = [] - except KeyError: - # dealing with a recursion-breaking run... - pass - del sortinglist [0] - # if no elements could be deleted, then - # there is something which depends upon itself - if not deletelist: - if noRecursion: - raise RecursionError( sortinglist ) - else: - # hack so that something gets deleted... -## import pdb -## pdb.set_trace() - dependencies[sortinglist[0][1]] = (0,sortinglist[0][1]) - # delete the items that were dealt with - for item in deletelist: - try: - del dependencies [ item ] - except KeyError: - pass - # need to recreate the sortinglist - sortinglist = dependencies.values() - if not generation: - output.remove( generation ) - sortinglist.sort () - return output - - - - - -if __name__ == "__main__": - - nodes = ['a', 'b', 'c', 'd', 'e', 'f'] - route = [('a', 'b'), ('b', 'c'), ('b', 'd'), ('e','f')] - - for x in toposort( nodes, route): - for a in x: - print a - - raise SystemExit - - - - import pprint, traceback - nodes= [ 0,1,2,3,4,5 ] - testingValues = [ - [ (0,1),(1,2),(2,3),(3,4),(4,5)], - [ (0,1),(0,2),(1,2),(3,4),(4,5)], - [ - (0,1), - (0,2), - (0,2), - (2,4), - (2,5), - (3,2), - (0,3)], - [ - (0,1), # 3-element cycle test, no orphan nodes - (1,2), - (2,0), - (2,4), - (2,5), - (3,2), - (0,3)], - [ - (0,1), - (1,1), - (1,1), - (1,4), - (1,5), - (1,2), - (3,1), - (2,1), - (2,0)], - [ - (0,1), - (1,0), - (0,2), - (0,3), - ], - [ - (0,1), - (1,0), - (0,2), - (3,1), - ], - ] - print 'sort, no recursion allowed' - for index in range(len(testingValues)): -## print ' %s -- %s'%( index, testingValues[index]) - try: - print ' ', sort( nodes, testingValues[index] ) - except: - print 'exception raised' - print 'toposort, no recursion allowed' - for index in range(len(testingValues)): -## print ' %s -- %s'%( index, testingValues[index]) - try: - print ' ', toposort( nodes, testingValues[index] ) - except: - print 'exception raised' - print 'sort, recursion allowed' - for index in range(len(testingValues)): -## print ' %s -- %s'%( index, testingValues[index]) - try: - print ' ', sort( nodes, testingValues[index],0 ) - except: - print 'exception raised' - print 'toposort, recursion allowed' - for index in range(len(testingValues)): -## print ' %s -- %s'%( index, testingValues[index]) - try: - print ' ', toposort( nodes, testingValues[index],0 ) - except: - print 'exception raised' - - - -- libgit2 0.21.2