Compare commits

...

260 Commits

Author SHA1 Message Date
crschmidt
419abc8b4a Tag 2.4. (woooooooohooooooooooo)
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.4@3198 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-05-29 13:38:23 +00:00
crschmidt
d8b8f44803 Pullup trunk for RC4.
Fixes:
#694    Safari 1.3.2 doesn't work with OL 2.4
#695    GeoRSS serializer is broken
#696    events need to fall through the overview map extent rectangle
#697    Vector example to show how to use styles
#698    add close box option to AnchoredBubble
#701    SVG render does not always clear features when map extent changes
#703    OpenLayers.Layer.Vector do not properly destroy its features
#706    Full CSS support fails when Control.OverviewMap is loaded
#708    change WKT format to deal in features instead of geometries
#710    Install instructions unclear
#711    OpenLayers.Layer.Image requires OpenLayers.Tile.Image
#715    layer.js needs sanity check
#718    WMS.Untiled Clone doesn't work
#719    SVG renderer does not always redraw LineStrings and Polygons
#720    remove console.log() from OpenLayers.Format.WKT


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.4@3177 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-05-24 14:43:07 +00:00
crschmidt
3c6cd6f559 Merge changes from trunk to 2.4:
svn merge trunk/openlayers/@3088 trunk/openlayers/@HEAD branches/openlayers/2.4/

Changes include:
 * Improved GML parsing to catch fid better
 * Letting panels pass mouseup through
 * Fixing small bug in panel example
 * Display of markers/layers when out of range on startup.
 * Fix to aspect ratio of Overview Map.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.4@3112 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-05-02 14:06:41 +00:00
crschmidt
b5103eb8ce Pullup r2999:3087 for RC2.
svn merge trunk/openlayers/@2999 trunk/openlayers/@HEAD branches/openlayers/2.4/



git-svn-id: http://svn.openlayers.org/branches/openlayers/2.4@3088 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-20 01:10:43 +00:00
Schuyler Erle
b6fb16153c Branch for 2.4 release.
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.4@2999 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-04 03:05:55 +00:00
crschmidt
6af64fcb46 Curves aren't rendered. Everything else can be taken care of later.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2998 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-04 03:02:50 +00:00
Tim Schaub
8647addda2 #629 - remove events from geometry
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2997 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 22:57:26 +00:00
Schuyler Erle
45407e9eda add Vector.destroyFeatures() and call it from WFS.moveTo(), which keeps WFS
from loading the same set of features multiple times. Includes tests. fixes
#622.



git-svn-id: http://svn.openlayers.org/trunk/openlayers@2996 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 21:02:59 +00:00
euzuro
23131012dd fix for #624 - merge stop() and safeStopPropagation()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2994 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 17:15:57 +00:00
euzuro
10b5c2df17 patch for #621 - assign items in the elements hash table a unique cacheID instead of relying on the element's actual 'id' property. thx for thorough review sde
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2993 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 16:54:14 +00:00
crschmidt
140090ec20 Zoom to features after done loading them.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2992 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 16:42:19 +00:00
euzuro
d0115ccf26 patch for #625 - remove extraneous _observeAndCache() function which is only used once. it doesnt seem to conceptually abstract anything, so lets inline it
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2991 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 15:54:27 +00:00
euzuro
33cb7fd0d4 patch for #623 - remove unused pointerX() and pointerY() functions
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2990 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 15:38:16 +00:00
euzuro
9aa92d491c events.js cleanup: more ifs without brackets
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2989 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 01:42:21 +00:00
euzuro
7aac1c1cfe coding standards. if statement without brackets and multiple return
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2988 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 01:38:22 +00:00
euzuro
8440cbaf43 coding standards if statement should always be followed by braces. also, add comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2987 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 01:37:04 +00:00
euzuro
2734030a82 move unloadCache() down so that stopObserving and stopObservingElement() are next to eachother
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2986 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 01:31:45 +00:00
euzuro
2f8a093f83 move observe() function up to right before its private counterpart
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2985 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 01:27:39 +00:00
euzuro
ade794259f move observers definition to top of object definition for readability
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2984 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-03 01:26:39 +00:00
euzuro
8007b6719a events.js: style (never underestimate style)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2983 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 23:12:55 +00:00
euzuro
ed0fca9157 events cleanup: fix tabs
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2982 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 23:00:55 +00:00
euzuro
dfa4441646 step one of cleaning up events.js: jsdoc
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2981 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 22:49:13 +00:00
Tim Schaub
b6a5e6619a #529 give tiles gutters - all layers that use Tile.Image must now look after layer.imageSize and layer.imageOffset - this is handled by layer.setTileSize - for untiled layers, setTileSize must be defined by the subclass - gutters are currently supported in Layer.Mapserver and Layer.WMS
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2979 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 17:18:38 +00:00
Schuyler Erle
7f0ccb69f0 propset svn:eol-style native recursively throughout trunk. enjoy\!
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2978 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 16:46:34 +00:00
Tim Schaub
9e688ebb37 #616: untiled layers set layer.tileSize on setMap and every moveTo
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2974 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 15:13:50 +00:00
crschmidt
d68caa00a5 Committing patch for #614 to add panel_div element to control panel
subcontrols. This will allow users to modify properties of the div -- for
example, adding a title element to the div. Access this property via
panel_div on the added control after addControls is called on the panel.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2973 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 14:10:38 +00:00
crschmidt
cefccb4a89 Updated version of JSMin downloaded from
http://www.crockford.com/javascript/jsmin.html , fixes #617 . 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2972 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 12:59:28 +00:00
crschmidt
def14318a6 If a vector feature has a layer and it is destroyed, remove the feature from
the layer, and reset the layer to null.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2971 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 11:19:32 +00:00
crschmidt
201e4bb112 Fix broken references to 'Format/JSON' that were simple copy paste errors.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2970 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 11:02:09 +00:00
crschmidt
5319acfaf1 Minor documentation fixed from fredj (#570).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2969 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 10:54:01 +00:00
crschmidt
833abcf6f1 #605 "OpenLayers.Feature.Vector: destroy() is defined twice" by fredj, patch
by euzuro. thx euz, fredj.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2968 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 10:52:10 +00:00
crschmidt
bc7f415d29 Commit tests and code for #610, reviewed by Schuyler, to resolve
PanZoom/PanZoomBar position argument.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2965 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 01:03:25 +00:00
Schuyler Erle
ce9ba4b560 Prevent OverviewMap.destroy() from running twice, which was causing test failures. Change has been reviewed and approved by crschmidt.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2964 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 00:46:07 +00:00
crschmidt
7c6e6dfc6e Commit fixed version of r2962. (Hooray for tests.)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2963 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 00:43:06 +00:00
crschmidt
d9a99143af Resolve #609 with Schuyler looking over my shoulder for review. Instead of
always having a calculateOffset (which overwrites offset if it exists), 
always have an offset. If people want calculateOffset, they can add it. 
Reported by David Bitner.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2962 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 00:39:53 +00:00
crschmidt
16d543a41f Add more resolutions to the list supported by Google, up to the current
maximum zoom of '19' (20 levels). Closes #613.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2961 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 00:25:27 +00:00
crschmidt
7e8605bf0d Fix SVG renderer. Stephen Woodbridge reported problems with this, and it was
also reported on the users mailing list. The problem appears to be that Firefox
has poor support for circles of very small radius -- below about .0002. Since
units were in geographic units, this just didn't work so well. So: 
  * Change coordinate space to be pixel based.
  * Make all x/y operations divided by resolution
  * add getComponentsString, getShortString helpers
  * Redraw nodes totally on every 'reprojectNode' call


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2960 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-02 00:15:59 +00:00
Schuyler Erle
79c3ed7d05 Update VML.js to work in IE standards mode; also, update editingtoolbar.html to trigger the (now fixed) bug to make sure it doesn't come back. Fixes #564.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2959 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-01 23:22:49 +00:00
Schuyler Erle
175f07c403 Add destroy() to Control.OverviewMap and add a check to map.destroy() to bail if it's already been called (by, say, window.onunload). Fixes #595.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2958 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-01 22:29:25 +00:00
Schuyler Erle
772f87f95e Clean up layers and controls a little more carefully in map.destroy(). Fixes #596.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2957 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-01 21:56:20 +00:00
Schuyler Erle
74f557c158 Fix euzuro's broken apostrophe in Marker.js from r122.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2956 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-01 21:37:17 +00:00
Schuyler Erle
07abc57037 Check return values from activate()/deactivate() in subclassed Handlers and Controls, as appropriate. Fixes #599.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2955 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-01 21:33:59 +00:00
Schuyler Erle
75b81b2374 Add 4th arg to map.setCenter() to force zoom change, and change
map.setBaseLayer() to use it on every base layer change, regardless of whether
the numeric zoom level itself actually changes. Includes test. Fixes #450.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2952 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-01 20:47:52 +00:00
crschmidt
53977cf840 * Remove default styling from the Feature.Vector class.
* Add a 'style' property to the layer.
 * When a feature is added to a layer, either uses the style on the 
   layer, or uses the default feature style.
 * Add test to Layer.Vector for this funcionality 
 * Adds a preFeatureInsert hook to change a feature *before* 
   drawing it.
 * Change openmnnd demo to include the use of preFeatureInsert
   and style attribute on layer.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2949 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-01 12:08:13 +00:00
crschmidt
adee1fb217 Patch from andreas to fix silly typo in Control/Panel. (I need to start
naming my external maps something other than 'map' so I can catch these.)
Closes #612 .


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2948 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-31 20:09:13 +00:00
crschmidt
474064b4e5 Clean up all events, not just some of them. Cleans up possible memory leaks.
Closes #604, patch by Erik. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2947 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-31 19:47:05 +00:00
crschmidt
53b23bdf37 make stopObserving/stopObservingElement more resilient: can accept either
elements or ids. Closes #603 (and makes #604 work).


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2946 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-31 19:46:04 +00:00
Tim Schaub
1dea6430cd #611: let all geometry inherit toString from the superclass - geometry.toString returns well-known text based on Format.WKT.write()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2945 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-31 19:13:11 +00:00
crschmidt
970c9655ac Destroy handler if we have one.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2944 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-31 18:33:21 +00:00
crschmidt
4aec64aa67 #571: Don't subclass Geometry.Point from LonLat, and all neccesary associated
changes. Reviewed by tschaub (thx)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2943 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-31 18:30:56 +00:00
Tim Schaub
45da80f8ad read/write for Well-Known Text representation of vector geometries - support for simple features: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, and GeometryCollection - examples/wkt.html for a demonstration
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2942 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-31 16:21:14 +00:00
Tim Schaub
7ab96241b0 adding folder for Format tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2941 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-31 15:58:32 +00:00
Schuyler Erle
27dd14a80c Don't call registerWheelEvents twice in MouseToolbar. Fixes #602. Rar.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2939 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 22:07:36 +00:00
Schuyler Erle
34352e7af7 MouseDefaults gets a destroy() overhaul.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2938 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 22:05:58 +00:00
Schuyler Erle
2961be423e Handler.MouseWheel gets destroy(). Fixes #600. Look out now.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2937 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 22:04:06 +00:00
Schuyler Erle
de9ae4a5bb Keyboard-related classes get destroy(). Fixes #598. Ba-ding.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2936 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 22:03:05 +00:00
Schuyler Erle
68bf0c0c4c Permalink gets a destroy method. Fixes #594.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2935 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 21:58:26 +00:00
Schuyler Erle
e1590b2a20 Destroy fix for Control.LayerSwitcher. Fixes #593.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2934 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 21:57:07 +00:00
Schuyler Erle
6c166a40e6 Destroy and doc fixes to PanZoomBar. Fixes #592. Passes all tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2933 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 21:54:42 +00:00
Schuyler Erle
882c71a424 Fix PanZoom destroy. Test passes. Fixes #591.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2932 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 21:52:47 +00:00
Schuyler Erle
313704b844 Tim's big refactoring of the Geometry modules. Fixes #590. All tests pass in FF (except the PanZoomBar stuff, which wasn't touched by this patch) and IE.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2931 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 21:42:32 +00:00
euzuro
91ec16c81a destroy() should always come *right*after* initialize()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2930 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-30 01:17:10 +00:00
euzuro
aa4cca057d patch for #585 - delete row from hash instead of nullifying it. thx tim for quick approval
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2929 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 21:17:12 +00:00
euzuro
ede2d39e54 add build script to create a non-minimized (uncompressed) version of OL. this is helpful for debugging
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2928 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 19:48:57 +00:00
crschmidt
04f911085d Last patch from #581 , use stopObservingElement, not stopObserving.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2927 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 18:02:43 +00:00
crschmidt
8d725697ba Erik and I discussed this, and the destroy() here actually does the wrong thing.
the innerHTML still prevents the memory leak, but unregistering in this way
doesn't do the right thing. remove it. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2926 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 17:21:27 +00:00
crschmidt
6c67b3a0e3 By setting the innerHTML of the icon, we tell browsers they can clean up the
memory associated with those images. This completes #581, and reduces the 
memory used by applications where adding and removing of many markers 
is used.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2925 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 16:25:52 +00:00
crschmidt
dcd550ff31 Give icons a less generic ID, for helpful debuggin in the future.
(Part of #581)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2924 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 16:24:09 +00:00
crschmidt
d86b57b7ec Typo in panzoombar. committed with sde approval.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2923 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 15:53:37 +00:00
crschmidt
6f49f8759a Fix PanZoom tests with #575 from Erik. Should add IE support back to this,
but it's not working for me at the moment, so I'm going to trust that the
rest of our testing process will find this at the moment, since the panzoom 
is obvious enough that people will see it if it breaks :)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2922 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 10:56:30 +00:00
euzuro
913e040fd6 guess i missed a few in r2920
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2921 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 07:09:48 +00:00
crschmidt
919af2ff90 Tabs patch from Erik, to change tabs to spaces so we don't have commit
conflicts later on.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2920 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 05:53:01 +00:00
crschmidt
4bb320867b "add a destroy() function that cycles through the kept references to the buttons and kills their circular refs" to the map object. Patch in #578 by euzuro
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2919 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 04:43:18 +00:00
crschmidt
861c105071 Due to circular references, the layer switcher could prevent layers from
being cleared in Internet Explorer. This patch fixes #577. Patch from Erik.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2918 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-29 02:38:19 +00:00
Schuyler Erle
bc6786e0ce Remove event listeners on image div in Tile.Image.destroy(). Fixes #576.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2917 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-28 22:46:50 +00:00
Schuyler Erle
619ae89ef4 Don't automatically display Icons when moveTo() is called with a non-null pixel location. Fixes #553. Thanks Ali Lucio for finding this bug.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2916 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-28 22:29:43 +00:00
Schuyler Erle
160722a16e Reset element.offsets in Map and Control.PanZoomBar every time movement is
initiated. Also, reset element.offsets every time map.updateSize() is called.



git-svn-id: http://svn.openlayers.org/trunk/openlayers@2915 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-28 22:26:03 +00:00
euzuro
f850939a3a fix for small bug in previous patch for #568 which was put in at r2913
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2914 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-28 21:53:27 +00:00
crschmidt
a07a4c309d Cleanup to Events.js. By Erik, in #568.
* code was only ever removing the first event listener from each element 
    on unload cache (for loop instead of while) 
  * code was frequently not removing observers because their associated 
    elements have already been removed 
