Commit Graph

167 Commits

Author SHA1 Message Date
crschmidt
7232cfa3a0 Pull up patches for the following bugs from trunk:
#385: building for windows users (fix license)
#453: IE gives new DOM elements a parent with fragment node type
#454: Fix tests which are breaking in Opera
#455: Util.isEquivalentUrl broken in Opera
#463: map.setBaseLayer is a bit funky
#464: Overview Map dissappears when on permalinked page
#465: allow controls to live outside viewport (for real)
#466: HTMLDivElement is still undefined in IE7 (but 
      OpenLayers.Util.alphaHack() is now false)
#467: isEquivalentURL() not complete for IE
#468: Overview MapLosing Rectangle
#469: Default marker is incorrectly centered
#470: Can not use "search" property IE7
#473: Remove call to checkImgURL
#474: overview map isn't properly updated when the argparser kicks in


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.3@2181 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-01-22 23:26:32 +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
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
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
b1490cf7a9 Use calculateBounds function from patch on #228. This is a refactoring of the
code that Tim Schaub contributed on that patch. Thanks Tim!


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1702 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-17 22:23:19 +00:00
crschmidt
7c2a8a0cab The OpenLayers server threw a disk, and clobbered another, resulting in a loss
of data up to our last backup. In the previous subversion repository, this was
r1694->r1777. I'm sorry to all those of you who might have checked out that 
code, as this will surely cause problems for you. We're currently working to
figure out what went wrong, and how to prevent it in the future.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1695 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-13 20:41:21 +00:00
euzuro
9b73a9a4c9 if there is no old base layer, dont try to get the zoom from it
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1655 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-06 16:17:10 +00:00
crschmidt
7e5cd23ad0 Commit changes to code for skinning, including doc/customization, which
documents the class style naming for OL, although it isn't implemented yet,
so that we have a standard to work against. Update release scripts, tests,
and create a 'theme' directory which will hold theme information as it is
developed.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1639 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-06 04:03:58 +00:00
euzuro
5364ce73e5 break permalink into two controls: permalink and argparser. make the arg parser a default control that is added to the map. furthermore, make it such that on addition to the map, the permalink will hunt through the maps controls to make sure there is an argparser control loaded, and if not it will load one itself. now we add a new parameter to the permalink suite: 'layer'. the application will now save the layer visibility information. finally, update tests so nothing breaks.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1634 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-06 03:28:53 +00:00
euzuro
99ea5db027 only draw the layer when it needs to be drawn
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1625 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-06 02:16:40 +00:00
euzuro
5d4ba864dc move addlayer event trigger to after the baselayer has been set
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1619 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 23:17:54 +00:00
Schuyler Erle
bf075e63e0 Add Layer.setZIndex so that layers can add behavior when their div's z-index changes. Also, change Map.setLayerZIndex() to use it.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1611 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 20:34:21 +00:00
euzuro
46b0402b0b oops. need to show/hide the layer when we change it.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1609 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 20:11:53 +00:00
euzuro
ad545a0280 only move the visible and in range layers. the rest can redraw themselves when they come back into the picture.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1608 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 20:07:42 +00:00
euzuro
2b7c6cc844 refactor range checking into map and store a state variable in layer so that we dont fire changelayer every time user zooms
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1606 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 19:32:07 +00:00
Schuyler Erle
fee4d6f973 Add map.getNumLayers(), map.getLayerIndex(), map.setLayerIndex(), map.raiseLayer() to support moving layers up and down in the map stack.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1604 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 19:07:19 +00:00
euzuro
07ef71b7b0 Array.indexOf(), though implemented in FF, is not standard javascript. we replace it with OpenLayers.Util.indexOf(), replace all usage
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1596 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 16:28:24 +00:00
Schuyler Erle
d81c2f0187 Test for the presence of OpenLayers.Control before attempting to load controls. Makes it possible to run Map.js in the lightweight version.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1595 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 15:55:47 +00:00
Schuyler Erle
4739147a2f Removed modifications to Array.prototype and moved them into OL.Util instead. All tests pass.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1590 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 15:18:02 +00:00
Schuyler Erle
67ced536c0 Merged r1559:r1587 from source:/sandbox/crschmidt/noprototype. OpenLayers is now Prototype-free(tm).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1588 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 14:50:47 +00:00
euzuro
33c37ef78b fix for #191 - graceful dealing with setCenter() on lonlat out of maxexteng (on first setcenter() call). added test
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1585 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 06:20:47 +00:00
euzuro
1414f0f656 fix for #182 and #262 -- pick the best new resolution when changing baselayers, instead of just using the same index into the resolutions array.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1581 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 05:06:33 +00:00
euzuro
510ab8561c add a new property to layer.js called 'visibility' which we now need to store instead of reading directly from the visiblity of the div itself, since the div might be hidden, but only because it is out of range. we thus add a new method on layer called inRange() which returns whether or not the layer's max/min resolution settings allow it to be displayed at the current map's resolution. to make sure that min/max resolution, scale, etc are set for *all* layers, we remove the if statement limiting the running of initResolution() to only baselayers, and we add code at the end of that function that, once the resolutions array has been calculated, then goes back and sets min/max scale and resolution. now what we have to do is every time moveTo() is called on a layer, if the zoom has changed, then we must check if the layer is inRange() and update the display accordingly. on that same note, the layerswitcher must now be attentive to these changes, so we set it to redraw every time the zoom changes. in the layerswitcher code, we now add special code to disable a layer if it is out of range. must add the superclass call to moveTo() for all of the layers to ensure this code is executed for all. update test.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1577 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 04:20:16 +00:00
euzuro
0adeb2670d changing 'minor' parameter name to 'dragging' for consistency
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1538 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-03 04:35:04 +00:00
euzuro
cab24b665d update map's getScale() to use getScaleFromResolution()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1536 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-03 03:45:00 +00:00
euzuro
0565566118 coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1512 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-28 06:48:27 +00:00
euzuro
3b60032995 use new functions from r1506.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1507 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-27 20:56:42 +00:00
euzuro
2255e7d56c update comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1505 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-26 23:57:35 +00:00
euzuro
e658877014 return a copy of the mapsize, not the mapsize itself. this will hopefully prevent some nasty bugs.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1504 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-26 23:54:59 +00:00
crschmidt
003f00bc22 *Always test before committing*. One of these days, I will teach myself to
be a diligent committer. I promise.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1500 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-22 13:55:10 +00:00
crschmidt
dabba5ef41 We've had a number of problems related to browsers complaining on this line.
The popups go away, then cause:
[Exception... "Node was not found" code: "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)" location: "/lib/OpenLayers.js Line: 7663"]
This will hopefully silence the exception. 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1499 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-22 13:51:08 +00:00
euzuro
5bd2c55610 reorder logic of test for isNaN so that if viewPortPx is null to start with we dont bomb out with error
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1495 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-20 09:51:21 +00:00
euzuro
34dfbef5a5 fix for dynamic resizing
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1487 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-19 17:08:43 +00:00
Schuyler Erle
c0fc945824 In Map.setCenter, only call Layer.moveTo if Layer.getVisibility returns true.
In Layer.setVisibility, call Layer.moveTo with zoomChanged = true, so that the
grid tiles are reloaded. In an ideal world, the grid tiles would only be loaded
if they haven't been loaded yet. This would spare us the split second wait
while the browser reloads those images from the cache, but we want to release
today, so it'll have to wait.



