Commit Graph

217 Commits

Author SHA1 Message Date
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
euzuro
9b53d22a31 allow for accessing of default map values even if baseLayer has still not been set
git-svn-id: http://svn.openlayers.org/trunk/openlayers@807 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-27 23:31:47 +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
euzuro
f4342723e4 use bound's built in getCenter() function.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@790 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-27 10:47:48 +00:00
Schuyler Erle
fbbf1b317a Applied Corey Puffault's zoomToExtent() patch from #107.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@789 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-27 04:42:17 +00:00
Schuyler Erle
c92cd6d88a Pulled down bug fixes, example updates, etc. r717:r787 from source:/branches/openlayers/1.0.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@788 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-27 04:40:52 +00:00
crschmidt
6b28c78655 Make the UntiledWMS work better. This changes the API for an internal function (moveToNewExtent), but doesn't break any existing code.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@674 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-22 15:35:33 +00:00
Schuyler Erle
bf6ad055df Renamed zoomExtent to zoomToFullExtent, added tests for it and for the new lonlat/px convenience functions.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@663 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-21 17:12:19 +00:00
Schuyler Erle
221aedebc6 Added convenience functions getLonLatFromPixel and getPixelFromLonLat; added some more jsdoc.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@662 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-21 17:04:16 +00:00
crschmidt
c8c780a941 Remove a temporary hack for layers setting their own div.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@661 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-21 16:48:34 +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
crschmidt
9b9a902ec0 Add additional fallback for Map.js if getDimensions doesn't work. I think this is essentially a 'special case' for our testing process, but it fixes it for this case.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@652 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-21 15:04:59 +00:00
euzuro
823d2ddedd add comment regarding current handling of base layers
git-svn-id: http://svn.openlayers.org/trunk/openlayers@642 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-21 11:51:59 +00:00
euzuro
76156b7317 give Map the concept of a base layer
git-svn-id: http://svn.openlayers.org/trunk/openlayers@641 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-21 11:48:27 +00:00
Schuyler Erle
b6f7222282 Bug fix to map.updateSize for IE when size is a percentage. Calls Element.getDimensions from Prototype.js, which hopefully is the right thing to do. Fixes ticket #37.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@638 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-21 02:35:04 +00:00
euzuro
91a566ca61 the last of the screen -> viewPort changes
git-svn-id: http://svn.openlayers.org/trunk/openlayers@634 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-20 23:23:31 +00:00
euzuro
33e84b6ff0 more screen->viewPort
git-svn-id: http://svn.openlayers.org/trunk/openlayers@632 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-20 23:07:30 +00:00
euzuro
adf91b1d10 again, change function name from ScreenPx to ViewPortPx
git-svn-id: http://svn.openlayers.org/trunk/openlayers@631 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-20 22:57:18 +00:00
euzuro
ed3c2a6f0b change function name from ScreenPx to ViewPortPx
git-svn-id: http://svn.openlayers.org/trunk/openlayers@630 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-20 22:51:55 +00:00
Schuyler Erle
351ebb0d52 Fix minor typo introduced in r619. Thanx, euzuro\!
git-svn-id: http://svn.openlayers.org/trunk/openlayers@620 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-20 14:57:29 +00:00
Schuyler Erle
9e8c2f3802 Augment r618 by allowing the more prosaic and self-documenting { maxResolution: 'auto' }.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@619 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-19 21:09:31 +00:00