These two are fixed by this patch. Combined with the previous commits to
setting events, this should fix the memory leaks demonstrated by the 'drip'
tool for IE.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2913 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-28 21:41:08 +00:00
crschmidt
ee5d8eb73f Use Event.observe instead of the 'on' events which aren't properly cleaned
up in IE. #574. Patch by euzuro.  


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2912 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-28 21:11:47 +00:00
crschmidt
afa416fd2d Set the ID of the image before registering events on it. The Event.observe
call uses the element ID to cache the listeners for later deletion, 
so this closes a leak.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2911 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-28 21:08:27 +00:00
crschmidt
debd2aa458 Change the PanZoom control (ticket #573) to register via Event.observe,
which correctly cleans up memory usage.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2910 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-28 20:59:00 +00:00
Tim Schaub
f570758676 modify the drag handler so that it only modifies IE's document.onselectstart while dragging - add jsodc text - all browser event handlers now return a boolean - activate and deactivate respect the return of the parent class and return the same
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2908 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-28 15:59:49 +00:00
euzuro
55440ab092 clearGrid() gets called only once, no reason to put it so far away from where it gets called. tired of scrolling
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2907 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-27 22:30:42 +00:00
crschmidt
64dd004b5c Regression test for r2905 : test that the image has a div, and that it's
later destroyed. (There was a problem before where 0,0 was destroyed but 
1,1 wasn't)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2906 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-27 22:21:12 +00:00
euzuro
77da7967ab apply patch for #566 - bug in grid.destroy()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2905 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-27 22:12:28 +00:00
Tim Schaub
afdaa6249f adding test for Format.js
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2904 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-27 21:41:16 +00:00
Tim Schaub
7218fe6ea8 take toString away from Geometry.LineString and Geometry.LinearRing, give it to Geometry.Collection, and make sure the IE hack doesn't clobber toString during inheritance - see #552 and #565
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2901 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-26 23:06:54 +00:00
Schuyler Erle
09bef10687 Oops, didn't mean to apply changes to BaseTypes in r2899. I gotta remember to svn status next time.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2900 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-26 20:56:48 +00:00
Schuyler Erle
a05363e91e Patch from fredj adds toString() method to Geometry.Linearring. Fixes #565. Thanks, Fred.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2899 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-26 20:55:32 +00:00
euzuro
87977f7bfe final patch for #510 -- new datastructure suggested and implemented by james for the events entry cache. speeds up all event operations
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2896 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-26 17:33:35 +00:00
Tim Schaub
d82108c2d7 refactoring SelectFeature.js a bit - adding onSelect and onUnselect properties that control users can set to respond to feature selections
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2895 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-26 03:33:17 +00:00
crschmidt
8e3856b4ac Commit small change to destroy events objects when destroying objects with
events. This removes a number of minor memory leaks with creating/destroying
popups, layers, features, and markers.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2894 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-26 00:50:31 +00:00
crschmidt
eb13974c5e Add MapServer layer fixes and tests. Paul wrote these tests (yay Paul!), and
found all the bugs. This fixes #545, #546, #547, #548 and #562.    


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2893 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-25 21:35:12 +00:00
crschmidt
75425b9cd4 Add Steve Woodbridge to authors for MapServer Untiled contribution.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2892 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-25 21:24:39 +00:00
crschmidt
f3c75e2d29 Add MapServer Untiled Layer to OpenLayers. Originally developed by Steve
Woodbridge, tests written by Paul Spencer and some reworking done. Thanks
to both Paul and Steve for this code. (Closes #526.) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2891 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-25 21:20:14 +00:00
euzuro
67963c3e86 good eye tim. patch for #560.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2882 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-25 14:49:31 +00:00
crschmidt
b6e783fb66 With Erik's approval on #341, I'm happy with this. This restores the
mousewheel functionality we had in earlier releases in a similar way, rewritten
for handlers. (The benefit of handlers in this case is that handlers are 
write-once, use many, so the next mousewheel thing we get will *also* be able 
to use this code.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2877 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-24 23:11:18 +00:00
crschmidt
b22958ff2e Committing patch from #559 to add CLASS_NAME for all classes. (I never cleaned
these up like I should have.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2876 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-24 23:07:30 +00:00
euzuro
cb9723d202 patch for #556 - give the map object its own unique ID
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2875 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-24 01:39:49 +00:00
euzuro
177215befc applying (yet another) patch for #549. this one eliminates the double-destruction of the map due to the unload of window
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2874 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-24 01:37:28 +00:00
euzuro
d10b4a37df applying (yet another) patch for #510
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2873 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-24 01:34:58 +00:00
Schuyler Erle
f218ad4508 Oops, didn't mean to check in changes to Navigation.js in r2867. Undo.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2868 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-23 14:23:58 +00:00
Schuyler Erle
f99d1ce7b0 Fix the event listener leak, which has been a serious problem when large numbers of markers etc. are created. Closes #510.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2867 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-23 14:22:38 +00:00
euzuro
803e8b9dbd fix for #457 - allow specification of whether or not to let events fallthrough the map
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2863 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 21:06:29 +00:00
euzuro
f66441779c fix extra commas in test. all ie tests should pass now
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2862 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 20:46:12 +00:00
Schuyler Erle
c5406bbfeb Workaround for a bug in IE where toString() can't be assigned to an object in Util.extend()?? Strange but true. Fixes #552, wherein Geometry.Point tests fail. Tests now pass in IE.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2861 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 20:39:16 +00:00
Schuyler Erle
27a423a5f8 Inadvertently checked in a change to BaseTypes in r2859. Undoing it.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2860 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 20:36:25 +00:00
Schuyler Erle
185d10f211 Fix the inheritance chain in Geometry.Point. Fixes #551.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2859 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 20:35:16 +00:00
euzuro
3ed14463f2 second patch to fix #549. this time, instead of just clearing out everything in the div, it removes only what it added.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2858 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 19:47:48 +00:00
Schuyler Erle
aa30fe25f4 Undo r2851 and reinstate r2842. I think I had a cached test in my browser. Double oops.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2856 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 19:25:28 +00:00
Tim Schaub
923a962b93 eleven new tests for default, custom, and no map theme
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2855 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 18:50:35 +00:00
euzuro
897dd167ff destroy map objects after using them. add extra test to make sure layer is removed from map on destroy
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2854 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 18:27:49 +00:00
Schuyler Erle
1cd802c5f4 Make Class mixin tests a little more robust.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2853 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 18:16:09 +00:00
euzuro
78c16b973e final fix for #410
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2852 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 17:47:40 +00:00
Schuyler Erle
1d3e144dd2 Undo r2842, so that the TMS tests work again. Oops, again.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2851 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 17:36:31 +00:00
Schuyler Erle
b5766e03ae Remove an unnecessary alert from theGeoRSS test, oops.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2850 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 17:28:51 +00:00
Schuyler Erle
5ac0cf24ee Attempt to fix test failures in IE. The tests still fail, but in a different and hopefully more fixable way.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2849 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 17:26:31 +00:00
Tim Schaub
c8ae30ce6a fixing width of viewport to hide an ugly bug
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2848 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 17:14:35 +00:00
Tim Schaub
13e41155e6 updating the openmnnd.html example to work with new feature handler behavior - see #550
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2847 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 17:03:37 +00:00
Schuyler Erle
e45094ea0c Permit custom styling by setting theme:null in map.options and including the theme CSS manually. Fixes #460.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2844 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-22 11:21:16 +00:00
Tim Schaub
0c8dcabce8 replacing the select handler with a feature handler - with support for up, down, over, out, and move callbacks associated with mouse events on a feature - the select-feature.html example shows the use of a control that activates the feature handler - see #544
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2843 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-21 23:30:20 +00:00
Schuyler Erle
5bb0a3087e Correct failure in TMS tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2842 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-21 22:05:29 +00:00
euzuro
7425a06550 fix for #549 - clearing out of map div on map.destroy(). this fixes many opera tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2836 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-21 19:03:09 +00:00
euzuro
4bd131c882 readability
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2832 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-21 16:09:38 +00:00
euzuro
30dfa541a0 correct test report
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2831 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-21 16:08:08 +00:00
euzuro
d49f45dfcc coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2830 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-21 16:00:43 +00:00
euzuro
149f933968 remove stray console.log statement. was breaking opera
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2829 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-21 15:56:45 +00:00
Schuyler Erle
ca831c59d4 Fix the location of blank.gif in OverviewMap.js. Closes #542.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2822 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-20 00:04:17 +00:00
Schuyler Erle
15b26252bc Make WMS server selection deterministic, by using a real number hashing algorithm on the parameter string to select the server URL. Also, patch TMS since it doesn't use getFullParameterString(). Passes all tests. Fixes #410.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2821 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-20 00:00:17 +00:00
Schuyler Erle
40a7cd881c Don't display a popup or register events on a Text layer that doesn't have both title and description. Fixes #471.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2820 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-19 20:52:17 +00:00
Schuyler Erle
e266f430ca Don't place the MouseToolbar twice. Fixes #537.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2819 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-19 19:46:42 +00:00
Schuyler Erle
ef53b9d6a3 Check for SVG 1.0 as well. Fixes #540.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2818 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-19 14:50:03 +00:00
Schuyler Erle
3f0b0286fc Marker objects now update their lonlat after moveTo. Fixes #519. Tests pass.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2817 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-19 14:46:15 +00:00
crschmidt
d6d391e7f5 Docs are now built via jsdoc, no more manual script.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2816 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-18 14:05:32 +00:00
crschmidt
070783c018 Remove txtfile documentation, point via readme to online generated docs.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2815 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-18 14:02:33 +00:00
crschmidt
3408b5715d Add howard to authors.txt from #539.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2812 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-17 20:07:03 +00:00
crschmidt
e6722b4ec7 Aplly patch from hobu for #539. This fixes a broken commitSuccess method.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2811 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-17 20:06:26 +00:00
crschmidt
9e21e3337a Update authors.txt with names from vector branch.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2806 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-16 14:19:05 +00:00
crschmidt
8ddfb3fba7 Leftover piece that didn't get committed in sandbox. (WFS Layer won't
save without this.)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2805 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-16 13:51:46 +00:00
crschmidt
61fb954005 Update URLs for examples to point to locations for main site instead of dev.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2804 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-16 13:46:58 +00:00
crschmidt
3ca974acec Merge vector-2.4 branch back to trunk.
svn merge sandbox/vector-2.4/@2307 sandbox/vector-2.4/@HEAD trunk/openlayers/


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2803 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-16 13:23:56 +00:00
crschmidt
8b9d974dc2 Remove broken example.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2794 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-15 11:07:04 +00:00
crschmidt
555a014fa5 r2726 breaks a test for incorrect behavior. This is what I get for writing my
tests against the current output -- you may not break backwards compaatibility,
but that doesn't mean your functionality works! Fix broken mousetoolbar test.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2783 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-15 04:26:35 +00:00
euzuro
dff92c7273 remove incorrect example. click.html does the same as this, and actually works in all browsers :-)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2778 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-14 22:44:53 +00:00
Schuyler Erle
a3acddd8bd Corrected typo in Control.moveTo. Thanks to Craig Barnes for finding this bug. Fixes #531.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2726 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-13 18:05:12 +00:00
Schuyler Erle
dbdf9a3df8 Switch to sequential ID numbering. Fixes #226.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2645 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-09 21:54:41 +00:00
crschmidt
27a220d1fa Missing // requires pragma from FixedZoomLevels.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2617 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-09 10:13:59 +00:00
Schuyler Erle
8274a49a86 Fix MapServer request string handling by overriding getFullRequestUrl(). Fixes #508.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2544 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-08 20:19:41 +00:00
Schuyler Erle
436d1b5d11 Update/enhance some module dependencies.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2543 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-08 20:14:34 +00:00
Schuyler Erle
846c98df4a build.py now automatically incorporates dependencies not listed in the build profile. fixes #490.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2542 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-08 20:14:05 +00:00
crschmidt
c66f1ce360 Create a function -- OpenLayers.Util.getElement -- which replaces "$". This
should be used in all library code. This patch replaces all uses of "$()" in
existing code. The primary reason for this is to avoid conflicts with libraries
(like Prototype) which might redefine this function differently.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2541 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-08 20:14:03 +00:00
Schuyler Erle
be1ef0ef47 Improve Control.KeyboardDefaults. Fixes #42.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2540 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-08 20:04:04 +00:00
Schuyler Erle
a779f0e69a Map.addLayer() will return false when adding duplicate layers. Fixes #248.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2539 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-08 19:58:20 +00:00
crschmidt
4e5bc0234a #520, patch by euzuro. This fixes a bug with resizing a WMS.Untiled layer,
because the new map size was not set until *after* the onMapResize event. 
(oops.) This way, untiled layers redraw with the correct size.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2532 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-08 19:18:06 +00:00
Schuyler Erle
baa78896e8 Applied patch for #514 to fix map.getCurrentSize() in Safari.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2306 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-05 12:39:18 +00:00
crschmidt
d36553f135 #475: removeMarker does not work in Boxes Layer . Patch from euzuro. This
was approved before 2.3 released, but never applied. Adds a removeMarker
function for the boxes layer, subclassing the marker default.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2302 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-03-05 07:02:40 +00:00
euzuro
9bbf96fd1d patch for #509 -- fixes script error when tile is destroyed before it is used. thx cr5
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2286 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-26 04:02:58 +00:00
crschmidt
90b4ff2da5 Add support for Atom 1.0 to Layer.GeoRSS. Patch from Sean Gillies provided
in #506: tests are included to test that the links are properly created
for Atom 1.0 content (with a data sample provided in the patch).
Thanks, Sean!


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2256 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-21 22:32:31 +00:00
Schuyler Erle
7d6b3fa0b9 Control.Scale now correctly reports scales under 1:500. Includes tests. Fixes #503.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2244 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-19 22:42:17 +00:00
crschmidt
e61204a31e Remove extra math in ka-Map getURL calculation. This is historical cruft. Since
this change does not affect the input or output of the function it is changing,
no test is neccesary. Patch from tschaub in #481.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2240 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-18 16:10:46 +00:00
crschmidt
499c8db92a the mergeNewParams function does not reinitialize the tiles for layers
other than WMS. It should do this for any Grid layer. Ticket #496 includes
a patch for this: it adds a mergeNewParams call at the Layer.Grid level,
(subclassing Layer.HTTPRequest) which reinits the tile grid. This commit
also includes tests for this functionality. Since testing directly
on the Grid layer doesn't work (it's meant to be subclassed), we need to 
instead pick a second layer to test -- in this case, ka-Map. Thanks to
Bill Woodall for the patch.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2237 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-17 15:00:05 +00:00
euzuro
795d6b4d20 fix for #500 - destroying a layer now has an option to not set a new baselayer. we use this in map.destroy()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2233 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-16 20:59:18 +00:00
crschmidt
1d06490b2c Change the encoding of parameters, as discussed in #491. The reason this
is important is that the WMS spec specifies that you should seperate layer
names with a ",", and we were encoding that, so compliant WMSes would attempt
to find a single layer with ","s in the name, instead of grabbing multiple
layers. The new way to specify multiple layers is to set:
  layers: ['global_modis','landsat'] 
or the like.
Includes tests, signoff from SDE.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2232 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-16 20:38:00 +00:00
euzuro
3309b0b12e fix for #480 -- addition of 'viewRequestID' variable to map to keep track of the changing view requests so that images dont load when they are no longer needed. muchas gracias to senior woodall for his help getting this patch together
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2231 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-16 20:24:56 +00:00
euzuro
8095e22600 patch for #499 - createImage used the wrong number of parameters
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2229 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-16 18:58:22 +00:00
euzuro
948406b5b5 patch for #486 -- more error prevention. thanks very much to bart for finding these :-)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2228 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-16 16:45:26 +00:00
Schuyler Erle
55d7f1e413 Undo r2018, since it causes problems with TileCache. Reopening #429 as the issue of odd size viewports is still unresolved.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2227 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-16 16:42:03 +00:00
euzuro
99eaf40e5c patch for #485 -- prevents script error on destruction of layer due to null tile. test pass in ff & ie7
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2226 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-16 16:34:14 +00:00
Schuyler Erle
58b6946b2d Applied bartvde's patch for #498.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2225 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-16 16:30:59 +00:00
Schuyler Erle
8b7d34cce6 Applied bartvde's patch to fix #484.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2224 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-16 16:27:36 +00:00
crschmidt
b645fd882c Simple failing test case for the problem hidden by the checkImgUrl() function
in Tile/Image.js. This is, for the moment, a manual test, though once we solve
the problem it will hopefully be possible to turn this into an automated
test.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2206 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-06 04:47:14 +00:00
euzuro
b5fb410684 patch for #452 - Adding events to Layer class to signal the start, end, and cancelling of a layer load. Thanks to Bart for the idea and followthrough with this patch.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-02-04 16:13:15 +00:00
crschmidt
6320735671 Fix requires statement for the OverviewMap, reported by bartvde, patch by
euzuro, approved for commit by tschaub (and me). #489


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2190 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-31 12:03:37 +00:00
crschmidt
f5b24c2ae4 Double clicking overview map expand/contract button zooms. #478. Patch
from tschaub. (Thx tschaub!)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2189 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-31 11:47:59 +00:00
Tim Schaub
a64b91de7c track old extent when changing base layers - see #463
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2167 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-20 17:03:40 +00:00
Tim Schaub
7518b9716c prevent overview map extent rectangle from getting dropped (FF only) - see #468
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2166 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-20 16:49:52 +00:00
Tim Schaub
f30d0e40c2 lets the overview map work with the argparser control - see #474
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2165 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-19 22:25:17 +00:00
Tim Schaub
c12a92f938 clone listeners array before calling callbacks - see #464
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2164 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-19 19:41:51 +00:00
crschmidt
9251b830c3 Approved commit for #473 by euzuro. Needs pullup to 2.3.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2163 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-19 16:32:43 +00:00
crschmidt
efe8f3c162 isEquivilantURL() support for browsers, as best we can figure it. Tested in
IE6, FF, Moz, Opera, IE7, Safari.

This may not work in all situations. It's included in util for utility, but
it is possible it may fail in some cases in some environments. If you find
this to be the case, please open a bug and we will work to resolve it.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2162 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-19 15:21:12 +00:00
euzuro
1d47f8ce16 idea was to pass options to equiv test
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2139 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-12 10:14:53 +00:00
euzuro
ebb575cec3 tests pass in ff, ie6, ie7, and more or less in opera. this is a fix for #470
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2138 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-11 22:04:59 +00:00
crschmidt
68c06017e7 Committing fix to #469, rolling back mistaken change to defaultIcon from r1554.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2137 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-11 19:31:33 +00:00
Tim Schaub
ed5e3e3789 change Util tests to use element.nodeName so they work in both IE6 and IE7 - #466 and more
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2136 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-11 00:10:07 +00:00
Tim Schaub
6284941ea0 allow controls to live outside the map viewport - with changes to the overview map to handle this (#465)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2135 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-10 21:56:07 +00:00
Tim Schaub
b79607e1db rolling back that previous bad commit
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2130 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-09 19:28:44 +00:00
Tim Schaub
1c049df1b8 cssss
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2129 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-09 19:10:43 +00:00
Tim Schaub
e4150b4991 reorder things so license isn't stripped in single file build - see #385
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2126 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-04 21:28:27 +00:00
euzuro
0dbf64d096 applying patch from #455 - fixes url equivalence testing for Opera browser
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2124 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-03 01:00:51 +00:00
euzuro
6df9e31441 fix opacity string/float issues in layer_wms tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2123 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-02 23:58:02 +00:00
euzuro
e25af34f36 fix popup test in opera -- color gets converted from string to hex
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2122 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-02 23:57:02 +00:00
euzuro
eb04014f8e fixing some failing opera tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2121 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-02 23:27:10 +00:00
euzuro
4c4144b6a5 fixed eventpane test -- had to special case for opera. seems like mozilla is the only one the mouse events *doesnt* work for
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2120 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-02 23:00:44 +00:00
euzuro
7097d53c1b updating marker test -- was failing in Opera
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2119 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-02 22:37:35 +00:00
euzuro
33f088675c updating icon test - was failing in Opera
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2118 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-02 22:33:38 +00:00
crschmidt
157bdf5283 Patch from tschaub to fix controls in IE.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2117 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-02 20:33:03 +00:00
euzuro
8ebc5b227a adding example for changing the marker icon
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2103 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-27 21:11:35 +00:00
crschmidt
4cac0a24ea Patch from euzuro for #448 . Make mouseWheel work on MouseToolbar.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2102 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-27 16:53:26 +00:00
crschmidt
6c9cb570c7 Remove accidental debugging statement.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2101 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-23 05:20:09 +00:00
crschmidt
f028effec2 tschaub pointed out that this test didn't actually test anything interesting.
Change that.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2100 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 20:21:58 +00:00
Schuyler Erle
5d00a21863 Updated release.sh to fix #416.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2099 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 20:19:19 +00:00
Schuyler Erle
ba85494e5e Merged in r1747 from source:/sandbox/tschaub/wc/tools/mergejs.py.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2098 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 20:04:48 +00:00
Schuyler Erle
7c0bc17be1 Refactored mergejs.py to make it possible to call from other Python scripts.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2097 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 19:52:56 +00:00
Schuyler Erle
86d4133039 Statement should end in a semicolon.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2096 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 19:49:19 +00:00
euzuro
6462a7dc29 sorry. last few bits of #441
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2095 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 19:33:57 +00:00
euzuro
112978ac3d patch for #441 - resolving Rico namespace conflict
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2094 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 19:31:32 +00:00
crschmidt
01cf10f53d Tests, example change, and Util addition, plus usage in Tile/Image to allow
use of relative URLs, urls with port 80 in them, etc. patch originally from
tschaub, revised by euzuro, reviewed by me. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2093 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 19:03:32 +00:00
crschmidt
88ac5a803c Followup to #449: Missed part of the commit, which protects against doing
a checkImgURL on a tile which has been destroyed.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2092 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 18:50:30 +00:00
crschmidt
7e9eef8d07 Commit a number of improvements to grid handling from #449. This adds
support for buffer:0 on grids, and includes changes to Remove extra 
rows and columns from the grid in _initTiles when reusing an existing 
grid, which is a fix to #357 and #436. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2091 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 18:35:04 +00:00
crschmidt
b46a513077 Fix EOL-style on all remaining files.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2090 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 17:43:14 +00:00
crschmidt
f17ec3ab7d Fix SVN eol-style properties on controls.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2089 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 17:40:54 +00:00
crschmidt
063a10d4ac This is the outside_viewport patch from tschaub for #446:
http://trac.openlayers.org/attachment/ticket/446/outside_viewport.patch

The large diff is because I am suffering under constraints of a bad working
environment. I hate newlines! This patch closes #446.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2088 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 17:35:34 +00:00
crschmidt
46767efed2 change map.addControlToMap to allow controls outside viewport, from
Ticket #445: externalControl.patch. Closes #445. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2087 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-22 17:19:23 +00:00
crschmidt
9c6817f5d6 Apply "patch to put event registering in correct place", euzuro, #448 .
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2075 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-16 15:47:37 +00:00
crschmidt
94dc03ea90 Patch for #438 from Tim Schaub: "forces untiled WMS layer to redraw on
mergeNewParams". Since the Untiled layer won't redraw if the map is not
outside the current bounds, we force it with a 'zoomChanged' flag, which 
indicates that the layer should redraw regardless.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2074 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-16 15:30:16 +00:00
crschmidt
2d7f2d2f47 Commit tschaub's patch for #447. This should let people who are having 'pink
tile' problems where right clicking returns the right tile not have problems
anymore. Note that this is seperate from TileCache related issues where 
OpenLayers doesn't request tiles on a grid. 

Note that I have no reason why this should work. In fact, I'd say it 
*shouldn't* work, but other people are seeing this problem, so I'm glad
to have the code in trunk, since it doesn't change teh default behavior.

Thanks to Tim for the patch.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2048 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-13 20:22:30 +00:00
euzuro
c014e5ea72 r2039 contained a small stylistic change that I thought was insignificant but upon further reflection is not. the '||' style is beautiful, but it breaks if a 0, '', or 'false' value is specified (as they all evaluate to false, and thus the default is taken). So if the user wants to specify a 0-width border, s/he cannot. This commit reverts to how it previously was, with the addition of {} as per OL coding standards. Also the addition of one small line break, also for coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2040 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-13 13:22:47 +00:00
euzuro
d5a7f1ef5c updating jsdoc comments for accuracy
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2039 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-13 13:15:29 +00:00
euzuro
ba89ea595e updating jsdoc for parameter type on one more ajax handler
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2030 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-11 00:20:26 +00:00
euzuro
cc3a4c113b updating jsdoc for parameter type on ajax handlers
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2029 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-11 00:19:29 +00:00
crschmidt
2467940cd3 A fix for #440. Prevent people who somehow get a null element in the event
cache from shooting themselves in the foot: This doesn't seem to happen often,
but it has happened in internal code. I'm going to add more debugging info to 
#440 as we get it, but want to get this in to prevent people from shooting 
themselves in the foot in IE accidentally.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2024 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-07 21:18:24 +00:00
crschmidt
bef4a7d3a9 This is a partial fix to the fact that putting WMS overlays over WMS does not
use the same grid boundaries as the underlying tiles, although not a complete
fix.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@2018 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-06 21:29:36 +00:00
crschmidt
046fbf0662 Patch for #430 by Tim Schaub. Reviewed, passes all tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2017 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-12-06 21:25:19 +00:00
crschmidt
632a2bd123 Typo in documentation, spotted by castaway. (Thx)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1973 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-26 19:55:15 +00:00
crschmidt
ff4899f520 The popup test had a test in here which tested the size of the content div...
however, for some reason, the test was testing the existing, broken behavior!
Fix the test so that we make sure we don't regress in the future. (Thanks uz.) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1949 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-21 15:47:02 +00:00
euzuro
15c2ab578f mousewheel zooms on mouse position. patch from #341. thanks frederic \!
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1945 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-21 09:32:13 +00:00
crschmidt
c951391368 Patch from penyaskito: setSize function got updated in AnchoredBubble,
but never updated in Popup.js. Fix for #422 .   


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1940 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-20 17:51:11 +00:00
euzuro
36eb8c0bc9 change name of example to be consistent with openlayers datatypes (ours is not called latlon, it is lonlat)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1937 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-20 12:07:28 +00:00
crschmidt
e6ef35c174 Fix for #415 , reported by penyaskito, approved by Schuyler. Due to an oversight
in my new setSize function didn't test setting size before popup was added to 
the map.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1935 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-20 01:11:21 +00:00
crschmidt
5e7b2e03f1 Commit TMS support from 'crschmidt/refractions' Ticket #394 , reviewed by
Schuyler.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1927 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-19 19:54:42 +00:00
crschmidt
71bcdb9b7c A nice overviewmap example. Shows how to use a different baselayer for the
OverviewMap, as well as how to set the min/max ratio to something different.
Thanks penyaskito! (Closes #413 ... with a vengence!)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1914 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-19 13:26:24 +00:00
crschmidt
e1d715fc94 Add example for determining lat/lon from pixel, on a mouse click.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1913 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-19 13:21:26 +00:00
crschmidt
4c9e46e240 Commit patches to documentation, from tickets #411 and #412 , from
penyaskito. (Thanks!) 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1912 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-18 22:55:34 +00:00
crschmidt
c14732b711 Missed another broken test. I should really build in broken-test reporting.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1911 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-18 16:09:39 +00:00
crschmidt
41f798eaf2 Update test plan. Mistake from r1909.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1910 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-18 15:42:08 +00:00
crschmidt
d77b849405 Parameters for URLs should be URI encoded. Add test for params that need
to be URI encoded in test_Util, and add Tim Schaub's patch from #381 to make
test pass.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1909 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-18 15:35:02 +00:00
crschmidt
b4ae7778b6 Update tests in preperation for #381 -- this closes #383. The primary purpose
of this patch is to change the purpose of the getFullRequestString tests to actually
test that function, rather than testing both that function and getParameterString.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1908 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-18 15:29:32 +00:00
crschmidt
76850371fe Fix for #380 from Tim Schaub, with test. Don't overwrite already-existing parameters
in the URL. This makes the precedence of parameters: 
 * params in URL
 * params in Layer
 * DEFAULT_PARAMS on the Layer.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1907 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-18 15:19:42 +00:00
crschmidt
fb7b5fff56 Improve getArgs to not use deprecated features, and add support to pass a
URL to the function to parse instead of the window.location. Patch by
Tim Schaub, Closes #378 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1906 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-18 15:01:17 +00:00
crschmidt
57dc3a7f53 Commit patch from Tim Schaub for #361 : replace tabs with spaces in
jsmin.py and mergejs.py, to make all our python stuff follow the same 
conventions. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1905 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-18 14:53:52 +00:00
euzuro
ac949589a0 applying patch for #399 - MultiServer - some small formatting/commenting changes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1872 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-16 09:03:17 +00:00
euzuro
1f18b68e7d ie and ff have some discrepancies in how they output formed html. in this case, ie was capitalizing everything and mixing the elements around. so we just compare straight on the dom. better this way anyways.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1783 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-08 19:01:48 +00:00
euzuro
17633136aa same as previous commit, need to give map div dimensions for proper tests in IE
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1782 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-08 18:44:17 +00:00
euzuro
6e8754af91 fix test which breaks in ie because there are no size values to grab
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1781 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-08 18:40:45 +00:00
crschmidt
876051d619 Fix for #392 , another tile.clear we missed.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1780 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-08 18:22:48 +00:00
euzuro
8bd55016aa applying patch from #387 - if map has changed size, destroy old tile, make a new one
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1779 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-08 16:42:56 +00:00
crschmidt
7ecc62e55a A fix for #366 , this prevents bailing out in the case where originPx
can't be determined from the baselayer yet. This is the case in Google,
because Google can't call getLatLonFromPx until after setCenter has been
called, which comes after this. There may be some cases where this isn't 
a perfect fix, but we're going to fix this for now, and punt on further
testing until 2.3.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1778 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-08 16:01:39 +00:00
crschmidt
819ccd7e06 Having a port number of ':80' in a WMS URL doesn't work right now, because
Firefox changes it, and then the URLs we're getting don't match the ones
we're expecting.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1774 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-08 11:48:59 +00:00
crschmidt
b5334bde43 Make the freemap example better documented and simpler. Before it had some
stuff that didn't actually work in there, so removing it is a Good Thing, and
makes the example more legible, and some additional comments which make
what the code is doing more understandable.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1773 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-11-08 11:45:57 +00:00
crschmidt
1325843cb3 Never actually committed layer.image docs.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1739 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-27 14:24:16 +00:00
Tim Schaub
9f9c366154 Apply patch for #376 - fixing tile.clear() calls that were mistakenly replaced with OpenLayers.Util.clearArray() at r1590
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1738 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-26 15:22:37 +00:00
Tim Schaub
3d58bc6698 Pull in euzuro's patch from #366 - changing how maxResolution is set and a number of other efficiency changes
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1737 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-25 23:05:23 +00:00
crschmidt
786c2a20fb Change files to point to repository-license. Part of build process will now
be to change the licensing terms in the final build.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1721 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-24 18:16:39 +00:00
crschmidt
af6307fd9b Jeff Dege offered better/more clear documentation for the MousePosition
control, and an updated default granularity to make it more useful by default.
Closes #372.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1719 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-24 14:45:20 +00:00
crschmidt
43c916a433 Patch from Tim Schaub to change from old class inheritance to new
inheritance. Closes #370.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1717 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-23 17:27:29 +00:00
crschmidt
69b66e2100 Patch layers which have had wiki page name changes. Patch from Erik, closes
#363. Request for pullup to 2.2 release. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1713 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-21 16:06:27 +00:00
crschmidt
f50fd0b7ac Bring in Tim Schaub's "Graphic" layer as "Layer.Image" (since in the future,
'graphic' may mean something different, like SVG graphic). Tests, docs, 
example, and library change. Thanks, Tim! 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1712 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-21 16:02:15 +00:00
jrf
7ced2241fe splitting release and repository licenses
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1711 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-20 19:41:24 +00:00
euzuro
02c285091e no longer need to exclude yahoo layer from singlefile build
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1710 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-20 18:49:41 +00:00
290 changed files with 18010 additions and 2854 deletions

27
build/build.py Executable file
View File

@@ -0,0 +1,27 @@
#!/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 "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."

View File

@@ -1,44 +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
if [ "$1" != "" ]; then
CFG_FILENAME="$1.cfg"
else
CFG_FILENAME=library.cfg
fi
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.

View File

@@ -0,0 +1,25 @@
#!/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."

View File

@@ -1,39 +0,0 @@
#!/bin/sh
rm ../doc/reference.html
CLASSES="Map Layer Layer.HTTPRequest Layer.Grid Layer.WMS Layer.KaMap Layer.EventPane Layer.Google Layer.VirtualEarth Layer.Markers Layer.Text Layer.GeoRSS Layer.Boxes 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 "<html>
<head>
<title>OpenLayers Class Reference Documentation</title>
<style type='text/css'>
.type { background-color: #ddd }
td { border: black solid 1px; padding: 3px; }
table { border-collapse: collapse; margin: 5px 10px; }
.classref { margin-left: 20px; }
div.index { float:left; width: 300px; }
</style>
</head>
<body>" >> ../doc/reference.html
for i in $CLASSES; do
echo "<div class='index'><a href='#OpenLayers.$i'>OpenLayers.$i</a></div>" >> ../doc/reference.html
done
echo "<br style='clear:both' />" >> ../doc/reference.html
for i in $CLASSES; do
cat ../doc/$i.txt | \
perl -pe 's!^(.*?) -- (.*?) -- (.*?)$! <tr><td>$1</td><td>$2</td><td>$3</td></tr>!g;
s!^( \* )?(.*?) -- (.*?)$! <tr><td>$2</td><td>$3</td></tr>!g;
s!^ \* (.*)$! </table>\n\n<h3>$1</h3>\n <table>!;
s!{OpenLayers.(.*?)\|(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">\2</a>!g;
s!{OpenLayers.(.*?)}!<a href="#OpenLayers.$1" title="OpenLayers.$1">OpenLayers.$1</a>!;
s!{([A-Za-z]+?)\|(.+?)}!<span class="type" title="$1">\2<\/span>!g;
s!{([A-Za-z]+?)}!<span class="type" title="$1">$1<\/span>!g;
s!^\* (.*)$!</table>\n<h2>$1</h2>\n<table>!;
s!^OpenLayers\.(.*)$!<h1><a name="OpenLayers.$1">OpenLayers.$1</a></h1><div class="classref">!' \
>> ../doc/reference.html
echo '</table></div>' >> ../doc/reference.html
done
echo " </body>
</html>" >> ../doc/reference.html

12
build/full.cfg Normal file
View File

@@ -0,0 +1,12 @@
[first]
OpenLayers/SingleFile.js
OpenLayers.js
OpenLayers/BaseTypes.js
OpenLayers/Util.js
Rico/Corner.js
[last]
[include]
[exclude]

View File

@@ -10,5 +10,38 @@ Rico/Corner.js
[include] [include]
[exclude] [exclude]
OpenLayers/Layer/Yahoo.js OpenLayers/Format/GeoRSS.js
OpenLayers/Control/KeyboardDefaults.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

View File

@@ -2,8 +2,8 @@
OpenLayers.js -- OpenLayers Map Viewer Library OpenLayers.js -- OpenLayers Map Viewer Library
Copyright 2005-2006 MetaCarta, Inc., released under the BSD License. Copyright 2005-2006 MetaCarta, Inc., released under the BSD license.
Please see http://svn.openlayers.org/trunk/openlayers/license.txt Please see http://svn.openlayers.org/trunk/openlayers/release-license.txt
for the full text of the license. for the full text of the license.
Includes compressed code under the following licenses: Includes compressed code under the following licenses:

View File

@@ -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.

View File

@@ -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".

View File

@@ -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.

View File

@@ -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.

View File

@@ -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: '<br />')
suffix -- html to follow the latitude value (default: '')
numdigits -- number of digits to the right of the decimal (default: 5)
granularity -- a change of how many pixels is considered a mouse move (default: 1)
prefix, separator, and suffix are used to format the lon/lat values.
With:
prefix = 'Lon:&nbsp;'
suffix = '<br />Lat:&nbsp;'
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.)

View File

@@ -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.

View File

@@ -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.

View File

@@ -1,6 +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 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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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_MAP, G_SATELLITE_MAP, G_HYBRID_MAP, used to choose the type of map to display.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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'.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 '/'.

View File

@@ -1,17 +1,25 @@
OpenLayers core development team OpenLayers contributors:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Howard Butler
Erik Uzureau Bertil Chaupis
Christopher R. Schmidt John Cole
Philip Lindsay Jeff Dege
John Frank
Schuyler Erle Schuyler Erle
Christian López Espínola
Patch contributors John Frank
------------------ Sean Gilles
Pierre Giraud
Andreas Hocevar
Philip Lindsay
Corey Puffault Corey Puffault
Tim Schaub Tim Schaub
Jeff Dege Christopher Schmidt
Sean Gilles Cameron Shorter
Paul Spencer
James Stembridge
Erik Uzureau
Bill Woodall
Steve Woodbridge
OpenLayers is graciously supported by MetaCarta, Inc. OpenLayers is graciously supported by MetaCarta, Inc.
<http://www.metacarta.com>. <http://www.metacarta.com>.

3
doc/readme.txt Normal file
View File

@@ -0,0 +1,3 @@
Automatically generated OpenLayers API documentation is online:
http://dev.openlayers.org/docs/overview-tree.html

33
examples/GMLParser.html Normal file
View File

@@ -0,0 +1,33 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function parseData(req) {
g = new OpenLayers.Format.GML();
html = ""
features = g.read(req.responseText);
for(var feat in features) {
html += "Feature: Geometry: "+ features[feat].geometry+",";
html += "<ul>";
for (var j in features[feat].attributes) {
html += "<li>"+j+":"+features[feat].attributes[j]+"</li>";
}
html += "</ul>"
}
document.body.innerHTML = html;
}
function load() {
OpenLayers.loadURL("gml/owls.xml", "", null, parseData);
}
</script>
</head>
<body onload="load()">
</body>
</html>

33
examples/KMLParser.html Normal file
View File

@@ -0,0 +1,33 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
function parseData(req) {
g = new OpenLayers.Format.KML();
html = ""
features = g.read(req.responseText);
for(var feat in features) {
html += "Feature: Geometry: "+ features[feat].geometry+",";
html += "<ul>";
for (var j in features[feat].attributes) {
html += "<li>"+j+":"+features[feat].attributes[j]+"</li>";
}
html += "</ul>"
}
document.body.innerHTML = html;
}
function load() {
OpenLayers.loadURL("kml/mc-search.kml", "", null, parseData);
}
</script>
</head>
<body onload="load()">
</body>
</html>

View File

@@ -29,7 +29,7 @@
40.428314208984375); 40.428314208984375);
function init(){ function init(){
map = new OpenLayers.Map( $('map') ); map = new OpenLayers.Map( 'map' );
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://labs.metacarta.com/wms/vmap0",

View File

@@ -32,18 +32,18 @@
if (click) { if (click) {
canvas.drawLine(click, this.getLonLatFromPixel(e.xy)); canvas.drawLine(click, this.getLonLatFromPixel(e.xy));
click = null; click = null;
$('status').innerHTML = ""; OpenLayers.Util.getElement('status').innerHTML = "";
} }
else { else {
click = this.getLonLatFromPixel(e.xy); click = this.getLonLatFromPixel(e.xy);
$('status').innerHTML = "Point 1 stored: "+click+". <a href='#' onclick='click=null;return false'>Reset</a>"; OpenLayers.Util.getElement('status').innerHTML = "Point 1 stored: "+click+". <a href='#' onclick='click=null;return false'>Reset</a>";
} }
}); });
} }
function drawIt() { function drawIt() {
canvas.drawLine( canvas.drawLine(
new OpenLayers.LonLat(parseFloat($('lon1').value), parseFloat($('lat1').value)), new OpenLayers.LonLat(parseFloat(OpenLayers.Util.getElement('lon1').value), parseFloat(OpenLayers.Util.getElement('lat1').value)),
new OpenLayers.LonLat(parseFloat($('lon2').value), parseFloat($('lat2').value)) new OpenLayers.LonLat(parseFloat(OpenLayers.Util.getElement('lon2').value), parseFloat(OpenLayers.Util.getElement('lat2').value))
); );
} }
// --> // -->