git-svn-id: http://svn.openlayers.org/trunk/openlayers@1448 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-14 16:16:50 +00:00
crschmidt
c5afbacc93 Add scoping term. Thanks to tschaub, closes #261 .
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1441 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-14 11:39:32 +00:00
euzuro
693eab5cc9 added getZoomForResolution() to map & layer. partial fix for #204 -- need to make a getZoomForResolution() for OpenLayers.Layer.FixedZoomLevels
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1382 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-26 10:26:12 +00:00
euzuro
f582775d11 - Removed unnecessary accessors from OpenLayers.Layer: getProjection(),
getMaxExtent(), getMaxResolution(), and getNumZoomLevels(). They were just 
   wrapping around the properties. better to just access the property directly. 
   Needed to update for these removals in many different files. 

- Improved initResolutions() functionality. It is now I believe both thorough
   and complete. The only exception is that we should maybe allow a way for 
   the user to set up resolutions[] array using only minResolution and 
   numZoomLevels instead of only maxResolution and numZoomLevels... but I'm not
   really sure anyone would ever really want to use that. And at any rate, I
   don't know the math for how to do it. I'm sure schuyler or Dr. 5 would.
   Oh. for a summary of how initResolutions works, see:
   http://trac.openlayers.org/wiki/SettingZoomLevels

