Commit Graph

137 Commits

Author SHA1 Message Date
crschmidt
deaebf8733 IE treats non-assigned zIndex values as 0. children of an element with a
zIndex set to 0 will always be below children of an element with a zIndex
set to 100. Because VirtualEarth sits outside the ContainerDiv, its maps were
always showing up over things contained inside the container div, such as 
markers. Acceptance test for this is to visit ./examples/ve.html and see if
the marker displays (should be over barcelona). IE, Firefox and Safari now
pass this acceptance test.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1331 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-22 17:33:12 +00:00
euzuro
484fc207cf fix for #180 -- check zoomlevel bounds before calling setCenter()
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1304 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-19 03:53:50 +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
4df6b8aa2b rollback 1295 -- prematurely committed
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1296 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-17 20:27:41 +00:00
euzuro
d2601b3684 coding standards, adding jsdoc comments, small code reorganization in svn statavkn
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1295 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-17 20:22:47 +00:00
euzuro
36ec579e39 protect viewport-lonlat translation functions in the case no baselayer is defined
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1283 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-17 17:20:30 +00:00
euzuro
08981babaa use official map.getResolution() function here, do not bypass and go directly to baseLayer
git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1279 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-17 16:13:55 +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
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
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
e3df606001 Quote indexes into array.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1161 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 15:52:23 +00:00
Schuyler Erle
088dd71754 Moved declaration of mouseDragStart property from Map to Control.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1158 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-09 14:37: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
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
a171ae13b6 fixing more tabs. all tests pass
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1011 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-26 14:44:44 +00:00
euzuro
317c15a5ce readibility / coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1007 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-26 10:17:21 +00:00
euzuro
63396d27d0 r1005 introduced some infinite recursion. no good. split addControl() into two functions, one public, which adds to internal this.controls arrray... and one private addControlToMap() which does the same, but without adding it to this.controls
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1006 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-26 10:13:33 +00:00
euzuro
d079f0bbca allow user to specify initial controls via 'controls' array option, instead of simply passing an empty array and then later adding. that seems extraneous
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1005 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-26 10:01:45 +00:00
euzuro
04a2e9472d allow an option to kill all other popups on addition of new one
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1004 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-25 21:43:28 +00:00
crschmidt
5eb1fdfaca When we remove a layer from the map, if it is the base Layer, we need to find *another* base layer to replace it, otherwise when we call getExtent, etc. it will be on the *old* base layer, which no longer has a map object defined.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@999 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-24 12:17:48 +00:00
euzuro
96d0f62c59 add getLayer() function to Map
git-svn-id: http://svn.openlayers.org/trunk/openlayers@979 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-19 14:42:20 +00:00
euzuro
3f07472d5d rollback of r975
git-svn-id: http://svn.openlayers.org/trunk/openlayers@976 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-18 18:39:15 +00:00
euzuro
abeb2ce686 give the map div a reference back to the OpenLayers.Map object
git-svn-id: http://svn.openlayers.org/trunk/openlayers@975 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-18 18:13:33 +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
ec33ac4a84 give Control classes same setMap() functionality as Layer
git-svn-id: http://svn.openlayers.org/trunk/openlayers@936 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-12 00:16:14 +00:00
euzuro
3030c421b5 if we allow a non-minor setCenter to get into this loop, then even if the last setCenter() on a drag is to the same center point and zoom, the moveTo()s of the layers will still get called with non-minor parameter -- in the case of Untiled, we need this to redraw the layer on move end.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@927 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-11 01:01:23 +00:00
euzuro
5a5c0f349d somehow this got left off during the LayersReworking fiasco. Luckily only Untiled.js was actually using it. tests seem to pass, seems alright
git-svn-id: http://svn.openlayers.org/trunk/openlayers@926 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-11 00:50:32 +00:00
euzuro
b84b3763a6 remove fixed layers from the viewport, not the layercontainer
git-svn-id: http://svn.openlayers.org/trunk/openlayers@916 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-07 16:04:32 +00:00
euzuro
986eaaf7a4 add hook to trigger the drawing of a layer upon addition to the map (assuming a center has been set)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@895 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-06 02:20:06 +00:00
euzuro
10cbef9274 since we can technically register events for any domelement, there is no reason this variable should be named 'div'. Change it to 'element' and update its use everywhere.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@866 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-04 11:57:18 +00:00
euzuro
397b4cc7ba hack to catch as best as possible the resize event in both mozilla and IE. we cant catch the actual resize on the div in IE, so we do that. in mozilla the best we can do is catch the resize of the window. so that is what we do.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@860 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-03 20:08:02 +00:00
euzuro
98302beddd same-case these functions for if there is no baselayer. in theory,
these should never be called if no baselayer is set... but one never
knows what a user will do. So instead of crashing, we will just return null.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@857 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-07-03 14:11:48 +00:00
euzuro
43a2f03b2b the 'moveend' event was not getting properly triggered on the end of a drag... because the setCenter() was not passing a new center or zoom. move it outside the if clause and all is well.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@823 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-28 23:44:24 +00:00
crschmidt
843abf10bb Let's keep null around. At least one example (*cough* openlayers homepage *cough*) uses it, although that should obviously have been documented in a test.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@814 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-28 00:07:00 +00:00
crschmidt
239a1cefa9 Actually return the extent.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@812 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-27 23:49:18 +00:00
euzuro
f51e970ab1 oops. our API promises zoomToFullExtent() and getFullExtent(), so we have to deliver them. Agreed that the name change to max should stay, but for the time being, have to maintain our API. both of these functions are marked as deprecated, and a ticket is being made to eventually remove them.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@811 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-27 23:47:36 +00:00
euzuro
1cf12e8d34 set the options *after* the call to updateSize() has been made
git-svn-id: http://svn.openlayers.org/trunk/openlayers@809 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-27 23:39:19 +00:00
euzuro
563d91c4fd extra dereferencing.... copy/paste error
git-svn-id: http://svn.openlayers.org/trunk/openlayers@808 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-27 23:35:05 +00:00