View File

@@ -17,9 +17,11 @@
map.addControl(new OpenLayers.Control.MouseToolbar()); map.addControl(new OpenLayers.Control.MouseToolbar());
map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false})); map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
map.addControl(new OpenLayers.Control.Permalink()); map.addControl(new OpenLayers.Control.Permalink());
map.addControl(new OpenLayers.Control.Permalink($('permalink'))); map.addControl(new OpenLayers.Control.Permalink('permalink'));
map.addControl(new OpenLayers.Control.MousePosition()); map.addControl(new OpenLayers.Control.MousePosition());
map.addControl(new OpenLayers.Control.OverviewMap()); map.addControl(new OpenLayers.Control.OverviewMap());
map.addControl(new OpenLayers.Control.KeyboardDefaults());
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", "http://labs.metacarta.com/wms/vmap0",
{layers: 'basic'} ); {layers: 'basic'} );

View File

@@ -0,0 +1,49 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( $('map') );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
var control = new OpenLayers.Control();
OpenLayers.Util.extend(control, {
draw: function () {
// this Handler.Box will intercept the shift-mousedown
// before Control.MouseDefault gets to see it
this.box = new OpenLayers.Handler.Box( control,
{"done": this.notice},
{keyMask: OpenLayers.Handler.MOD_SHIFT});
this.box.activate();
},
notice: function (bounds) {
alert(bounds);
}
});
map.addLayer(layer);
map.addControl(control);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

View File

