Commit Graph

52 Commits

Author SHA1 Message Date
euzuro
6e9ba61679 make an accessor for setting isBaseLayer, because we need to trigger the 'changelayer' (assuming our layer has already been added to a map)
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1324 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-22 00:23:43 +00:00
euzuro
17581c714d Remove the concept of min/max zoom level from Map. Replace it with concept of num zoom levels. Bit of rearrangement in the initResolutions() function in HTTPRequest.js. Adapt all of OL to deal with numZoomLevels instead of min/max. Fix PanZoomBar so that it listens for change of baselayer and redraws itself. fix all tests so they pass. Add zoomLevels.html example for playing around with different methods of setting zoomlevels.
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1302 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-19 02:09:29 +00:00
euzuro
1a0cbdfd25 add comment
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1294 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-17 19:34:10 +00:00
euzuro
b1cfe16347 superfluous comment
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1282 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-17 16:41:17 +00:00
euzuro
9d3aea6a2f getResolution() is only to be called on a baselayer, so no need to ask the map to getExtent() -- we just ask ourselves
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1281 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-17 16:21:51 +00:00
euzuro
5ffbe842c2 update map resize functionality to deal with google layer. if ve had a similar checkResize() function, then we would be able to safely resize an OL map with a ve layer in it as well. unfortunately, this is not the case. a bug report i am gonna file
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1275 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-17 05:52:07 +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
748234606e it's redundant for applyDefaults() to return anything. thx tschaub
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1255 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-16 19:16:46 +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
b6a8ead478 useless comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1202 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-12 17:40:37 +00:00
Schuyler Erle
45bea9f9f4 Fix in Layer.setName for test failure caused by r1188.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1191 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-10 21:41:13 +00:00
euzuro
a6af08b092 fix for #120
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1188 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-10 06:08:34 +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
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
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
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
euzuro
620cebb79c add a 'changelayer' event that fires when a layer's visibility changes. listen for this in the layerswitcher
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1050 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-02 16:08:09 +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
9a5f6c8d33 start tile & layer id's with standard strings, to avoid funky characters when later these ids are used as parameters
git-svn-id: http://svn.openlayers.org/trunk/openlayers@983 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-19 17:09:18 +00:00
euzuro
f71f3d0cfb give layer a unique id. udpate tests
git-svn-id: http://svn.openlayers.org/trunk/openlayers@977 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-19 14:30:46 +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
e0e5dd544b update comment, adding 'minor' param
git-svn-id: http://svn.openlayers.org/trunk/openlayers@934 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-11 14:55:50 +00:00
euzuro
63e0242ca9 update comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@933 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-11 14:54:34 +00:00
euzuro
5debdb69ec make sure clone() of a layer does not copy the reference in the 'map' property. that should always be null as a cloned layer will still need to be added to the map via map.addLayer()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@887 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 01:02:02 +00:00
euzuro
96a32e8fb0 make a safe copy of options on initialization, utilize applyDefaults() on clone to pick up stray addons. dont need the if in addOptions, as extend can safely handle a null source
git-svn-id: http://svn.openlayers.org/trunk/openlayers@884 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-05 15:31:08 +00:00
euzuro
23c2ea1c04 set all properties of layer to null on destroy. add test.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@883 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-04 23:55:34 +00:00
euzuro
63e0b37c67 lets have clone() just take no arguments and return an exact copy. then we can add modify functions that can be used to set the particular things the user wants changed, and s/he can do it him/herself. also a change here is that layer.options will always be initialized, never null.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@882 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-04 17:48:50 +00:00
euzuro
199ad05b5c readability, setting precedent.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@881 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-04 17:00:52 +00:00
euzuro
f528178e53 add clone() method to Layer class, add test.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@879 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-04 16:32:08 +00:00
euzuro
9149468971 store a reference to the options. this will be used for cloning.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@878 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-04 15:49:05 +00:00
euzuro
ff0e83d0a0 bringing all changes from sandbox/euzuro/LayersReworking down into the trunk. this is a merge of r656:HEAD http://svn.openlayers.org/sandbox/euzuro/LayersReworking
git-svn-id: http://svn.openlayers.org/trunk/openlayers@806 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-27 23:16:26 +00:00
Schuyler Erle
ead31f6dc6 Added license headers to all JS source files.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@657 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-21 15:22:48 +00:00
euzuro
b2ca284f9b add isBaseLayer() function to Layer
git-svn-id: http://svn.openlayers.org/trunk/openlayers@622 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-20 17:53:30 +00:00
euzuro
4c6b232bd2 coding standards / JSDOC
git-svn-id: http://svn.openlayers.org/trunk/openlayers@621 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-20 17:47:26 +00:00
euzuro
7e6b3b2a34 if the layer has a map property, remove it from the map before destroying.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@539 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-07 16:00:44 +00:00
euzuro
e53e339c09 make setting the map a function call. this way we can intercept and tag on event handlers.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@528 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-06 15:50:15 +00:00
euzuro
e0aa067cb6 remove 'projection' member from Layer. keep single instance in map
git-svn-id: http://svn.openlayers.org/trunk/openlayers@496 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-01 12:30:46 +00:00
euzuro
40cb75ca27 only jolt layer if we are setting it to visible (and if it has its 'map' property set.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@462 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-29 19:54:55 +00:00
crschmidt
1d1452da61 r439@creusa: crschmidt | 2006-05-29 13:32:54 -0400
Change Layer.js to call a moveTo function after visibility changes: This allows us to implement #56. Layer/Grid.js now has code which shows how to have a layer which doesn't load when it's not visible: This code will be dependant on the layers, so this has to be implemented per class. However, classes like markers suffer very little performance cost for drawing, so Layer.Grid is the most important place for this improvement.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@458 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-29 19:18:29 +00:00
euzuro
f623bbe2f1 updated comment from [239]
git-svn-id: http://svn.openlayers.org/trunk/openlayers@243 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 22:33:14 +00:00
crschmidt
2f5f40bfe1 Move projection information storage to map. Layer/Grid.js sets the projection when it creates a tile url, and it's no longer in the default params of WMS.js.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@240 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:34:01 +00:00
crschmidt
d295e5a892 This variable is set in map.addLayer, not within the layer itself, so this comment is not correct.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@239 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:30:08 +00:00
euzuro
9a16fe612d forgot a comma. sorry.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@235 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:13:11 +00:00
euzuro
d36388c19e coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@234 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:07:46 +00:00
euzuro
c59e66f167 fixing bug introduced with [179]. basically, the Layer constructor should not be making new divs when it is initialized by a subclass. that was the point of [179]. the problem is that because of the way Layer.Grid is making the call to Layer's initialize() -- createing a new arguments array regardless of the orginal (ie although name is void, it nonetheless creates a new array with one element, a void element) well so then when init gets called it thinks it does have arguments. The real god's truth here is that we need a better way than if (arguments.length > 0) to distinguish between actual object creation and the creation of the classes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@185 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 17:34:16 +00:00
euzuro
9b638d91c6 coordinate method calling of subclasses
git-svn-id: http://svn.openlayers.org/trunk/openlayers@179 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 15:05:39 +00:00
euzuro
db1c5afc7b found and noted unused variable
git-svn-id: http://svn.openlayers.org/trunk/openlayers@39 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 17:27:52 +00:00
euzuro
39622d5676 JSAN
git-svn-id: http://svn.openlayers.org/trunk/openlayers@38 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 17:26:53 +00:00
euzuro
27f2842519 removed 'status' variable. no reason to duplicate the storage of visibility when it can always be read directly from the layer's div.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@37 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 17:25:12 +00:00
crschmidt
54c0403850 add LayerSwitcher control. Currently, when added, this will simply loop through all the map layers, display a div (with text in it) which allows you tu turn the layer on or off. Layer visibility is a new concept in Layer.js, including a getter and setter, which uses the style.visibility prop to change the status of the layer.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@31 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-14 02:44:49 +00:00