Commit Graph

96 Commits

Author SHA1 Message Date
Schuyler Erle
db17be34f6 Change repo license to release license.
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.4-rc1@3001 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-04-04 04:41:04 +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
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
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
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
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
Schuyler Erle
95ec8bdc82 Update Layer classes to use new Class.create/inherit functions.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1649 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-06 15:33:29 +00:00
Schuyler Erle
407604cc35 Set the new layer.grid to a new Array object, rather than null, in Layer.Grid.clone(). Passes all tests. Fixes #203.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1616 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-10-05 21:04:28 +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
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
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
6793507a34 for case with no buffer, check lower bounds
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1437 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-09-13 05:28:53 +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
0f9a02bf61 no longer need to worry about grid moving around when it's invisible.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1251 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 18:14:10 +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
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
0f9065cd11 clean up code a wee lite bit in the initGrid() function... then remove the draw() call and change the moveTo() call to not trigger a redraw() on the tile. This way the initTiles() goes through and configures the tiles with everything they need... but without actually redrawing them. Then we add the spiralTileLoad() function which will go through and actually trigger the redraw on the tiles, but in that spiraling outwards way
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1199 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-12 15:58:25 +00:00
crschmidt
6efaf328e5 Commit scale-based methods back into trunk. Layers or Maps now support setting
a list of scales or resolutions in the options to the constructor, from which
resolutions are calculated. Map now has a 'setScale' function which will allow
you to zoom to as close to a given scale as possible.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1171 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 19:14:16 +00:00
crschmidt
fb3ff32919 Grid.js no longer uses the 'newGrid' variable.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1157 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 13:39:10 +00:00
euzuro
bc6b2e690d copy/paste bug
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1153 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 06:20:51 +00:00
euzuro
3d13e1f60d coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1152 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 06:20:01 +00:00
euzuro
960a70ec07 use new clearGrid()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1151 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 06:15:32 +00:00
euzuro
3b929fd7a2 clean up clearGrid()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1150 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 06:14:05 +00:00
euzuro
b262f2fb71 hack hack hack
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1146 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 04:41:21 +00:00
euzuro
f339e3a93d hash -> hashtable and Hash -> Object -- let there be no confusion, we are *not* using prototype
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1144 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 04:36:39 +00:00
crschmidt
bc780edcec Fix test failures by changing the failover mode to check for existince of needed variables rather than storing 'newGrid'
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1141 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 04:18:18 +00:00
crschmidt
0ba7961df4 Commit tile-reuse branch back to trunk. This branch offers numerous performance
improvements in the form of reduced memory use and lower element creating costs,
hopefully making the OpenLayers code more usable in internet explorer as well
as less of a memory hog in Firefox and other browsers. Additionally, a buffer
is available around the main map grid which allows tiles to be loaded outside
of the viewing area for faster dragging.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1137 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 03:47:33 +00:00
euzuro
51ac2b4acf remove useless or duplicate functions from Util.js -- no more: Array prepend() append() -- use push() and unshift(). clear() and indexOf() both removed as they are duplicated in Prototype.js -- all instances replaced and tests updated.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1136 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 03:31:06 +00:00
euzuro
f3a072b151 new layerswitcher, improved google layer, boxes layer, grid fix
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1096 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-08 18:20:24 +00:00
crschmidt
adc561b38f When panning by large distances, OpenLayers previously created all the grid
space inbetween. This no longer happens -- instead, the grid will re-init if 
the bounds is not at least partially contained by the existing box.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@1074 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-03 17:27:47 +00:00
euzuro
3962b0a814 fixed tabs, multiple return (coding standards)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1010 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-26 14:42:50 +00:00
euzuro
96c3720aab protect for null bounds (not-loaded map)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@993 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-21 18:22:37 +00:00
euzuro
2e67a6aedf add getTile() function to Grid.js. with tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@981 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-19 15:20:25 +00:00
euzuro
e91d0546ee replace all usage of copyOf() with clone(). Now copyOf() is officially deprecated and unused. supported only if users out there have used it, but we can phase it out in the next official release.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@961 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-18 11:56:13 +00:00
euzuro
fa090a0826 clear the grid if not visible
git-svn-id: http://svn.openlayers.org/trunk/openlayers@958 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-17 13:09:39 +00:00
euzuro
3776a5d729 establish generic getExtent() function in Layer. Move resolution-based calculation up into Grid.js. This prevents infinite loops and is more useful to generic layers like Gmaps, VE, etc.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@950 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-16 16:55:20 +00:00
euzuro
a6870c66b0 grid's moveTo should also accept 'minor' even though it won't do anything with it.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@928 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-11 01:12:47 +00:00
euzuro
0144ee66ab fix the require
git-svn-id: http://svn.openlayers.org/trunk/openlayers@905 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 15:39:10 +00:00
euzuro
19adc2b155 require httprequest, not layer
git-svn-id: http://svn.openlayers.org/trunk/openlayers@904 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 15:27:03 +00:00
euzuro
aa30c9cae4 switch order of superclass.clone() (as in r901). then make sure that tileSize gets copied using copyOf(), and that the reference to the old grid does not get carried over.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@902 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 13:03:27 +00:00
euzuro
c13f7f5d4d copy the actual tileSize object, not just the reference.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@900 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 12:47:09 +00:00
euzuro
3d52b3e4c5 nullify all Grid-specific values. just for good measure
git-svn-id: http://svn.openlayers.org/trunk/openlayers@899 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 12:29:45 +00:00
euzuro
7f5ea40aca change function to use bl / tr
git-svn-id: http://svn.openlayers.org/trunk/openlayers@897 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 11:59:39 +00:00
euzuro
7b80623c5c update comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@896 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 10:46:57 +00:00
euzuro
90933052aa give Grid a clone() function.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@894 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 02:19:04 +00:00
euzuro
43e1788f6f coding standards - no multiple returns
git-svn-id: http://svn.openlayers.org/trunk/openlayers@892 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 02:02:03 +00:00
euzuro
24503103b3 rearranging order of some functions, marking some of them private
git-svn-id: http://svn.openlayers.org/trunk/openlayers@891 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 01:57:53 +00:00