@@ -0,0 +1,53 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
<style type="text/css">
#map {
width: 500px;
height: 350px;
border: 1px solid gray;
}
p {
width: 500px;
}
div.olControlMousePosition {
font-family: Verdana;
font-size: 0.5em;
color: red;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
var options = {theme: null};
map = new OpenLayers.Map('map', options);
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addControl(new OpenLayers.Control.MousePosition());
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
<p>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.</p>
<p>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.</p>
</body>
</html>

View File

@@ -0,0 +1,96 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 512px;
height: 350px;
border: 1px solid gray;
}
#controlToggle li {
list-style: none;
}
p {
width: 512px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, drawControls;
OpenLayers.Util.onImageLoadErrorColor = "transparent";
function init(){
map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
var pointLayer = new OpenLayers.Layer.Vector("Point Layer");
var lineLayer = new OpenLayers.Layer.Vector("Line Layer");
var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer");
map.addLayers([wmsLayer, pointLayer, lineLayer, polygonLayer]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MousePosition());
var options = {handlerOptions: {freehand: true}};
drawControls = {
point: new OpenLayers.Control.DrawFeature(pointLayer,
OpenLayers.Handler.Point),
line: new OpenLayers.Control.DrawFeature(lineLayer,
OpenLayers.Handler.Path, options),
polygon: new OpenLayers.Control.DrawFeature(polygonLayer,
OpenLayers.Handler.Polygon, options)
};
for(var key in drawControls) {
map.addControl(drawControls[key]);
}
map.setCenter(new OpenLayers.LonLat(0, 0), 3);
document.getElementById('noneToggle').checked = true;
}
function toggleControl(element) {
for(key in drawControls) {
var control = drawControls[key];
if(element.value == key && element.checked) {
control.activate();
} else {
control.deactivate();
}
}
}
// -->
</script>
</head>
<body onload="init()">
<h1>OpenLayers Draw Feature Example</h1>
<div id="map"></div>
<ul id="controlToggle">
<li>
<input type="radio" name="type" value="none" id="noneToggle"
onclick="toggleControl(this);" checked="checked" />
<label for="noneToggle">navigate</label>
</li>
<li>
<input type="radio" name="type" value="point" id="pointToggle" onclick="toggleControl(this);" />
<label for="pointToggle">draw point</label>
</li>
<li>
<input type="radio" name="type" value="line" id="lineToggle" onclick="toggleControl(this);" />
<label for="lineToggle">draw line</label>
</li>
<li>
<input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);" />
<label for="polygonToggle">draw polygon</label>
</li>
</ul>
<p>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.</p>
<p>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.</p>
</body>
</html>

View File

@@ -0,0 +1,40 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script src="../lib/Firebug/debug.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( 'map', { controls: [] } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
vlayer = new OpenLayers.Layer.Vector( "Editable" );
map.addLayer(vlayer);
map.addControl(new OpenLayers.Control.PanZoomBar());
map.addControl(new OpenLayers.Control.EditingToolbar(vlayer));
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<div id="panel"></div>
<div id="map"></div>
</body>
</html>

View File

@@ -2,106 +2,48 @@
<head> <head>
<style type="text/css"> <style type="text/css">
body { font-family: sans-serif; font-weight: bold; font-size: .8em; }
body { body {
border: 0px; border: 0px;
margin: 0px; margin: 0px;
padding: 0px; padding: 0px;
} }
#map { #map {
width: 65%; width: 100%;
height: 100%; height: 100%;
border: 0px; border: 0px;
padding: 0px; padding: 0px;
} }
</style> </style>
<script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers.js"></script>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
var lat = 900863; var lat = 900863;
var lon = 235829; var lon = 235829;
var zoom = 6; var zoom = 6;
var map, layer; var map, layer;
function init(){ function init(){
// these should be object methods or something map = new OpenLayers.Map( 'map' );
map = new OpenLayers.Map( $('map') );
var basemap = new OpenLayers.Layer.WMS( "Boston", var basemap = new OpenLayers.Layer.WMS( "Boston",
"http://boston.freemap.in/cgi-bin/mapserv?", "http://boston.freemap.in/cgi-bin/mapserv?",
{map: '/www/freemap.in/boston/map/gmaps.map', layers: 'border,water,roads', format: 'png', 'transparent': 'off'}, {map: '/www/freemap.in/boston/map/gmaps.map', layers: 'border,water,roads,rapid_transit,buildings', format: 'png', 'transparent': 'off'},
// These are the important parts for creating a non-epsg:4326
// map: Maxextent is the boundary of the map/tile loading area,
// maxResolution is the units/pixel at the highest zoom, and
// projection is the projection to be used in WMS/WFS Requests.
{maxExtent: new OpenLayers.Bounds(33861, 717605, 330846, 1019656), maxResolution: 296985/1024, projection:"EPSG:2805" } ); {maxExtent: new OpenLayers.Bounds(33861, 717605, 330846, 1019656), maxResolution: 296985/1024, projection:"EPSG:2805" } );
var rapid = new OpenLayers.Layer.WMS( "Rapid Transit",
"http://boston.freemap.in/cgi-bin/mapserv?",
{map: '/www/freemap.in/boston/map/mass.map', layers: 'rapid_transit', format: 'png', transparent:'true'} );
var buildings = new OpenLayers.Layer.WMS( "Buildings",
"http://boston.freemap.in/cgi-bin/mapserv?",
{map: '/www/freemap.in/boston/map/mass.map', layers: 'buildings', format: 'png', transparent:'true'} );
map.addLayer(basemap); map.addLayer(basemap);
map.addLayer(rapid);
map.addLayer(buildings);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.LayerSwitcher());
} }
function getaddress() {
if (!document.getElementById('address').value) {return; }
document.getElementById('status').innerHTML = "Finding address...";
var address = document.getElementById('address').value;
address = escape(address);
addr = "/geocode.cgi?address="+address;
var handler = XMLrequest();
if (handler) {
handler.onreadystatechange=function() {
if (handler.readyState == 4 && handler.status == 200) {
var latlon = handler.responseText;
latlon = latlon.split(",");
if (latlon[1]) {
map.setCenter(new OpenLayers.LonLat(parseFloat(latlon[1]), parseFloat(latlon[0])), 15);
document.getElementById('status').innerHTML = "";
} else {
document.getElementById('status').innerHTML = "Could not find address, sorry.";
}
}
}
handler.open("GET", addr, true);
handler.send('');
}
}
function XMLrequest() {
xmlhttp={};
try {
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) { }
}
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {}
return xmlhttp;
}
function setLink() {
var link = document.getElementById("link");
var center = map.getCenter();
var zoom = map.getZoom();
link.innerHTML="http://boston.freemap.in/?zoom="+zoom+"&amp;lat="+center.lat+"&amp;lon="+center.lon;
}
// --> // -->
</script> </script>
</head> </head>
<body onload="init()"> <body onload="init()">
<div id="right" style="float:right;width:30%;padding:10px;" ><h1>Boston Free Map</h1><!--Search: <input type="text" id='address' name="address"><input type="submit" value="Go!" onclick="javascript:getaddress()"/>--><div id="status" style="height:20px;min-height:20px;">&nbsp;</div>
<div>Map powered by <a href="http://www.openlayers.org/">OpenLayers</a>
and <a href="http://mapserver.gis.umn.edu/">MapServer</a>.
Data downloaded from
<a href="http://www.mass.gov/mgis/">Office of Geographic and Environmental Information (MassGIS)</a>.</div>
<!--<a onclick="setLink(); return false" href="#" id="update">Update Link</a>
<div id="link"></div>-->
</div>
<div id="map"></div> <div id="map"></div>
</body> </body>
</html> </html>

View File

@@ -14,7 +14,7 @@
var map = new OpenLayers.Map('map'); var map = new OpenLayers.Map('map');
var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'}); "http://labs.metacarta.com:80/wms/vmap0?", {layers: 'basic'});
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic", var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi", "http://wms.jpl.nasa.gov/wms.cgi",

View File

@@ -0,0 +1,50 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 45%;
height: 350px;
border: 1px solid gray;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, drawControl, g;
function serialize(feature) {
feature.attributes = {};
var name = prompt("Title for feature?");
feature.attributes['title'] = name;
s = new XMLSerializer();
var data = g.write(feature.layer.features);
$("gml").value = s.serializeToString(data);
}
function init(){
g = new OpenLayers.Format.GeoRSS();
map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
var pointLayer = new OpenLayers.Layer.Vector("Point Layer");
pointLayer.onFeatureInsert = serialize;
map.addLayers([wmsLayer, pointLayer]);
map.addControl(new OpenLayers.Control.EditingToolbar(pointLayer));
map.addControl(new OpenLayers.Control.MousePosition());
map.setCenter(new OpenLayers.LonLat(0, 0), 3);
}
// -->
</script>
</head>
<body onload="init()">
<h1>OpenLayers Draw Point Example</h1>
<div style="float:right;width:50%">
<textarea id="gml" style="width:100%" rows="30"></textarea>
</div>
<div id="map"></div>
</body>
</html>

View File

@@ -22,11 +22,12 @@
map.addControl(new OpenLayers.Control.LayerSwitcher()); map.addControl(new OpenLayers.Control.LayerSwitcher());
} }
function addUrl() { function addUrl() {
var value = $('url').value; var urlObj = OpenLayers.Util.getElement('url');
var value = urlObj.value;
var parts = value.split("/"); var parts = value.split("/");
var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value); var newl = new OpenLayers.Layer.GeoRSS( parts[parts.length-1], value);
map.addLayer(newl); map.addLayer(newl);
$("url").value = ""; urlObj.value = "";
} }
// --> // -->
</script> </script>

View File

