Commit Graph

94 Commits

Author SHA1 Message Date
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
crschmidt
00d14534d2 Set a default maxResolution. Theres' a couple reasons for this: caching of tile requests, aligning OpenLayers with Google Maps zoom levels, and saving an initial calculation that most people won't need. For the old behavior, add:
{maxResolution:null} 
to your OpenLayers.Map() call.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@618 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-19 18:29:42 +00:00
euzuro
e55d2a7cce adding ability to add a layer to the viewport instead of the layerContainerDiv - this is especially for the virtual earth implementation, as we want to simply make a div that stays put. we dont want it sliding around with the layerdiv. it should stay where it is and let its own events handler move it around
git-svn-id: http://svn.openlayers.org/trunk/openlayers@588 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-15 12:10:38 +00:00
euzuro
2d2904c6ae adding comment for dealing with popups and layers
git-svn-id: http://svn.openlayers.org/trunk/openlayers@577 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-12 16:09:02 +00:00
crschmidt
66f5e034da Never zoom more than the max. It just stays where it is.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@573 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-12 12:16:43 +00:00
crschmidt
7d0b489e42 Commit changes to include a 'minor' flag on setCenter, that indicates that a map should not call the moveend trigger.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@558 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-08 16:13:42 +00:00
euzuro
cf011820c8 when we remove popups or layers from the map, we have to set their 'map' properties back to null
git-svn-id: http://svn.openlayers.org/trunk/openlayers@545 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-07 16:22:35 +00:00
euzuro
0db22c7d88 added removeLayer() function to our map.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@536 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-07 14:54:02 +00:00
euzuro
07b621b85c coding standards.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@530 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-06-06 16:26:33 +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
crschmidt
cdd26c1df2 fix map.zoomExtent().
Re-add zoomToWorld button to PanZoom control.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@473 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-30 21:10:53 +00:00
euzuro
d6ff6c681a move controls up. now we can have 800 popups without a conflict.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@404 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 16:47:56 +00:00
euzuro
f115b797a3 Changed around the order of arguments for createImage, createDiv, and createAlphaImage. bubbled out helper function OpenLayers.Util.modifyDOMElement() to handle common mods. Official order now is: id, px, sz, imgURL, position, border[, overflow]
git-svn-id: http://svn.openlayers.org/trunk/openlayers@384 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 01:23:11 +00:00
euzuro
bf8c1fba02 give Popup an 'updatePosition()' function that allows it to re-position itself. This will be used for zoom changes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@350 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 02:43:56 +00:00
euzuro
df5455e41e Since popups have a reference back to map, allow them to determine where they should be drawn internally. Thus we can remove the computing from the addPopup() function in Map.js.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@346 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 02:09:33 +00:00
euzuro
4dcd798e59 give popups a reference back to map
git-svn-id: http://svn.openlayers.org/trunk/openlayers@335 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 00:06:35 +00:00
euzuro
06cbeb2f11 fix for #60
conversions to/from lonlat/px need to take into account
the offset of the layersContainerDiv. 


I have introduced the following functions for converting
between layer and screen pixel values:

getLayerPxFromScreenPx() and getScreenPxFromLayerPx()

they are pretty self-explanitory.


I then renamed:

getPixelFromLonLat() and getLonLatFromPixel()

to:

getScreenPxFromLonLat() and getLonLatFroScreenmPx()

and added:

getLayerPxFromLonLat() and getLonLatFromLayerPx()


updates were made throughout the code, demos, and tests
so everything should still run smoothly.

-e-

git-svn-id: http://svn.openlayers.org/trunk/openlayers@329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 18:45:50 +00:00
crschmidt
e5bb6b7dbd Finish of r326, adding : to @require pragmas
git-svn-id: http://svn.openlayers.org/trunk/openlayers@328 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 17:39:21 +00:00
crschmidt
213a1b02d1 A couple changes got rolled into r326 that weren't meant to: Rolling them back out.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@327 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 17:38:27 +00:00
crschmidt
c0ec7f9a00 Change @require to @require:
git-svn-id: http://svn.openlayers.org/trunk/openlayers@326 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 17:17:22 +00:00
Schuyler Erle
cfb1b472a7 Calling map.destroy() twice previously an error in IE. Fixed.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@314 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 05:44:43 +00:00
Schuyler Erle
45fc70cbc7 If map.maxResolution is not set, set it to display the entire maxExtent in whatever the current map size is by default.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@301 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 22:41:28 +00:00
euzuro
92571569af update map.addPopup() to automatically add the popup at the correct screen location... and add it to the layersContainerDiv so that it will move with the maps. and example. and tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@300 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 21:50:24 +00:00