- Move getResolution(), initResolutions() out of HTTPRequest and into Layer. On 
   thinking this through (and trying to write documentation), I realized that 
   the real, true, GENERIC case for a layer will be using this awesome 
   resolutions[] array that allows for setting number of zoom levels, default 
   max resolutions, special scale arrays, etc. 

- Updated code for getZoomForExtent() to work with resolutions[] array, instead 
   of using the the log 2 equation. 

- Move standard getZoomForExtent() and getExtent() out of Grid and into 
   Layer. Like above, there is no reason for these methods to be found so far
   down in the food chain. They are part of the generic calculations for 
   generic layers, so they belong in Layer. 



git-svn-id: http://svn.openlayers.org/trunk/openlayers@1379 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-26 02:51:38 +00:00
crschmidt
104e509eb9 Merge 2.0 branch to trunk.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1369 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-25 18:17:06 +00:00
euzuro
7bf1112c81 remove reproject() method which was sort of silly anyways -- i think the ve/goog marker misplacement problem was that the layercontainerdiv was not being correctly reset on a changebaselayer. so im changing the setbaselayer() to auto call setCenter() with a new zoom (by nulling the zoom beforehand and passing in the current zoom).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1259 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 21:36:23 +00:00
euzuro
4f3641606b baselayer needs to do a total redraw
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1250 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 18:13:23 +00:00
euzuro
15d3d9fc21 do not update invisible baselayers as the user navigates around. only update them when they are made visible.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1239 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 15:53:33 +00:00
euzuro
f3c12c729d remove deprecated methods for 2.0 release. Documentation available at ReleaseNotes2.0
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1228 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 02:26:12 +00:00
euzuro
3f19fdd490 fix for #168 - getScale() thanks for great patch from Tim Schaub
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1227 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 01:09:42 +00:00
crschmidt
ae02671983 Don't ever return NaN from getLayerContainerPxFromViewPortPx, since that
can cause problems in multiple different layers -- instead, just return 
null, which is handled more gracefully.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1219 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-15 16:11:58 +00:00
euzuro
c1b8c8dd60 change the '@require:' to '@requires' so as to be compatible with JSDOC standards. put these directly inside the class definition comment block. update script to suggest this and update all source files to follow pattern. Caught a missing @requires in the EventPane.js file
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1206 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-14 23:05:05 +00:00
euzuro
841fdcbfb3 split Util.js into two files. BaseTypes.js will contain all the OL Base types, such as Pixel, LonLat, Bounds, etc., as well as all the standard javascript basetypes (string, number, etc) extensions. All else remains in Util.js. In theory I have fixed all dependencies. If this doesn't work, I'll rollback.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1205 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-14 21:49:19 +00:00
euzuro
2a496c840c rename setScale() to zoomToScale() and move it down a few lines in the code
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-12 16:23:01 +00:00
crschmidt
c7e43b67f3 We removed support for this from Map unneccesarily.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1177 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 23:20:50 +00:00
Schuyler Erle
d76e18ac65 Fix the dreaded resize bug so that the map recenters automatically when relatively-sized map divs change size.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1174 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 21:17:06 +00:00
Schuyler Erle
1b26e9cb69 Differentiated the z-index base of base layers versus popups.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1173 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 20:47:07 +00:00