@@ -22,10 +22,10 @@ ul, li { padding-left: 0px; margin-left: 0px; }
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://world.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/world/map/factbook.map", {'layers': 'factbook'} ); "http://world.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/world/map/factbook.map", {'layers': 'factbook'} );
map.addLayer(wms); map.addLayer(wms);
map.addControl(new OpenLayers.Control.Permalink($('permalink'))); map.addControl(new OpenLayers.Control.Permalink('permalink'));
map.zoomToMaxExtent(); map.zoomToMaxExtent();
map.events.register('click', map, function (e) { map.events.register('click', map, function (e) {
$('nodeList').innerHTML = "Loading... please wait..."; OpenLayers.Util.getElement('nodeList').innerHTML = "Loading... please wait...";
var url = wms.getFullRequestString({ var url = wms.getFullRequestString({
REQUEST: "GetFeatureInfo", REQUEST: "GetFeatureInfo",
EXCEPTIONS: "application/vnd.ogc.se_xml", EXCEPTIONS: "application/vnd.ogc.se_xml",
@@ -40,7 +40,7 @@ ul, li { padding-left: 0px; margin-left: 0px; }
Event.stop(e); Event.stop(e);
}); });
function setHTML(response) { function setHTML(response) {
$('nodeList').innerHTML = response.responseText; OpenLayers.Util.getElement('nodeList').innerHTML = response.responseText;
} }
</script> </script>
</body> </body>

View File

@@ -10,22 +10,19 @@
<script src="../lib/OpenLayers.js"></script> <script src="../lib/OpenLayers.js"></script>
<script type="text/javascript"> <script type="text/javascript">
<!-- <!--
var lon = 5;
var lat = 40;
var zoom = 5; var zoom = 5;
var map, layer; var map, layer;
function init(){ function init(){
map = new OpenLayers.Map( $('map') ); map = new OpenLayers.Map( $('map') );
layer = new OpenLayers.Layer.WMS( "OpenStreetMap WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://tile.openstreetmap.org/ruby/wmsmod.rbx?" ); "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
layer.setTileSize(new OpenLayers.Size(256,128));
map.addLayer(layer); map.addLayer(layer);
map.zoomToExtent(new OpenLayers.Bounds(-3.922119,44.335327,4.866943,49.553833));
map.setCenter(new OpenLayers.LonLat(-0.02197265625,51.492919921875), 13); map.addLayer(new OpenLayers.Layer.GML("GML", "gml/polygon.xml"));
map.addControl( new OpenLayers.Control.LayerSwitcher() );
} }
// --> // -->
</script> </script>
</head> </head>

View File

@@ -0,0 +1,86 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 512px;
height: 350px;
border: 1px solid gray;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, drawControl, g;
function serialize(feature) {
feature.attributes = {};
var name = prompt("Name for feature?");
feature.attributes['name'] = name;
s = new XMLSerializer();
var data = g.write(feature.layer.features);
$("gml").value = s.serializeToString(data);
}
function init(){
g = new OpenLayers.Format.GML();
map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
var pointLayer = new OpenLayers.Layer.Vector("Point Layer");
pointLayer.onFeatureInsert = serialize;
map.addLayers([wmsLayer, pointLayer]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MousePosition());
drawControls = {
point: new OpenLayers.Control.DrawFeature(pointLayer,
OpenLayers.Handler.Point),
line: new OpenLayers.Control.DrawFeature(pointLayer,
OpenLayers.Handler.Path)
};
for(var key in drawControls) {
map.addControl(drawControls[key]);
}
map.setCenter(new OpenLayers.LonLat(0, 0), 3);
}
function toggleControl(element) {
for(key in drawControls) {
var control = drawControls[key];
if(element.value == key && element.checked) {
control.activate();
} else {
control.deactivate();
}
}
}
// -->
</script>
</head>
<body onload="init()">
<h1>OpenLayers Draw Point Example</h1>
<div style="float:right">
<ul id="controlToggle">
<li>
<input type="radio" name="type" value="none" id="noneToggle"
onclick="toggleControl(this);" checked="checked" />
<label for="noneToggle">navigate</label>
</li>
<li>
<input type="radio" name="type" value="point" id="pointToggle" onclick="toggleControl(this);" />
<label for="pointToggle">draw point</label>
</li>
<li>
<input type="radio" name="type" value="line" id="lineToggle" onclick="toggleControl(this);" />
<label for="lineToggle">draw line</label>
</li>
</ul>
<p>Check the box to draw points. Uncheck to navigate normally.</p>
<textarea id="gml" cols="80" rows="30"></textarea>
</div>
<div id="map"></div>
</body>
</html>

42
examples/gml/line.xml Normal file
View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=line&amp;OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-3.924027,46.037889 2.193186,47.897181</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:line fid="1">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-0.631235,46.037889 2.193186,46.704963</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:LineString srsName="EPSG:4326">
<gml:coordinates>-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 </gml:coordinates>
</gml:LineString>
</ms:msGeometry>
<ms:ogc_fid>1</ms:ogc_fid>
<ms:name/>
<ms:id>0</ms:id>
</ms:line>
</gml:featureMember>
<gml:featureMember>
<ms:line fid="2">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-3.924027,46.279171 -1.127992,47.897181</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:LineString srsName="EPSG:4326">
<gml:coordinates>-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 </gml:coordinates>
</gml:LineString>
</ms:msGeometry>
<ms:ogc_fid>2</ms:ogc_fid>
<ms:name/>
<ms:id>0</ms:id>
</ms:line>
</gml:featureMember>
</wfs:FeatureCollection>

View File

@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=multipoint&amp;OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>0.490018,45.001795 3.016384,45.839186</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:multipoint fid="1">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>0.930003,45.001795 3.016384,45.541131</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:MultiPoint srsName="EPSG:4326">
<gml:pointMember>
<gml:Point>
<gml:coordinates>2.079641,45.001795</gml:coordinates>
</gml:Point>
</gml:pointMember>
<gml:pointMember>
<gml:Point>
<gml:coordinates>2.718330,45.541131</gml:coordinates>
</gml:Point>
</gml:pointMember>
<gml:pointMember>
<gml:Point>
<gml:coordinates>3.016384,45.143725</gml:coordinates>
</gml:Point>
</gml:pointMember>
<gml:pointMember>
<gml:Point>
<gml:coordinates>0.930003,45.001795</gml:coordinates>
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
</ms:msGeometry>
<ms:ogc_fid>1</ms:ogc_fid>
<ms:name>4 points</ms:name>
<ms:id>1</ms:id>
</ms:multipoint>
</gml:featureMember>
<gml:featureMember>
<ms:multipoint fid="2">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>0.490018,45.654676 1.157092,45.839186</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:MultiPoint srsName="EPSG:4326">
<gml:pointMember>
<gml:Point>
<gml:coordinates>0.490018,45.654676</gml:coordinates>
</gml:Point>
</gml:pointMember>
<gml:pointMember>
<gml:Point>
<gml:coordinates>1.157092,45.839186</gml:coordinates>
</gml:Point>
</gml:pointMember>
</gml:MultiPoint>
</ms:msGeometry>
<ms:ogc_fid>2</ms:ogc_fid>
<ms:name>2 points</ms:name>
<ms:id>2</ms:id>
</ms:multipoint>
</gml:featureMember>
</wfs:FeatureCollection>

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=multipolygon&amp;OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-1.738295,46.307557 3.754424,47.244300</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:multipolygon fid="1">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-1.738295,46.605612 1.767394,47.244300</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:MultiPolygon srsName="EPSG:4326">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>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 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>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 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>-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 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</ms:msGeometry>
<ms:ogc_fid>1</ms:ogc_fid>
<ms:name>My first Multipolygon</ms:name>
<ms:id>0</ms:id>
</ms:multipolygon>
</gml:featureMember>
<gml:featureMember>
<ms:multipolygon fid="2">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>2.789295,46.392716 3.754424,46.903666</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Polygon srsName="EPSG:4326">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>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 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</ms:msGeometry>
<ms:ogc_fid>2</ms:ogc_fid>
<ms:name>My second Multipolygon</ms:name>
<ms:id>0</ms:id>
</ms:multipolygon>
</gml:featureMember>
<gml:featureMember>
<ms:multipolygon fid="3">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>2.207379,46.307557 2.803488,47.045597</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:MultiPolygon srsName="EPSG:4326">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>2.292538,46.804315 2.207379,47.017211 2.391889,47.045597 2.562206,46.832701 2.292538,46.804315 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>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 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</ms:msGeometry>
<ms:ogc_fid>3</ms:ogc_fid>
<ms:name>My third Multipolygon</ms:name>
<ms:id>0</ms:id>
</ms:multipolygon>
</gml:featureMember>
</wfs:FeatureCollection>

156
examples/gml/owls.xml Normal file
View File

@@ -0,0 +1,156 @@
<?xml version='1.0' encoding="ISO-8859-1" ?>
<wfs:FeatureCollection
xmlns:bsc="http://www.bsc-eoc.org/bsc"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengeospatial.net//wfs/1.0.0/WFS-basic.xsd
http://www.bsc-eoc.org/bsc http://www.bsc-eoc.org/cgi-bin/bsc_ows.asp?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=OWLS&amp;OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-89.817223,45.005555 -74.755001,51.701388</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember><bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-79.771668,45.891110 -79.771668,45.891110</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-79.771668,45.891110</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
<gml:featureMember>
<bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-83.755834,46.365277 -83.755834,46.365277</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:owlname>owl</bsc:owlname>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-83.755834,46.365277</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
<gml:featureMember>
<bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-83.808612,46.175277 -83.808612,46.175277</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-83.808612,46.175277</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
<gml:featureMember>
<bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-84.111112,46.309166 -84.111112,46.309166</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-84.111112,46.309166</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
<gml:featureMember>
<bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-83.678612,46.821110 -83.678612,46.821110</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-83.678612,46.821110</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
<gml:featureMember>
<bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-83.664445,46.518888 -83.664445,46.518888</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-83.664445,46.518888</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
<gml:featureMember>
<bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-80.613334,46.730277 -80.613334,46.730277</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-80.613334,46.730277</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
<gml:featureMember>
<bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-79.676946,45.428054 -79.676946,45.428054</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-79.676946,45.428054</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
<gml:featureMember>
<bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-83.853056,46.236944 -83.853056,46.236944</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-83.853056,46.236944</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
<gml:featureMember>
<bsc:OWLS>
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-82.289167,45.896388 -82.289167,45.896388</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<bsc:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-82.289167,45.896388</gml:coordinates>
</gml:Point>
</bsc:msGeometry>
</bsc:OWLS>
</gml:featureMember>
</wfs:FeatureCollection>

42
examples/gml/point.xml Normal file
View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=point&amp;OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-0.608315,44.857522 -0.021418,45.477577</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:point fid="1">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-0.608315,44.857522 -0.608315,44.857522</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-0.608315,44.857522</gml:coordinates>
</gml:Point>
</ms:msGeometry>
<ms:ogc_fid>1</ms:ogc_fid>
<ms:name>Bordeaux</ms:name>
<ms:id>124</ms:id>
</ms:point>
</gml:featureMember>
<gml:featureMember>
<ms:point fid="2">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-0.021418,45.477577 -0.021418,45.477577</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Point srsName="EPSG:4326">
<gml:coordinates>-0.021418,45.477577</gml:coordinates>
</gml:Point>
</ms:msGeometry>
<ms:ogc_fid>2</ms:ogc_fid>
<ms:name>Barbezieux</ms:name>
<ms:id>0</ms:id>
</ms:point>
</gml:featureMember>
</wfs:FeatureCollection>

89
examples/gml/polygon.xml Normal file
View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=polygon&amp;OUTPUTFORMAT=XMLSCHEMA">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-0.768746,47.003018 3.002191,47.925567</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ms:polygon fid="1">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>-0.768746,47.003018 0.532597,47.925567</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:MultiPolygon srsName="EPSG:4326">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>-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 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
<gml:innerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>-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 </gml:coordinates>
</gml:LinearRing>
</gml:innerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</ms:msGeometry>
<ms:ogc_fid>1</ms:ogc_fid>
<ms:name>My Polygon with hole</ms:name>
<ms:id>0</ms:id>
</ms:polygon>
</gml:featureMember>
<gml:featureMember>
<ms:polygon fid="2">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>1.511919,47.088176 3.002191,47.882988</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:Polygon srsName="EPSG:4326">
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>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 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</ms:msGeometry>
<ms:ogc_fid>2</ms:ogc_fid>
<ms:name>My simple Polygon</ms:name>
<ms:id>0</ms:id>
</ms:polygon>
</gml:featureMember>
<gml:featureMember>
<ms:polygon fid="3">
<gml:boundedBy>
<gml:Box srsName="EPSG:4326">
<gml:coordinates>0.000000,45.000000 2.000000,47.000000</gml:coordinates>
</gml:Box>
</gml:boundedBy>
<ms:msGeometry>
<gml:MultiPolygon srsName="EPSG:4326">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>0.000000,45.000000 2.000000,45.000000 2.000000,47.000000 0.000000,47.000000 0.000000,45.000000 </gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
<gml:innerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>0.500000,45.500000 1.500000,45.500000 1.500000,46.500000 0.500000,46.500000 0.500000,45.500000 </gml:coordinates>
</gml:LinearRing>
</gml:innerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</ms:msGeometry>
<ms:ogc_fid>3</ms:ogc_fid>
<ms:name>my polygon with hole</ms:name>
<ms:id>3</ms:id>
</ms:polygon>
</gml:featureMember>
</wfs:FeatureCollection>

View File

@@ -22,7 +22,7 @@
var map, layer; var map, layer;
function init(){ function init(){
map = new OpenLayers.Map( $('map') , map = new OpenLayers.Map( 'map' ,
{ controls: [new OpenLayers.Control.MouseDefaults()] , 'numZoomLevels':20}); { controls: [new OpenLayers.Control.MouseDefaults()] , 'numZoomLevels':20});
var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} ); var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} );

49
examples/gutter.html Normal file
View File

@@ -0,0 +1,49 @@
<html>
<head>
<style type="text/css">
#map {
width: 500px;
height: 300px;
border: 1px solid gray;
}
p.caption {
width: 500px;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 2;
var map;
window.onload = function() {
options = {maxExtent: new OpenLayers.Bounds(-73.5295, 41.2318,
-69.9097, 42.8883),
maxResolution: 0.0003}
map = new OpenLayers.Map('map', options);
var roads15 = new OpenLayers.Layer.WMS( "Roads (15px gutter)",
"http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/boston/map/gmaps.map&",
{layers: 'roads_200_40'},
{gutter: 15});
var roads = new OpenLayers.Layer.WMS( "Roads (no gutter)",
"http://boston.freemap.in/cgi-bin/mapserv?map=/www/freemap.in/boston/map/gmaps.map&",
{layers: 'roads_200_40'});
map.addLayers([roads, roads15]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(-71.848, 42.2), 0);
}
// -->
</script>
</head>
<body>
<h1>OpenLayers Gutter Example</h1>
<div id="map"></div>
<p class="caption">
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.
</p>
</body>
</html>

52
examples/image-layer.html Normal file
View File

@@ -0,0 +1,52 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
p {
width: 512px;
}
#map {
width: 512px;
height: 256px;
border: 1px solid gray;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map;
function init(){
map = new OpenLayers.Map('map');
var options = {numZoomLevels: 3};
var graphic = new OpenLayers.Layer.Image(
'City Lights',
'http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif',
new OpenLayers.Bounds(-180, -88.759, 180, 88.759),
new OpenLayers.Size(580, 288),
options);
var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi",
{layers: "modis,global_mosaic"}, options);
map.addLayers([graphic, jpl_wms]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToMaxExtent();
}
// -->
</script>
</head>
<body onload="init()">
<h1>OpenLayers Image Layer Example</h1>
<div id="map"></div>
<p>
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.
</p>
</body>
</html>

View File

@@ -0,0 +1,32 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( $('map') );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml", {format: OpenLayers.Format.KML}));
map.zoomToExtent(new OpenLayers.Bounds(-112.292744,36.068477,-112.22408,36.109246));
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

32
examples/kml-layer.html Normal file
View File

@@ -0,0 +1,32 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( $('map') );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.addLayer(new OpenLayers.Layer.GML("KML", "kml/mc-search.kml", {format: OpenLayers.Format.KML}));
map.zoomToMaxExtent();
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

267
examples/kml/lines.kml Normal file
View File

@@ -0,0 +1,267 @@
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>KML Samples</name>
<open>1</open>
<description>Unleash your creativity with the help of these examples!</description>
<Style id="downArrowIcon">
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal4/icon28.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="globeIcon">
<IconStyle>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pal3/icon19.png</href>
</Icon>
</IconStyle>
<LineStyle>
<width>2</width>
</LineStyle>
</Style>
<Style id="transPurpleLineGreenPoly">
<LineStyle>
<color>7fff00ff</color>
<width>4</width>
</LineStyle>
<PolyStyle>
<color>7f00ff00</color>
</PolyStyle>
</Style>
<Style id="yellowLineGreenPoly">
<LineStyle>
<color>7f00ffff</color>
<width>4</width>
</LineStyle>
<PolyStyle>
<color>7f00ff00</color>
</PolyStyle>
</Style>
<Style id="thickBlackLine">
<LineStyle>
<color>87000000</color>
<width>10</width>
</LineStyle>
</Style>
<Style id="redLineBluePoly">
<LineStyle>
<color>ff0000ff</color>
</LineStyle>
<PolyStyle>
<color>ffff0000</color>
</PolyStyle>
</Style>
<Style id="blueLineRedPoly">
<LineStyle>
<color>ffff0000</color>
</LineStyle>
<PolyStyle>
<color>ff0000ff</color>
</PolyStyle>
</Style>
<Style id="transRedPoly">
<LineStyle>
<width>1.5</width>
</LineStyle>
<PolyStyle>
<color>7d0000ff</color>
</PolyStyle>
</Style>
<Style id="transBluePoly">
<LineStyle>
<width>1.5</width>
</LineStyle>
<PolyStyle>
<color>7dff0000</color>
</PolyStyle>
</Style>
<Style id="transGreenPoly">
<LineStyle>
<width>1.5</width>
</LineStyle>
<PolyStyle>
<color>7d00ff00</color>
</PolyStyle>
</Style>
<Style id="transYellowPoly">
<LineStyle>
<width>1.5</width>
</LineStyle>
<PolyStyle>
<color>7d00ffff</color>
</PolyStyle>
</Style>
<Style id="noDrivingDirections">
<BalloonStyle>
<text><![CDATA[
<b>$[name]</b>
<br /><br />
$[description]
]]></text>
</BalloonStyle>
</Style>
<Folder>
<name>Paths</name>
<visibility>0</visibility>
<description>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.</description>
<Placemark>
<name>Tessellated</name>
<visibility>0</visibility>
<description><![CDATA[If the <tessellate> tag has a value of 1, the line will contour to the underlying terrain]]></description>
<LookAt>
<longitude>-112.0822680013139</longitude>
<latitude>36.09825589333556</latitude>
<altitude>0</altitude>
<range>2889.145007690472</range>
<tilt>62.04855796276328</tilt>
<heading>103.8120432044965</heading>
</LookAt>
<LineString>
<tessellate>1</tessellate>
<coordinates> -112.0814237830345,36.10677870477137,0
-112.0870267752693,36.0905099328766,0 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Untessellated</name>
<visibility>0</visibility>
<description><![CDATA[If the <tessellate> tag has a value of 0, the line follow a simple straight-line path from point to point]]></description>
<LookAt>
<longitude>-112.0822680013139</longitude>
<latitude>36.09825589333556</latitude>
<altitude>0</altitude>
<range>2889.145007690472</range>
<tilt>62.04855796276328</tilt>
<heading>103.8120432044965</heading>
</LookAt>
<LineString>
<tessellate>0</tessellate>
<coordinates> -112.080622229595,36.10673460007995,0
-112.085242575315,36.09049598612422,0 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Absolute</name>
<visibility>0</visibility>
<description>Transparent purple line</description>
<LookAt>
<longitude>-112.2719329043177</longitude>
<latitude>36.08890633450894</latitude>
<altitude>0</altitude>
<range>2569.386744398339</range>
<tilt>44.60763714063257</tilt>
<heading>-106.8161545998597</heading>
</LookAt>
<styleUrl>#transPurpleLineGreenPoly</styleUrl>
<LineString>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<coordinates> -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 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Absolute Extruded</name>
<visibility>0</visibility>
<description>Transparent green wall with yellow outlines</description>
<LookAt>
<longitude>-112.2643334742529</longitude>
<latitude>36.08563154742419</latitude>
<altitude>0</altitude>
<range>4451.842204068102</range>
<tilt>44.61038665812578</tilt>
<heading>-125.7518698668815</heading>
</LookAt>
<styleUrl>#yellowLineGreenPoly</styleUrl>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>absolute</altitudeMode>
<coordinates> -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 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Relative</name>
<visibility>0</visibility>
<description>Black line (10 pixels wide), height tracks terrain</description>
<LookAt>
<longitude>-112.2580438551384</longitude>
<latitude>36.1072674824385</latitude>
<altitude>0</altitude>
<range>2927.61105910266</range>
<tilt>44.61324882043339</tilt>
<heading>4.947421249553717</heading>
</LookAt>
<styleUrl>#thickBlackLine</styleUrl>
<LineString>
<tessellate>1</tessellate>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates> -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 </coordinates>
</LineString>
</Placemark>
<Placemark>
<name>Relative Extruded</name>
<visibility>0</visibility>
<description>Opaque blue walls with red outline, height tracks terrain</description>
<LookAt>
<longitude>-112.2683594333433</longitude>
<latitude>36.09884362144909</latitude>
<altitude>0</altitude>
<range>2184.193522571467</range>
<tilt>44.60855445139561</tilt>
<heading>-72.24271551768405</heading>
</LookAt>
<styleUrl>#redLineBluePoly</styleUrl>
<LineString>
<extrude>1</extrude>
<tessellate>1</tessellate>
<altitudeMode>relativeToGround</altitudeMode>
<coordinates> -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 </coordinates>
</LineString>
</Placemark>
</Folder>
</Document>
</kml>

332
examples/kml/mc-search.kml Normal file
View File

@@ -0,0 +1,332 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<!--MetaCarta GTS v3.7.0, KML Search API v1.0.0-->
<name><![CDATA[MetaCarta: ]]></name>
<description><![CDATA[Labeling <b>28</b> locations. Of 27,281,538 total documents, <b>~26,900,000</b> documents match <i>&lt;no keywords&gt;</i> in this region.]]></description>
<visibility>1</visibility>
<LookAt>
<longitude>-82.575000</longitude>
<latitude>27.498610</latitude>
<range>6000000.0</range>
<tilt>0.0</tilt>
<heading>0.0</heading>
</LookAt>
<Style id="rel1.0">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc1.0.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.9">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.9.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.8">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.8.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.7">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.7.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.6">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.6.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.5">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.5.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.4">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.4.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.3">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.3.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.2">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.2.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.1">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.1.png</href>
</Icon>
</IconStyle>
</Style>
<Style id="rel0.0">
<IconStyle>
<Icon>
<href>http://developers.metacarta.com/img/symbols/mc0.0.png</href>
</Icon>
</IconStyle>
</Style>
<Placemark>
<!-- OGM5MmVhYTI3MTRkNzY2NDQ5YzgzMjBkYzQ3M2Q1YzYsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzBfMTE2MzYyMjk0MV8xMTcyNjg1ODk5XzAwOjE4OjhiOjM4OjM2OjQ3LDE2NjI2ODQ=, 0.959452 -->
<name><![CDATA[Bradenton]]></name>
<description><![CDATA[<a href="http://www.fhp.state.fl.us/html/TroopF/Bradenton.html">FHP: Troop F Bradenton District</a><br>FHP: Troop F <font color="red">Bradenton</font> District Bradento<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-82.575000, 27.498610</coordinates>
</Point>
</Placemark><Placemark>
<!-- N2M0OTk4NzMxMWFjOGQ1MzgwY2NmNzBlOWIzODg3OGYsdW1icm86MTYxMzlfMTE2OTg0MDM4MV8xMTY5ODQ1MDQ5XzAwOjE4OjhiOjNhOjcwOmZkLDE4NTQzNw==, 0.959452 -->
<name><![CDATA[Pezinok]]></name>
<description><![CDATA[<a href="http://en.wikipedia.org/wiki/Pezinok"> Pezinok</a><br><font color="red">Pezinok</font> Coor titl<br>Pezinok Coor title dm4616N1716Etype:cityregion:SK Infobox Slovak town image_coat_of_arms subject_name Pezinok slovak_region Bratislava Region slovak_district ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>17.266666, 48.283333</coordinates>
</Point>
</Placemark><Placemark>
<!-- MzE1OWQ0MTUwNTUzOGQxODBiNGYwZjU3MThmYzMwY2IsanVsaWEubWV0YWNhcnRhLmNvbToxNjAzNl8xMTYzNjM0MjI4XzExNjU5Nzk3MTVfMDA6MTg6OGI6MzU6MDA6ZGMsNzQ3MzQ2, 0.959452 -->
<name><![CDATA[Purcellville]]></name>
<description><![CDATA[<a href="http://www.loudoun.gov:80/compplan/purcellville.htm">Purcellville Urban Growth Area Management Plan</a><br><font color="red">Purcellville</font> Urban Growth Are<br>Purcellville Urban Growth Area Management Plan Skip Navigation Purcellville Urban Growth Area Management Plan Welcome to the Purcellville Urban Growth Area Management ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-77.715000, 39.136670</coordinates>
</Point>
</Placemark><Placemark>
<!-- N2UxY2EwYzY0YzBhMTAzNTg1NWFkY2YzZWU2NjdhZWIsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw5MzY1NDI=, 0.958984 -->
<name><![CDATA[Calaveras County]]></name>
<description><![CDATA[<a href="http://www.co.calaveras.ca.us:80/departments/pub_health/PHD_WNV.html">Calaveras County Public Health</a><br><font color="red">Calaveras County</font> Public Healt<br>Calaveras County Public Health County of Calaveras Public Health Department West Nile Virus (WNV) WNV is a disease that is spread to ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-120.583330, 38.166670</coordinates>
</Point>
</Placemark><Placemark>
<!-- ZWFhZDJkYTk0MmNlMWU4Yzc1OWViODIyYzU5ZGE4ZDcsdW1icm86MTYxNDFfMTE2OTg0ODM4M18xMTY5ODUxMDgxXzAwOjE4OjhiOjNhOjcwOmZkLDUxNTIw, 0.958964 -->
<name><![CDATA[Kolkata]]></name>
<description><![CDATA[<a href="http://en.wikipedia.org/wiki/Kolkata_Film_Festival"> Kolkata Film Festival</a><br><font color="red">Kolkata</font> Film Festiva<br>Kolkata Film Festival '''Kolkata Film Festival''' is an annual international film festival held in Kolkata in the Indian state of West Bengal ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>88.369722, 22.569722</coordinates>
</Point>
</Placemark><Placemark>
<!-- ZDhiYjJhNTZlNmM1ZGU4YjAzOWZiNTc5NzAxM2RlNWYsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzJfMTE2MzY4NTU2MV8xMTcyNjg1OTAyXzAwOjE4OjhiOjM4OjM2OjQ3LDk2NTMxOA==, 0.958964
ZDEwNjIwYTdjMjc2MmM4MDQ3NWNjYTY0ZWVjZDI4MjAsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzBfMTE2MzYyMjk0MV8xMTcyNjg1ODk5XzAwOjE4OjhiOjM4OjM2OjQ3LDMwNTU0OQ==, 0.958475
YmVjMjRjZTYxZDJhYjMyYTE3MjY0YzNkNTg4ODMyYzIsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAwXzExNjM2MzI4MDhfMTE2NzM0NjY3Ml8wMDoxODo4YjozODozNjo3OSw4ODg2Mw==, 0.958475 -->
<name><![CDATA[South Yorkshire]]></name>
<description><![CDATA[<a href="http://www.southyorkshire.nhs.uk:80/strategy/index.htm">South Yorkshire Strategic Health Authority - Events - Deliver...</a><br><font color="red">South Yorkshire</font> Strategic Healt<br>South Yorkshire Strategic Health Authority - Events - Delivering Excellence event 12th June 2003 Welcome What's new Local services Performance --&gt; Strategy Service redesign ...<br><br><a href="http://www.southyorkshire.nhs.uk:80/">South Yorkshire Strategic Health Authority - Welcome</a><br><font color="red">South Yorkshire</font> Strategic Healt<br>South Yorkshire Strategic Health Authority - Welcome --&gt; Welcome What's new Local services Performance --&gt; Strategy Service redesign Franchise plan Local delivery plan Structure ...<br><br><a href="http://www.southyorkshire.nhs.uk:80/index.html">South Yorkshire Strategic Health Authority - Welcome</a><br><font color="red">South Yorkshire</font> Strategic Healt<br>South Yorkshire Strategic Health Authority - Welcome --&gt; Welcome What's new Local services Performance --&gt; Strategy Service redesign Franchise plan Local delivery plan Structure ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-1.250000, 53.450000</coordinates>
</Point>
</Placemark><Placemark>
<!-- MWE4NWQ2N2U4ZmI3MDk5MjNiNmJlYzE4NzMxOTdhOTIsanVsaWEubWV0YWNhcnRhLmNvbToxNjUyNF8xMTY5ODQzMzQ1XzExNjk4NDg2OTRfMDA6MTg6OGI6MzU6MDA6ZGMsNTI1OTcx, 0.958964
ZDZjY2I2Mjk2OTNmMmVjMGJhMzY1NTIyMGEzZGZjYTQsanVsaWEubWV0YWNhcnRhLmNvbToxNjUwMl8xMTY5ODMwMDU5XzExNjk4MzU0MThfMDA6MTg6OGI6MzU6MDA6ZGMsMjMwNjQw, 0.958475 -->
<name><![CDATA[Gaithersburg]]></name>
<description><![CDATA[<a href="http://alert.gaithersburgmd.gov/faq.php">Frequently Asked Questions</a><br>What is Alert <font color="red">Gaithersburg</font>? What is an Aler<br>... 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 ...<br><br><a href="http://alert.gaithersburgmd.gov/index.php?CCheck=1">Alert Gaithersburg</a><br>Alert <font color="red">Gaithersburg</font> USER LOGIN emai<br>Alert Gaithersburg USER LOGIN email address password Lost password? Gaithersburg Home Alert Home New User Learn More FAQ Support This application requires Javascript ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-77.201670, 39.143330</coordinates>
</Point>
</Placemark><Placemark>
<!-- ZjQ4MDJjN2FiNzMxNjk3NzNkN2ZhNDQzZDk5OTkxYTgsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzJfMTE2MzY4NTU2MV8xMTcyNjg1OTAyXzAwOjE4OjhiOjM4OjM2OjQ3LDU4OTU1Mw==, 0.958964 -->
<name><![CDATA[Pocatello]]></name>
<description><![CDATA[<a href="http://www.idahoparks.org/about/permits/bannock_ski.html">Bannock</a><br>Cycle 404 S Arthur <font color="red">Pocatello</font> 232.3711 City o<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-112.444720, 42.871390</coordinates>
</Point>
</Placemark><Placemark>
<!-- MjY4NTdkZmI2NWU3YjFiNGY3MzExZTY5N2FlYTVhMGYsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzNfMTE2MzY5OTA3OF8xMTcyNjg1OTAyXzAwOjE4OjhiOjM4OjM2OjQ3LDMwNjE2, 0.958964 -->
<name><![CDATA[le Cambodge]]></name>
<description><![CDATA[<a href="http://www.who.int/www.who.int/mediacentre/news/releases/2004/pr46/fr/index.html">OMS | Avec 75 % des enfants protA<74>gA<67>s contre les parasites, ...</a><br>les parasites, <font color="red">le Cambodge</font> est le premier pay<br>OMS | Avec 75 % des enfants protA<74>gA<67>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>105.000000, 13.000000</coordinates>
</Point>
</Placemark><Placemark>
<!-- N2Y2NTdhYmM5MzExOTgwZDc1ODFiZTk2MDMyZmMxN2UsanVsaWEubWV0YWNhcnRhLmNvbToxNjQ5MV8xMTY5ODIzMzkxXzExNjk4MjkyMDJfMDA6MTg6OGI6MzU6MDA6ZGMsNDIyNTIw, 0.958964 -->
<name><![CDATA[firenze]]></name>
<description><![CDATA[<a href="http://groups.google.it:80/group/italia.firenze.discussioni/browse_thread/thread/39c8b8700af2691b/b53d680269651f65#b53d680269651f65">Google Gruppi : italia.firenze.discussioni</a><br>Gruppi : italia.<font color="red">firenze</font>.discussioni Hom<br>Google Gruppi : italia.firenze.discussioni Home page di Gruppi | Guida | Entra Web Immagini Gruppi Directory News altro <20> Ricerca avanzata nei Gruppi Preferenze Membri: Entra ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>11.250000, 43.766666</coordinates>
</Point>
</Placemark><Placemark>
<!-- YTU5NzdlYmNkNmUzYWM4MTQzODY4MjFiMmQ5OWQzMzIsanVsaWEubWV0YWNhcnRhLmNvbToxNjUxM18xMTY5ODM2NjAxXzExNjk4NDIzNzZfMDA6MTg6OGI6MzU6MDA6ZGMsNDU2NjYz, 0.958475
ZDNlZTdjNTM1OTRhOTk5MDUyMjAzNzIwMGMxNGQ3NWMsa3VwYS5tZXRhY2FydGEuY29tOjE2MDE1XzExNjQ1MTMzODRfMTE2NzM0NjY3NV8wMDoxODo4YjozODozNjo3OSwyOTgyOTU=, 0.958964
MDVhNjNkMGUxMzZlODMwNGRjNTViZGJhOTdiYWRmZjksanVsaWEubWV0YWNhcnRhLmNvbToxNjAzNl8xMTYzNjM0MjI4XzExNjU5Nzk3MTVfMDA6MTg6OGI6MzU6MDA6ZGMsMzk5MzY3, 0.958475
OWEwOTE2NWYyZGM1ZDkwNTI3MWE0YzBhNjI3MTdlODUsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw1MTY4MjU=, 0.958475
MDEwNmJhOTFlMGFhM2Q0OTUxYmUxNTRlZTU4MjViYjEsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw1MjI4MTk=, 0.958475
Zjk1MzY0ZmQ0OTc5ODgwOTQ1MWVjYzM3ZTEzYjFhYTEsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw0Njc3OTE=, 0.958475
YjZmZWIzZTc5MGI5N2MwM2MyYTE5ZWM1NDk1MTdmZDUsanVsaWEubWV0YWNhcnRhLmNvbToxNjUwMl8xMTY5ODMwMDU5XzExNjk4MzU0MThfMDA6MTg6OGI6MzU6MDA6ZGMsMTkxMDcx, 0.958964 -->
<name><![CDATA[Fairfax County]]></name>
<description><![CDATA[<a href="http://www.fairfaxcounty.gov:80/demogrph/emplbut.htm">Employment Statistics & Information - Fairfax County, Virginia</a><br>Information - <font color="red">Fairfax County</font>, Virginia Busines<br>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 ...<br><br><a href="http://www.fairfaxcounty.gov:80/contact/search.asp">Search Fairfax County Contacts - Fairfax County, Virginia</a><br>Search <font color="red">Fairfax County</font> Contacts - Fairfa<br>Search Fairfax County Contacts - Fairfax County, Virginia Search Fairfax County Contacts you are here : homepage &gt; fairfax county contacts To search for an agency ...<br><br><a href="http://www.fairfaxcounty.gov:80/demogrph/othrbut.htm">Other Information - Fairfax County, Virginia</a><br>Information - <font color="red">Fairfax County</font>, Virginia Averag<br>Other Information - Fairfax County, Virginia Average Household Size Health Insurance Age Distribution Persons Speaking Languages Other than English Prior Place of Residence Educational Attainment ...<br><br><a href="http://www.fairfaxcounty.gov:80/demogrph/housebut.htm">Housing Information - Fairfax County, Virginia</a><br>Information - <font color="red">Fairfax County</font>, Virginia Busines<br>Housing Information - Fairfax County, Virginia Business & Nonresidential Gross Floor Area Census Information & Other Government Agencies Economic Information Employment Information General Overview Glossary Housing Immigration ...<br><br><a href="http://www.fairfaxcounty.gov:80/demogrph/popbut.htm">Population Information - Fairfax County, Virginia</a><br>Information - <font color="red">Fairfax County</font>, Virginia Busines<br>Population Information - Fairfax County, Virginia Business & Nonresidential Gross Floor Area Census Information & Other Government Agencies Economic Information Employment Information General Overview Glossary Housing Immigration ...<br><br><a href="http://www.fairfaxcounty.gov:80/business/services/">Business Services and Resources - Doing Business - Fairfax Co...</a><br>Doing Business - <font color="red">Fairfax County</font>, Virginia Busines<br>Business Services and Resources - Doing Business - Fairfax County, Virginia Business Services & Resources you are here : homepage &gt; doing business &gt; business services and resources Fairfax County has a diverse and ...<br><br><a href="http://www.fairfaxcounty.gov/contact/search.asp">Search Fairfax County Contacts - Fairfax County, Virginia</a><br>Search <font color="red">Fairfax County</font> Contacts - Fairfa<br>Search Fairfax County Contacts - Fairfax County, Virginia Search Fairfax County Contacts you are here : homepage &gt; fairfax county contacts To search for an agency ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-77.350000, 38.850000</coordinates>
</Point>
</Placemark><Placemark>
<!-- Mjg2NGM5N2YzNmYyNGFlZmQ0ZjE5N2Y4ZDBmNzFkMzIscGxhdmlzLm1ldGFjYXJ0YS5jb206MTY2NzNfMTE3MzU3NTg2MF8xMTczNTc4MTgwXzAwOjE4OjhiOjNhOjNkOjQwLDIyODM5NA==, 0.958964 -->
<name><![CDATA[Nassau Bahamas]]></name>
<description><![CDATA[<a href="http://topix.net/r/05j525XYQmo8VlBBUPUWa9G9bOa4kVTdx1LNqTqvWxejdQKhnOECcVfVuSMlxL3OXjYCfywPCSSyfl9UdTX6h1yipv285=2Fc6S3ylpt=2BXwfI1uhZS8L=2BM4gKSAUReNk868Hwh3guBbo1qfQ0=2B3LQrtt7d7LDiFk3qO1TN1RWjhlpU=3D">Nassau Bahamas Vacation <20> Crawfish Production Declines In The...</a><br><font color="red">Nassau Bahamas</font> Vacation <20> Crawfis<br>Nassau Bahamas Vacation <20> Crawfish Production Declines In The Bahamas Nassau Bahamas Vacation Crawfish Production Declines In The Bahamas June 15, 2006 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-77.350000, 25.083333</coordinates>
</Point>
</Placemark><Placemark>
<!-- OWNkOGUyZGEyNGJiODcxYWVmODUwMWE0MzcwY2MxMzksZWxiZS5tZXRhY2FydGEuY29tOjE2MDYzXzExNzI3ODU1NDNfMTE3Mjc5MzIyOF8wMDoxODo4YjozNzpmZDo1YSwxMzI1ODU=, 0.958964 -->
<name><![CDATA[Front Royal]]></name>
<description><![CDATA[<a href="https://yosemite.epa.gov/opei/ptrack.nsf/vRenewalViewPrintView/B72E7B83510A37AC8525718E0051F7C3">Membership Renewal Print/View</a><br>Application DuPont <font color="red">Front Royal</font> E.I. Du Pont d<br>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 &nbsp&nbsp Name: Mr. James ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-78.194720, 38.918060</coordinates>
</Point>
</Placemark><Placemark>
<!-- NTNjNzZkNWY4NzNmY2JlNTY2ZGRjNTRiYjU3N2IwNDEsanVsaWEubWV0YWNhcnRhLmNvbToxNjAzNl8xMTYzNjM0MjI4XzExNjU5Nzk3MTVfMDA6MTg6OGI6MzU6MDA6ZGMsMTU5MDI1, 0.957987
N2FjZGY0YzM2ZTU4NzE1Y2Q2MGVmNmQ0ZjZkYjI3MjUsanVsaWEubWV0YWNhcnRhLmNvbToxNjAzNl8xMTYzNjM0MjI4XzExNjU5Nzk3MTVfMDA6MTg6OGI6MzU6MDA6ZGMsMzM2MTAz, 0.958475 -->
<name><![CDATA[WESTCHESTER COUNTY]]></name>
<description><![CDATA[<a href="http://schumer.senate.gov:80/SchumerWebsite/pressroom/press_releases/PR01140.html">SCHUMER, CLINTON SECURE $1.5 MILLION FOR NEW BUSES IN WESTCHE...</a><br>FOR NEW BUSES IN <font color="red">WESTCHESTER COUNTY</font> TOPICS Latest New<br>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 ...<br><br><a href="http://schumer.senate.gov:80/SchumerWebsite/pressroom/press_releases/PR01996.html">SCHUMER, CLINTON SECURE $3 MILLION FOR NEW BUSES IN WESTCHEST...</a><br>FOR NEW BUSES IN <font color="red">WESTCHESTER COUNTY</font> TOPICS Latest New<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-73.800000, 41.116670</coordinates>
</Point>
</Placemark><Placemark>
<!-- ZWQwMTUwYjI4N2ZlZTg4MmI4N2EyZTU5YjU1ZjlkMjMsa3VwYS5tZXRhY2FydGEuY29tOjE2OTI0XzExNzM1NzA1NzBfMTE3MzU3NTk0Nl8wMDoxODo4YjozODozNjo3OSwyODYzOTE=, 0.958475
YzBlZGZhY2IxOGNkNmEyNzI3OWEwZTNkNjRhM2Q4MGYsanVsaWEubWV0YWNhcnRhLmNvbToxNjUwMl8xMTY5ODMwMDU5XzExNjk4MzU0MThfMDA6MTg6OGI6MzU6MDA6ZGMsNTQzMDk4, 0.957987 -->
<name><![CDATA[Oswego County]]></name>
<description><![CDATA[<a href="http://www.valleynewsonline.com:80/news/2004/0117/Oswego_News/">Restaurant makes donation to Friends of Oswego County Hospice</a><br>to Friends of <font color="red">Oswego County</font> Hospice Fulton, N<br>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 ...<br><br><a href="http://www.valleynewsonline.com:80/news/2004/0925/Local_News-Photos/030.html">Fund-raiser held for Oswego County Hospice</a><br>raiser held for <font color="red">Oswego County</font> Hospice Fulton, N<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-76.150000, 43.450000</coordinates>
</Point>
</Placemark><Placemark>
<!-- NjE2OTE2N2U3ZDlmZGFkMTkzYWYzNjViZjQ2OGNlODcsa3VwYS5tZXRhY2FydGEuY29tOjE2NDI5XzExNjk4NzA4OTNfMTE2OTg3NjQyNl8wMDoxODo4YjozODozNjo3OSw1NzEzMzk=, 0.958475 -->
<name><![CDATA[Hood River Memorial Hospital]]></name>
<description><![CDATA[<a href="http://www.providence.org:80/hoodriver/foundation/default.htm">Providence Hood River Memorial Hospital Foundation</a><br>Providence <font color="red">Hood River Memorial Hospital</font> Foundatio<br>Providence Hood River Memorial Hospital Foundation Healthwise Medical Reference Library --&gt; Home | Services | Physicians & Clinics | Education | Patient Information | News & Events | Foundation | Employment Site Search ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-121.523610, 45.704720</coordinates>
</Point>
</Placemark><Placemark>
<!-- YTQwNjQwNzM4YTEzMzFiN2Q5YzExZTlkMWMxMGZmZTgsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzRfMTE2MzcxNDQ4OF8xMTcyNjg1OTAzXzAwOjE4OjhiOjM4OjM2OjQ3LDY2ODQzNA==, 0.958475 -->
<name><![CDATA[Leavenworth County]]></name>
<description><![CDATA[<a href="http://leavenworthcounty.redcross.org/PR17jan01.htm">ARC-Leavworth County: Press Release January 17, 2001</a><br>January 17, 2001 <font color="red">Leavenworth County</font> Chapter Return t<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-95.033330, 39.233330</coordinates>
</Point>
</Placemark><Placemark>
<!-- YzhhNTNkZDlmMzFhMDA2NGM4NzExNTNiMTIyYzg2MTUsdW1icm86MTY0ODlfMTE3MTk5Nzc3OV8xMTcyMDAwOTQwXzAwOjE4OjhiOjNhOjcwOmZkLDYwNTU4, 0.958475 -->
<name><![CDATA[Blancheville]]></name>
<description><![CDATA[<a href="http://en.wikipedia.org/wiki/Andelot-Blancheville"> Andelot-Blancheville</a><br>Andelot-<font color="red">Blancheville</font> French commun<br>Andelot-Blancheville French commune nomcommuneAndelot-Blancheville rA<72>gionChampagne-Ardenne dA<64>partementHaute-Marne arrondissementChaumont cantonCanton of Andelot-BlanchevilleAndelot-Blancheville insee52008 cp52700 maire mandat intercomm longitude05A<35> 17 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>5.266666, 48.216666</coordinates>
</Point>
</Placemark><Placemark>
<!-- YTBlMTIwMTVhYTUyNTlkYTM5MDI3ZGQ2NDk2N2QzYzYsa3VwYS5tZXRhY2FydGEuY29tOjE2NDI5XzExNjk4NzA4OTNfMTE2OTg3NjQyNl8wMDoxODo4YjozODozNjo3OSwzMzUwMjM=, 0.958475 -->
<name><![CDATA[Platte City]]></name>
<description><![CDATA[<a href="http://www.plattecountylandmark.com:80/Article371.htm">The Landmark Newspaper - Platte County (Platte City wants str...</a><br>Platte County (<font color="red">Platte City</font> wants stree<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-94.782220, 39.370280</coordinates>
</Point>
</Placemark><Placemark>
<!-- NzY0NTY1YzZjNzE5MTViYjU1NmNmMTJjYjc5NDdjMGEsanVsaWEubWV0YWNhcnRhLmNvbToxNjUxM18xMTY5ODM2NjAxXzExNjk4NDIzNzZfMDA6MTg6OGI6MzU6MDA6ZGMsNjA0NTE2, 0.958475 -->
<name><![CDATA[Macomb County]]></name>
<description><![CDATA[<a href="http://macombdaily.com:80/stories/080404/loc_antosk001.shtml">Macomb Daily : Sports : Retiring juvenile court worker an 'in...</a><br>an 'institution in <font color="red">Macomb County</font>' 08/04/04 SUBSCRIB<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-82.950000, 42.700000</coordinates>
</Point>
</Placemark><Placemark>
<!-- NzUxNjI3MGNjZjg4OTEzMGEwMDU4YzQ2ZTQ5ZjM3MjAsdW1icm86MTY0ODlfMTE3MTk5Nzc3OV8xMTcyMDAwOTQwXzAwOjE4OjhiOjNhOjcwOmZkLDE0NDIxMA==, 0.958475 -->
<name><![CDATA[Voronezh]]></name>
<description><![CDATA[<a href="http://en.wikipedia.org/wiki/FC_Fakel_Voronezh"> FC Fakel Voronezh</a><br>FC Fakel <font color="red">Voronezh</font> Football clu<br>FC Fakel Voronezh Football club infobox clubname Fakel image Club logo fullname Football Club Fakel Voronezh nickname founded 1947 ground Tsentralnyi Profsoyuz StadionTsentralnyi Profsoyuz ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>39.170000, 51.666388</coordinates>
</Point>
</Placemark><Placemark>
<!-- YzkxOWI2MmRkZjYzNGFmMzY5MmNkYmJmMzUwMDkwZjEsanVsaWEubWV0YWNhcnRhLmNvbToxNjUwMl8xMTY5ODMwMDU5XzExNjk4MzU0MThfMDA6MTg6OGI6MzU6MDA6ZGMsMTYyNjk1, 0.958475 -->
<name><![CDATA[Loudoun County]]></name>
<description><![CDATA[<a href="http://www.loudoun.gov/main/new.htm">What's New in Loudoun County</a><br>What's New in <font color="red">Loudoun County</font> Skip Navigatio<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-77.650000, 39.083330</coordinates>
</Point>
</Placemark><Placemark>
<!-- Yjc1NjQ5MjgwNTIzMTJhNjYxM2U3ZGJiYmZkNjQ4ZmEsaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzBfMTE2MzYyMjk0MV8xMTcyNjg1ODk5XzAwOjE4OjhiOjM4OjM2OjQ3LDEyMjI2NTI=, 0.958027
ZDYyZDRlMTRjYTU5ZmM0YjlhMDg4YWEzZGM4ZjUyNGUsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSwxODI2MTg=, 0.958027 -->
<name><![CDATA[San Joaquin County]]></name>
<description><![CDATA[<a href="http://www.oes.ca.gov/Operational/OESHome.nsf/PrintView/C4F1A8E5BF70A1D088256EAA00198EF3OpenDocument"> Levee Break San Joaquin County Levee Break and Fl...</a><br>Levee Break <font color="red">San Joaquin County</font> Levee Break an<br>Levee Break San Joaquin County Levee Break and Flooding The Governor's Office of Emergency Services activated the State Operations Center and the Inland ...<br><br><a href="http://www.oes.ca.gov:80/Operational/OESHome.nsf/PrintView/C4F1A8E5BF70A1D088256EAA00198EF3?OpenDocument"> Levee Break San Joaquin County Levee Break and Fl...</a><br>Levee Break <font color="red">San Joaquin County</font> Levee Break an<br>Levee Break San Joaquin County Levee Break and Flooding The Governor's Office of Emergency Services activated the State Operations Center and the Inland ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-121.300000, 37.933330</coordinates>
</Point>
</Placemark><Placemark>
<!-- YTcwMjgxMzFhYjQ5NDdiMjkzZGM0ODkwODlkNjBiOTEsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAwXzExNjM2MzI4MDhfMTE2NzM0NjY3Ml8wMDoxODo4YjozODozNjo3OSw2MzM5NDk=, 0.957987 -->
<name><![CDATA[Gibellina]]></name>
<description><![CDATA[<a href="http://www.archidose.org:80/Apr00/041700.html">Cretto</a><br>Cretto Cretto <font color="red">Gibellina</font>, Sicily Italia<br>Cretto Cretto Gibellina, Sicily Italian artist Alberto Burri is known for a series of works titled Cretti , monochrome pieces composed of paste left to ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>12.966666, 37.783333</coordinates>
</Point>
</Placemark><Placemark>
<!-- N2MwN2NjOWI2ZDhjZjNlNDFhYzhjMjAwOGYzOWNmYzgsdW1icm86MTY0ODlfMTE3MTk5Nzc3OV8xMTcyMDAwOTQwXzAwOjE4OjhiOjNhOjcwOmZkLDQ0ODAz, 0.957987 -->
<name><![CDATA[Sunnhordland]]></name>
<description><![CDATA[<a href="http://en.wikipedia.org/wiki/Stord_Sunnhordland_F.K."> Stord Sunnhordland F.K.</a><br>Stord <font color="red">Sunnhordland</font> F.K. Infobo<br>Stord Sunnhordland F.K. Infobox Football club clubname Stord Sunnhordland F.K. image logo fullname Stord Sunnhordland Fotballklubb Norwegian nickname founded December 18 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>5.500000, 59.916666</coordinates>
</Point>
</Placemark><Placemark>
<!-- YTYyNmE1ZjQ4NjQ0MTA0MGFlZTkyZGU2OWExOTM4ODgsZWxiZS5tZXRhY2FydGEuY29tOjE2MDM5XzExNjk3NzY4NjRfMTE2OTc4NjY1Nl8wMDoxODo4YjozNzpmZDo1YSwxNTM4MTQ5, 0.957987 -->
<name><![CDATA[Zagreb]]></name>
<description><![CDATA[<a href="http://www.rwe.de/generator.aspx/icw-aqua/beteiligungen/zagrebacke-odpadne-vode-doo/language=de/id=362866/zagrebacke-odpadne-vode-doo.html">RWE Aqua - Zentralklaranlage Zagreb (ZOV)</a><br>Zentralklaranlage <font color="red">Zagreb</font> (ZOV) Home Englis<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>16.000000, 45.800000</coordinates>
</Point>
</Placemark><Placemark>
<!-- NmZlOTJiY2YwNTQzNTQ0MGRkNjhkZGQ0Y2FiN2JiMzYsa3VwYS5tZXRhY2FydGEuY29tOjE2MDAxXzExNjM2NjM1MjRfMTE2NzM0NjY3NF8wMDoxODo4YjozODozNjo3OSw3Mzc=, 0.957987 -->
<name><![CDATA[Burien]]></name>
<description><![CDATA[<a href="http://www.metrokc.gov:80/kcdot/news/2005/nr050310_burientc.htm">Open house features design ideas for new Burien Transit Center</a><br>ideas for new <font color="red">Burien</font> Transit Center DO<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-122.345560, 47.470560</coordinates>
</Point>
</Placemark><Placemark>
<!-- NzExYjkwZThmOTI4YzQ5OThkYzg5NzJiMmQ0N2JlZjksaWJlcnVzLm1ldGFjYXJ0YS5jb206MTYwNzBfMTE2MzYyMjk0MV8xMTcyNjg1ODk5XzAwOjE4OjhiOjM4OjM2OjQ3LDEyNjk2NjI=, 0.957987 -->
<name><![CDATA[Galveston County]]></name>
<description><![CDATA[<a href="http://galvestondailynews.com/mobile/index.lasso">The Daily News: Mobile Edition</a><br>Mobile Edition The <font color="red">Galveston County</font> Daily News - MOBIL<br>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 ...<br><br>]]></description>
<styleUrl>#rel1.0</styleUrl>
<Point>
<coordinates>-94.966670, 29.366670</coordinates>
</Point>
</Placemark>
</Document>
</kml>

View File

@@ -40,10 +40,10 @@
var maxOpacity = 0.9; var maxOpacity = 0.9;
var minOpacity = 0.1; var minOpacity = 0.1;
function changeOpacity(byOpacity) { function changeOpacity(byOpacity) {
var newOpacity = (parseFloat($('opacity').value) + byOpacity).toFixed(1); var newOpacity = (parseFloat(OpenLayers.Util.getElement('opacity').value) + byOpacity).toFixed(1);
newOpacity = Math.min(maxOpacity, newOpacity = Math.min(maxOpacity,
Math.max(minOpacity, newOpacity)); Math.max(minOpacity, newOpacity));
$('opacity').value = newOpacity; OpenLayers.Util.getElement('opacity').value = newOpacity;
shade.setOpacity(newOpacity); shade.setOpacity(newOpacity);
} }
function init(){ function init(){
@@ -59,7 +59,7 @@
"http://terraservice.net/ogcmap.ashx", "http://terraservice.net/ogcmap.ashx",
{layers: "DRG"}); {layers: "DRG"});
shade = new OpenLayers.Layer.WMS("Shaded Relief", shade = new OpenLayers.Layer.WMS("Shaded Relief",
"http://ims.cr.usgs.gov:80/servlet19/com.esri.wms.Esrimap/USGS_EDC_Elev_NED_3", "http://ims.cr.usgs.gov/servlet19/com.esri.wms.Esrimap/USGS_EDC_Elev_NED_3",
{layers: "HR-NED.IMAGE", reaspect: "false", transparent: 'true'}, {layers: "HR-NED.IMAGE", reaspect: "false", transparent: 'true'},
{isBaseLayer: false, opacity: 0.3}); {isBaseLayer: false, opacity: 0.3});
map.addLayers([drg, shade]); map.addLayers([drg, shade]);

View File

@@ -16,7 +16,7 @@
var map, layer; var map, layer;
function init(){ function init(){
map = new OpenLayers.Map( $('map') ); map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);

View File

@@ -16,9 +16,10 @@
var map, layer; var map, layer;
function init(){ function init(){
map = new OpenLayers.Map( $('map') ); map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS", layer = new OpenLayers.Layer.MapServer( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'},
{gutter: 15});
map.addLayer(layer); map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom); map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);

View File

@@ -0,0 +1,26 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 100%;
height: 100%;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script src="../lib/OpenLayers/Layer/MapServer/Untiled.js"></script>
<script type="text/javascript">
window.onload = function(){
var map = new OpenLayers.Map( 'map', {maxResolution: 'auto'} );
var layer = new OpenLayers.Layer.MapServer.Untiled( "MapServer Untiled",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(0, 0), 1);
map.addControl( new OpenLayers.Control.LayerSwitcher() );
}
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>

View File

@@ -22,7 +22,7 @@
var map, mmlayer, layer; var map, mmlayer, layer;
function init(){ function init(){
map = new OpenLayers.Map( $('map') , map = new OpenLayers.Map( 'map' ,
{controls:[new OpenLayers.Control.MouseDefaults()]}); {controls:[new OpenLayers.Control.MouseDefaults()]});
mmlayer = new OpenLayers.Layer.MultiMap( "MultiMap"); mmlayer = new OpenLayers.Layer.MultiMap( "MultiMap");

35
examples/multiserver.html Normal file
View File

@@ -0,0 +1,35 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( 'map' );
var urlArray = ["http://labs.metacarta.com/wms-c/Basic.py",
"http://monitor.metacarta.com/wms-c/Basic.py"];
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
urlArray,
{layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

View File

@@ -64,7 +64,7 @@ function runMVS() {
safeArgs.marker = theArgs.marker; // TODO: Make this "safe". safeArgs.marker = theArgs.marker; // TODO: Make this "safe".
// ----- // -----
var theMVS = new OpenLayers.Map($('map'), {controls: [], maxResolution: 'auto'}); var theMVS = new OpenLayers.Map('map', {controls: [], maxResolution: 'auto'});
for(var i = 0; i < safeArgs.controls.length; i++) { for(var i = 0; i < safeArgs.controls.length; i++) {
switch(safeArgs.controls[i]) { switch(safeArgs.controls[i]) {
case 'panzoombar': case 'panzoombar':

37
examples/navtoolbar.html Normal file
View File

@@ -0,0 +1,37 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
float:right;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( 'map', { controls: [new OpenLayers.Control.PanZoom()] } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
var panel = new OpenLayers.Control.NavToolbar();
map.addControl(panel);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

143
examples/openmnnd.html Normal file
View File

@@ -0,0 +1,143 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 600px;
height: 475px;
border: 1px solid black;
}
#info {
float: right;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, layer;
function init(){
OpenLayers.ProxyHost="/proxy/?url=";
map = new OpenLayers.Map( $('map'), {'maxResolution':'auto', maxExtent: new OpenLayers.Bounds(-203349.72008129774,4816309.33,1154786.8041952979,5472346.5), projection: 'EPSG:26915' } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
["http://geoint.lmic.state.mn.us/cgi-bin/wms"], {layers: 'fsa'} );
map.addLayer(layer);
wfs_url = "http://prototype.openmnnd.org/cgi-bin/mapserv.exe?map=openmnndwfs/openmnndwfs.map";
wms = new OpenLayers.Layer.WMS("Minnesota Parcels (WMS)", wfs_url, {'layers':'streams', 'transparent': true, 'format':'image/gif'});
map.addLayer(wms);
wfs = new OpenLayers.Layer.WFS("Minnesota Streams (WFS)", wfs_url, {'typename':'streams'}, {ratio:1.25, minZoomLevel:4});
// preFeatureInsert can be used to set style before the feature is drawn
wfs.preFeatureInsert= function(feature) { feature.style.strokeWidth="3"; feature.style.strokeColor="blue";
}
wfs.onFeatureInsert = function() {
$('stream_features').innerHTML = feature.layer.features.length;
}
map.addLayer(wfs);
// Or a style can be set on the layer.
pwfsstyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
OpenLayers.Util.extend(pwfsstyle, {'fillColor': 'green'});
pwfs = new OpenLayers.Layer.WFS("Minnesota Plat (WFS)", wfs_url,
{'typename':'plat'},
{
ratio:1.25,
minZoomLevel:8,
extractAttributes: true,
style: pwfsstyle
});
pwfs.onFeatureInsert= function(feature) {
$('plat_features').innerHTML = feature.layer.features.length;
}
map.addLayer(pwfs);
rstyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
OpenLayers.Util.extend(rstyle, {'strokeColor': 'white', strokeWIdth: "4"});
rwfs = new OpenLayers.Layer.WFS("Minnesota Roads (WFS)", wfs_url, {'typename':'roads'},
{ratio:1.25, minZoomLevel:7, extractAttributes: true, style:rstyle});
rwfs.onFeatureInsert= function(feature) {
$('road_features').innerHTML = feature.layer.features.length;
}
map.addLayer(rwfs);
map.events.register('moveend', null, function() {
$('stream_features').innerHTML = "0";
$('road_features').innerHTML = "0";
$('plat_features').innerHTML = "0";
});
var ls = new OpenLayers.Control.LayerSwitcher();
map.addControl(ls);
drawControls = {
selectPlat: new OpenLayers.Control.SelectFeature(pwfs, {callbacks: {'up':feature_info,'over':feature_info_hover}}),
selectRoad: new OpenLayers.Control.SelectFeature(rwfs, {callbacks: {'up':feature_info,'over':feature_info_hover}})
};
for(var key in drawControls) {
map.addControl(drawControls[key]);
}
drawControls.selectPlat.activate();
map.zoomToExtent(new OpenLayers.Bounds(303232.550864,5082911.694856,305885.161263,5084486.682281));
}
function toggleControl(element) {
for(key in drawControls) {
var control = drawControls[key];
if(element.value == key && element.checked) {
control.activate();
} else {
control.deactivate();
}
}
}
var displayedFeature = null;
function feature_info_hover(feature) {
if (displayedFeature != feature &&
(!feature.layer.selectedFeatures.length ||
(feature.layer.selectedFeatures[0] == feature))) {
feature_info(feature);
displayedFeature = feature;
}
}
function feature_info(feature) {
var html = "<ul>";
for(var i in feature.attributes)
html += "<li><b>" + i + "</b>: "+ feature.attributes[i] + "</li>";
html += "</ul>";
$('feature_info').innerHTML = html;
}
// -->
</script>
</head>
<body onload="init()">
<div id="info">
<ul>
<li>Streams: Feature Count <span id="stream_features">0</span></li>
<li>Plat: Feature Count <span id="plat_features">0</span></li>
<li>Roads: Feature Count <span id="road_features">0</span></li>
</ul>
<div id="feature_info">
</div>
<ul>
<li>
<input type="radio" name="type" value="selectRoad" id="selectToggle" onclick="toggleControl(this);" />
<label for="selectToggle">select road</label>
</li>
<li>
<input type="radio" name="type" value="selectPlat" id="selectToggle" onclick="toggleControl(this);" checked=checked />
<label for="selectToggle">select polygon</label>
</li>
</ul>
</div>
<div id="map"></div>
</body>
</html>

View File

@@ -0,0 +1,54 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 650px;
height: 550px;
border: 1px solid black;
}
</style>
<script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAKsGpqSOKkB-Ih2JopAmNbBTv_3ENzieGiNBMV02NiUJp8KZGIRTQWhul8K0wiNOHDxOF0-W2RmFoRg'></script>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
function init(){
// Variables
var map = new OpenLayers.Map('map', { controls: [] });
var lon = 35;
var lat = -6;
var zoom = 6;
var map, layer;
// Map Controls
map.addControl(new OpenLayers.Control.PanZoomBar());
map.addControl(new OpenLayers.Control.MouseToolbar());
map.addControl(new OpenLayers.Control.LayerSwitcher({'ascending':false}));
map.addControl(new OpenLayers.Control.MousePosition());
// Map Layers
var GMapsSat = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} );
var GMapsHybr = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_TYPE, 'maxZoomLevel':18} );
var GMapsStreets = new OpenLayers.Layer.Google( "Google Steets" , {type: G_NORMAL_MAP, 'maxZoomLevel':18} );
var MarkersLayer2 = new OpenLayers.Layer.Text( "Region info", {location: "outOfRangeMarkers.txt", maxResolution: 0.02});
// Add Layers
map.addLayers([GMapsHybr, GMapsStreets, GMapsSat, MarkersLayer2]);
// Visual
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
if (!map.getCenter()) map.zoomToMaxExtent();
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

View File

@@ -0,0 +1,3 @@
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

47
examples/overviewmap.html Normal file
View File

@@ -0,0 +1,47 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Overview Map Example</title>
<script src="../lib/OpenLayers.js" type="text/javascript"></script>
<style>
#map{
width:100%;
height:500px;
border:1px solid;
}
</style>
</head>
<body>
<div id="map"></div>
<script defer="defer" type="text/javascript">
var map = new OpenLayers.Map('map');
// my city
var constantina = new OpenLayers.LonLat(-5.6165,37.8623);
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
var nasa_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
"http://wms.jpl.nasa.gov/wms.cgi", {layers: "modis,global_mosaic"} );
map.addLayers([
nasa_wms,
wms
]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
var options = {
layers: [wms.clone()],
minRatio: 8,
maxRatio: 128
};
var overview = new OpenLayers.Control.OverviewMap(options);
map.addControl(overview);
map.setCenter(constantina, 4);
overview.maximizeControl();
</script>
</body>
</html>

90
examples/panel.html Normal file
View File

@@ -0,0 +1,90 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
.olControlPanel div {
display:block;
width: 24px;
height: 24px;
margin: 5px;
background-color:red;
}
.olControlPanel .olControlMouseDefaultsItemActive {
background-color: orange;
background-image: url("../../oterral/ButtonBar/vector/img/PanEnable.png");
}
.olControlPanel .olControlMouseDefaultsItemInactive {
background-color: orange;
background-image: url("../../oterral/ButtonBar/vector/img/PanDisable.png");
}
.olControlPanel .olControlDrawFeatureItemActive {
width: 22px;
height: 22px;
background-image: url("../../oterral/ButtonBar/vector/img/EditLineEnable.png");
}
.olControlPanel .olControlDrawFeatureItemInactive {
width: 22px;
height: 22px;
background-image: url("../../oterral/ButtonBar/vector/img/EditLineDisable.png");
}
.olControlPanel .olControlZoomBoxItemInactive {
width: 22px;
height: 22px;
background-color: blue;
}
.olControlPanel .olControlZoomBoxItemActive {
width: 22px;
height: 22px;
background-color: orange;
}
.olControlPanel .olControlZoomToMaxExtentItemInactive {
width: 18px;
height: 18px;
background-image: url("../img/zoom-world-mini.png");
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script src="../lib/Firebug/debug.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( 'map', { controls: [] } );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
vlayer = new OpenLayers.Layer.Vector( "Editable" );
map.addLayer(vlayer);
zb = new OpenLayers.Control.ZoomBox();
var panel = new OpenLayers.Control.Panel({defaultControl: zb});
panel.addControls([
new OpenLayers.Control.MouseDefaults(),
zb,
new OpenLayers.Control.DrawFeature(vlayer, OpenLayers.Handler.Path),
new OpenLayers.Control.ZoomToMaxExtent()
]);
map.addControl(panel);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
// -->
</script>
</head>
<body onload="init()">
<div id="panel"></div>
<div id="map"></div>
</body>
</html>

View File

@@ -47,7 +47,7 @@
popup = new OpenLayers.Popup.Anchored("chicken", popup = new OpenLayers.Popup.Anchored("chicken",
new OpenLayers.LonLat(5,40), new OpenLayers.LonLat(5,40),
new OpenLayers.Size(200,200), new OpenLayers.Size(200,200),
"example popup"); "example popup", true);
map.addPopup(popup); map.addPopup(popup);
} }
@@ -69,8 +69,17 @@
} }
function mousedown(evt) { function mousedown(evt) {
// check to see if the popup was hidden by the close box
// if so, then destroy it before continuing
if (popup != null) {
if (!popup.visible()) {
markers.map.removePopup(popup);
popup.destroy();
popup = null;
}
}
if (popup == null) { if (popup == null) {
popup = feature.createPopup(); popup = feature.createPopup(true);
popup.setContentHTML("<a href='http://www.somethingconstructive.net' target='_blank'>click me</a>"); popup.setContentHTML("<a href='http://www.somethingconstructive.net' target='_blank'>click me</a>");
popup.setBackgroundColor("yellow"); popup.setBackgroundColor("yellow");
popup.setOpacity(0.7); popup.setOpacity(0.7);

View File

@@ -20,7 +20,8 @@ url = fs.getvalue('url', "http://openlayers.org")
# Designed to prevent Open Proxy type stuff. # 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'] allowedHosts = ['www.openlayers.org', 'openlayers.org', 'octo.metacarta.com', 'merrimack.metacarta.com', 'labs.metacarta.com', 'world.freemap.in',
'prototype.openmnnd.org']
try: try:
host = url.split("/")[2] host = url.split("/")[2]

View File

@@ -0,0 +1,82 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 512px;
height: 350px;
border: 1px solid gray;
}
#controlToggle li {
list-style: none;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, drawControls, select;
function init(){
map = new OpenLayers.Map('map');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
var polygonLayer = new OpenLayers.Layer.Vector("Polygon Layer");
map.addLayers([wmsLayer, polygonLayer]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MousePosition());
drawControls = {
polygon: new OpenLayers.Control.DrawFeature(polygonLayer,
OpenLayers.Handler.Polygon),
select: new OpenLayers.Control.SelectFeature(polygonLayer),
hover: new OpenLayers.Control.SelectFeature(polygonLayer,
{hover: true})
};
for(var key in drawControls) {
map.addControl(drawControls[key]);
}
map.setCenter(new OpenLayers.LonLat(0, 0), 3);
}
function toggleControl(element) {
for(key in drawControls) {
var control = drawControls[key];
if(element.value == key && element.checked) {
control.activate();
} else {
control.deactivate();
}
}
}
// -->
</script>
</head>
<body onload="init()">
<h1>OpenLayers Draw Feature Example</h1>
<div id="map"></div>
<ul id="controlToggle">
<li>
<input type="radio" name="type" value="none" id="noneToggle"
onclick="toggleControl(this);" checked="checked" />
<label for="noneToggle">navigate</label>
</li>
<li>
<input type="radio" name="type" value="polygon" id="polygonToggle"
onclick="toggleControl(this);" />
<label for="polygonToggle">draw polygon</label>
</li>
<li>
<input type="radio" name="type" value="select" id="selectToggle"
onclick="toggleControl(this);" />
<label for="selectToggle">select polygon on click</label>
</li>
<li>
<input type="radio" name="type" value="hover" id="hoverToggle"
onclick="toggleControl(this);" />
<label for="hoverToggle">select polygon on hover</label>
</li>
</ul>
</body>
</html>

View File

@@ -0,0 +1,22 @@
<html>
<head>
<script>
function set() {
if (document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#SVG", "1.1") ) {
document.getElementById("svg11").style.background="green";
}
if (document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#SVGDOM", "1.1") ) {
document.getElementById("svgdom").style.background="green";
}
}
</script>
</head>
<body onload="set()">
Vector Support:
<br />
Supports SVG 1.1: <div id="svg11" style="width:100px;height:100px;background-color:red"></div>
<br />
Supports SVG DOM: <div id="svgdom" style="width:100px;height:100px;background-color:red"></div>
</body>
</html>

View File

@@ -1,4 +1,4 @@
point title description iconSize point title description icon
10,20 my orange title my orange description 21,25 10,20 my orange title my orange description
2,4 my aqua title my aqua description 21,25 2,4 my aqua title my aqua description
42,-71 my purple title my purple description<br/>is great. 21,25 42,-71 my purple title my purple description<br/>is great. http://www.openlayers.org/api/img/zoom-world-mini.png

45
examples/tms.html Normal file
View File

@@ -0,0 +1,45 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( 'map', {maxResolution:1.40625/2} );
layer = new OpenLayers.Layer.TMS( "TMS",
"http://labs.metacarta.com/wms-c/Basic.py/", {layername: 'basic', type:'png'} );
map.addLayer(layer);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
}
function addTMS() {
l = new OpenLayers.Layer.TMS(
OpenLayers.Util.getElement('layer').value,
OpenLayers.Util.getElement('url').value,
{
'layername': OpenLayers.Util.getElement('layer').value,
'type': OpenLayers.Util.getElement('type').value
});
map.addLayer(l);
map.setBaseLayer(l);
}
// -->
</script>
</head>
<body onload="init()">
URL of TMS (Should end in /): <input type="text" id="url" size="60" /> layer_name <input type="text" id="layer" /> <select id="type"><option>png</option><option>jpg</option></select> <input type="submit" onclick="addTMS()"/><br />
Example: http://mapserver.refractions.net/cgi-bin/tms/, global_mosaic, jpg
<div id="map"></div>
</body>
</html>

View File

@@ -21,7 +21,7 @@
var map, velayer, layer; var map, velayer, layer;
function init(){ function init(){
map = new OpenLayers.Map( $('map') , map = new OpenLayers.Map( 'map' ,
{controls:[new OpenLayers.Control.MouseDefaults()]}); {controls:[new OpenLayers.Control.MouseDefaults()]});
velayer = new OpenLayers.Layer.VirtualEarth( "VE", velayer = new OpenLayers.Layer.VirtualEarth( "VE",

View File

@@ -0,0 +1,79 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map;
function init(){
map = new OpenLayers.Map( $('map') );
var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
var style_blue = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
style_blue.strokeColor = "blue";
style_blue.fillColor = "blue";
var style_green = {
strokeColor: "#00FF00",
strokeOpacity: 1,
strokeWidth: 3,
pointRadius: 6,
pointerEvents: "visiblePainted"
};
var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry");
// create a point feature
var point = new OpenLayers.Geometry.Point(-111.04, 45.68);
var pointFeature = new OpenLayers.Feature.Vector(point,null,style_blue);
// create a line feature from a list of points
var pointList = [];
var newPoint = point;
for(var p=0; p<5; ++p) {
newPoint = new OpenLayers.Geometry.Point(newPoint.x + Math.random(1),
newPoint.y + Math.random(1));
pointList.push(newPoint);
}
var lineFeature = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.LineString(pointList),null,style_green);
// create a polygon feature from a linear ring of points
var pointList = [];
for(var p=0; p<6; ++p) {
var a = p * (2 * Math.PI) / 7;
var r = Math.random(1) + 1;
var newPoint = new OpenLayers.Geometry.Point(point.x + (r * Math.cos(a)),
point.y + (r * Math.sin(a)));
pointList.push(newPoint);
}
pointList.push(pointList[0]);
var linearRing = new OpenLayers.Geometry.LinearRing(pointList);
var polygonFeature = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Polygon([linearRing]));
map.addLayer(vectorLayer);
map.setCenter(new OpenLayers.LonLat(point.x, point.y), 5);
vectorLayer.addFeatures([pointFeature, lineFeature, polygonFeature]);
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
<p>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.</p>
</body>
</html>

44
examples/webcam.html Normal file
View File

@@ -0,0 +1,44 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
p {
width: 512px;
}
#map {
width: 640px;
height: 480px;
border: 1px solid gray;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map;
function init(){
map = new OpenLayers.Map('map',
{maxExtent: new OpenLayers.Bounds(0, 0, 640, 480)});
var options = {maxResolution: 'auto', numZoomLevels: 3};
var webcam = new OpenLayers.Layer.Image(
'OL Webcam',
'http://crschmidt.net/~crschmidt/openlayers.jpg',
new OpenLayers.Bounds(0, 0, 640, 480),
new OpenLayers.Size(640, 480),
options);
map.addLayers([webcam]);
map.zoomToMaxExtent();
window.setInterval(refresh, 10000, webcam);
}
function refresh(layer) {
layer.moveTo(layer.map.getExtent(), true);
}
// -->
</script>
</head>
<body onload="init()">
<h1>OpenLayers Webcam</h1>
<div id="map"></div>
</body>
</html>

View File

@@ -0,0 +1,79 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 100%;
height: 80%;
border: 1px solid black;
}
</style>
<title>Scribble on a WFS</title>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
function init(){
map = new OpenLayers.Map( $('map'), {controls: [ new OpenLayers.Control.PanZoom(), new OpenLayers.Control.Permalink() ]} );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms-c/Basic.py",
{layers: 'basic'} );
map.addLayer(layer);
layer = new OpenLayers.Layer.WFS( "Scribble WFS",
"/geoserver/wfs",
{ typename: 'topp:line' },
{
typename: 'line',
featureNS: 'http://www.openplans.org/topp',
extractAttributes: false
} );
map.addLayer(layer);
var p = new OpenLayers.Control.Panel({'displayClass': 'olControlEditingToolbar'});
df = new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Path, {handlerOptions: {'freehand': false}, 'displayClass': 'olControlDrawFeaturePath'});
df.featureAdded = function(feature) {
feature.state = OpenLayers.State.INSERT;
feature.style['strokeColor'] = "#ff0000";
feature.layer.drawFeature(feature);
}
p.addControls([ new OpenLayers.Control.Navigation(), df ]);
map.addControl(p);
p.activateControl(p.controls[0])
map.setCenter(new OpenLayers.LonLat(0,0), 3);
}
function save() {
for(var i = 0; i < map.layers[1].features.length; i++) {
var f = map.layers[1].features[i];
f.style['strokeColor'] = '#ee9900';
map.layers[1].drawFeature(f);
}
map.layers[1].commit();
return false;
}
function serialize(type) {
var xmls = new XMLSerializer();
var serialize = new OpenLayers.Format[type]({},map.layers[1]);
var data = serialize.write(map.layers[1].features);
$('serialize').value = xmls.serializeToString(data);
$('serialize').style.display='block';
}
</script>
</head>
<body onload="init()">
<h2>Draw Lines, Save to GeoServer</h2>
<p>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!<br />
Hold shift to turn on freehand mode while drawing.</p>
<div style="float:right; text-align:right;">
<a href="#serialize" onclick="serialize('WFS')">Show WFS Transaction</a> |
<a href="#serialize" onclick="serialize('GML')">Export GML</a> |
<a href="#serialize" onclick="serialize('GeoRSS')">Export GeoRSS</a> |
<a href="#" onclick="return save()">Save</a> |
<a href="#" onclick="map.layers[1].refresh(); return false">Refresh</a> (removes all newly added lines)</div><br />
<div id="map"></div>
<textarea style="display:none" id="serialize" cols="100" rows="10">
</textarea>
</body>
</html>

36
examples/wfs-states.html Normal file
View File

@@ -0,0 +1,36 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 100%;
height: 80%;
border: 1px solid black;
}
</style>
<title>WFS: United States (GeoServer)</title>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
var map, layer;
function init(){
OpenLayers.ProxyHost="/cgi-bin/proxy.cgi?url=";
map = new OpenLayers.Map( $('map'), {controls: [ new OpenLayers.Control.PanZoom(), new OpenLayers.Control.Permalink(), new OpenLayers.Control.MouseDefaults() ]} );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms-c/Basic.py",
{layers: 'basic'} );
map.addLayer(layer);
layer = new OpenLayers.Layer.WFS( "States WFS",
"/geoserver/wfs",
{ typename: 'topp:states' } );
map.addLayer(layer);
map.zoomToExtent(new OpenLayers.Bounds(-140.444336,25.115234,-44.438477,50.580078));
}
</script>
</head>
<body onload="init()">
<h2>GeoServer WFS</h2>
<div id="map"></div>
</body>
</html>

71
examples/wfs-t.html Normal file
View File

@@ -0,0 +1,71 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 800px;
height: 475px;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, layer;
function init(){
map = new OpenLayers.Map( $('map') );
layer = new OpenLayers.Layer.WMS( "State",
"http://dev.openlayers.org/geoserver/wms", {layers: 'topp:tasmania_state_boundaries'} );
map.addLayer(layer);
layer = new OpenLayers.Layer.WMS( "Water",
"http://dev.openlayers.org/geoserver/wms", {layers: 'topp:tasmania_water_bodies', 'transparent': true, format: 'image/gif' } );
map.addLayer(layer);
rlayer = new OpenLayers.Layer.WFS( "Roads",
"http://dev.openlayers.org/geoserver/wfs", {typename: 'topp:tasmania_roads'},
{
typename: 'tasmania_roads',
featureNS: 'http://www.openplans.org/topp',
extractAttributes: false
} );
rlayer.onFeatureInsert=function(feature) { feature.style.strokeColor = "#ff0000"; feature.layer.drawFeature(feature); }
map.addLayer(rlayer);
layer = new OpenLayers.Layer.WFS( "Cities",
"http://dev.openlayers.org/geoserver/wfs", {typename: 'topp:tasmania_cities'},
{
typename: 'tasmania_cities',
featureNS: 'http://www.openplans.org/topp',
extractAttributes: false
} );
map.addLayer(layer);
map.addControl(new OpenLayers.Control.LayerSwitcher());
var p = new OpenLayers.Control.Panel({'displayClass': 'olControlEditingToolbar'});
df = new OpenLayers.Control.DrawFeature(rlayer, OpenLayers.Handler.Path, {handlerOptions: {'freehand': false}, 'displayClass': 'olControlDrawFeaturePath'});
df.featureAdded = function(feature) {
feature.state = OpenLayers.State.INSERT;
feature.style['strokeColor'] = "#0000ff";
feature.layer.drawFeature(feature);
}
dp = new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Point, {handlerOptions: {'freehand': false}, 'displayClass': 'olControlDrawFeaturePoint'});
dp.featureAdded = function(feature) {
var oldgeom = feature.geometry;
feature.layer.renderer.eraseGeometry(oldgeom);
feature.geometry = new OpenLayers.Geometry.MultiPoint(oldgeom);
feature.state = OpenLayers.State.INSERT;
feature.style['strokeColor'] = "#0000ff";
feature.layer.drawFeature(feature);
}
p.addControls([ new OpenLayers.Control.Navigation(), df, dp ]);
map.addControl(p);
map.zoomToExtent(new OpenLayers.Bounds(145.51045,-44.0,149.0,-40.5));
}
// -->
</script>
</head>
<body onload="init()">
<a href="#" onclick="map.layers[2].commit();return false">Save Roads</a><br />
<a href="#" onclick="map.layers[3].commit();return false">Save Cities</a><br />
<div id="map"></div>
</body>
</html>

152
examples/wkt.html Normal file
View File

@@ -0,0 +1,152 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>WKT</title>
<style type="text/css">
#info {
position: absolute;
top: 70px;
left: 550px;
width: 350px;
}
#map {
width: 512px;
height: 350px;
border: 1px solid gray;
}
#controls {
width: 512px;
}
#wktInput {
float: right;
}
#controlToggle {
padding-left: 1em;
}
#controlToggle li {
list-style: none;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var map, vectors, drawControls, wkt;
function init(){
map = new OpenLayers.Map('map');
var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
vectors = new OpenLayers.Layer.Vector("Vector Layer");
map.addLayers([wms, vectors]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.MousePosition());
var options = {
hover: true,
onSelect: displayWKT
};
drawControls = {
point: new OpenLayers.Control.DrawFeature(vectors,
OpenLayers.Handler.Point),
line: new OpenLayers.Control.DrawFeature(vectors,
OpenLayers.Handler.Path),
polygon: new OpenLayers.Control.DrawFeature(vectors,
OpenLayers.Handler.Polygon),
hover: new OpenLayers.Control.SelectFeature(vectors, options)
};
for(var key in drawControls) {
map.addControl(drawControls[key]);
}
wkt = new OpenLayers.Format.WKT();
map.setCenter(new OpenLayers.LonLat(0, 0), 3);
document.getElementById('noneToggle').checked = true;
}
function toggleControl(element) {
for(key in drawControls) {
var control = drawControls[key];
if(element.value == key && element.checked) {
control.activate();
} else {
control.deactivate();
}
}
}
function displayWKT(feature) {
var str = wkt.write(feature);
// not a good idea in general, just for this demo
str = str.replace(/,/g, ', ');
document.getElementById('info').innerHTML = str;
}
function parseWKT() {
var element = document.getElementById('wkt');
var features = wkt.read(element.value);
var bounds;
if(features) {
if(features.constructor != Array) {
features = [features];
}
for(var i=0; i<features.length; ++i) {
if (!bounds) {
bounds = features[i].geometry.getBounds();
} else {
bounds.extend(features[i].geometry.getBounds());
}
}
vectors.addFeatures(features);
map.zoomToExtent(bounds);
var plural = (features.length > 1) ? 's' : '';
element.value = 'Feature' + plural + ' added'
} else {
element.value = 'Bad WKT';
}
}
// -->
</script>
</head>
<body onload="init()">
<h1>OpenLayers WKT Example</h1>
<div id="info"></div>
<div id="map"></div>
<div id="controls">
<p>See <a href="http://en.wikipedia.org/wiki/Well-known_text#Geometric_Objects">Wikipedia</a>
for a description and examples of WKT.</p>
<div id="wktInput">
<textarea id="wkt" rows="6" cols="30">paste WKT here...</textarea>
<br />
<input type="button" value="add feature" onclick="parseWKT();" />
</div>
<ul id="controlToggle">
<li>
<input type="radio" name="type" value="none" id="noneToggle"
onclick="toggleControl(this);" checked="checked" />
<label for="noneToggle">navigate</label>
</li>
<li>
<input type="radio" name="type" value="point" id="pointToggle" onclick="toggleControl(this);" />
<label for="pointToggle">draw point</label>
</li>
<li>
<input type="radio" name="type" value="line" id="lineToggle" onclick="toggleControl(this);" />
<label for="lineToggle">draw line</label>
</li>
<li>
<input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);" />
<label for="polygonToggle">draw polygon</label>
</li>
<li>
<input type="radio" name="type" value="hover" id="hoverToggle"
onclick="toggleControl(this);" />
<label for="hoverToggle">view WKT for feature</label>
</li>
</ul>
</div>
</body>
</html>

34
examples/wms-untiled.html Normal file
View File

@@ -0,0 +1,34 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#map {
width: 100%;
height: 100%;
border: 1px solid black;
}
</style>
<script src="../lib/OpenLayers.js"></script>
<script type="text/javascript">
<!--
var lon = 5;
var lat = 40;
var zoom = 5;
var map, layer;
function init(){
map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS.Untiled( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
map.addControl( new OpenLayers.Control.LayerSwitcher() );
}
// -->
</script>
</head>
<body onload="init()">
<div id="map"></div>
</body>
</html>

View File

@@ -16,7 +16,7 @@
var map, layer; var map, layer;
function init(){ function init(){
map = new OpenLayers.Map( $('map') ); map = new OpenLayers.Map( 'map' );
layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
map.addLayer(layer); map.addLayer(layer);

Some files were not shown because too many files have changed in this diff Show More