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
Schuyler Erle
0e6b61c352
All tests now pass in IE.
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@315 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 05:46:54 +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
euzuro
2410d94107
removed px member from OpenLayers.Popup. user must now specify a px value in the draw() method, just like with markers. updated tests
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@252 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 11:45:38 +00:00
euzuro
78588aa8ea
adding getPixelFromLonLat() function to Map.js -- the code is lifted from OpenLayers.Layer.Marker's drawMarker() function. also test added to ensure both translation functions return valid objects and that going back and forth is consistent. Note that i only test pixel-lonlat-pixel, because going from lonlat-pixel-lonlat there is loss due to the rounding in the lonlat-pixel phase
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@246 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 09:55:20 +00:00
euzuro
21cbfff2c7
popup no longer needs a reference to its map
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@230 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 17:53:11 +00:00
euzuro
d9762c984e
add code to Map.js to allow for the addittion and removal of popups. add a new html file to play around with popups. add a test in the test_Map file for the popup adding/removing
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@227 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 15:47:10 +00:00
crschmidt
ac70551a26
Update map constructor test: we no longer have a Controls div. Also, remove duplicate test of 'ok map.layerContainerDiv is an HTMLDivElement'
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@207 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 04:17:58 +00:00
euzuro
fe360c91e5
another round of LatLon -> LonLat [99] revisions
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@103 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 16:20:12 +00:00
euzuro
6f242f5746
Replace all instances and usages of LatLon to LonLat
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@99 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-17 15:51:37 +00:00
Schuyler Erle
ed9b57b6df
Fixed zoomend event code; changed semantics of the argument to moveToNewExtent to make the argument be the *previous* zoom level. Added tests.
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@66 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 23:46:41 +00:00
crschmidt
0b596a94f4
Add zoomin, zoomout tests
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@64 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 22:41:36 +00:00
Schuyler Erle
8218798cf9
Added check for layer.map === map to Map tests.
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@62 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 22:26:24 +00:00
Schuyler Erle
d4fd4f7803
Added test for Map.getResolution() bug created in r[56] and fixed in r[59].
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@60 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 21:09:39 +00:00
Schuyler Erle
143fd8d170
Map constructor now calls on div argument, so that developer doesn't need to.
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@57 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 19:31:59 +00:00
Schuyler Erle
47bf4cdad8
Changed DEFAULT_ZOOM_LEVELS to maxZoomLevel, DEFAULT_FULL_EXTENT to maxExtent,
...
and RESOLUTION_AT_ZOOM_LEVEL_0 to maxResolution. These values are no longer constants,
but have (thanks to JavaScript object prototyping) sensible defaults.
These defaults can now be overridden by passing a hash as the second argument of
the Map constructor.
Added tests to verify.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@56 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 19:27:22 +00:00
Schuyler Erle
58b202b359
Added addLayers() method to Map class; also, added tests to support it.
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@55 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-16 19:16:02 +00:00
crschmidt
a6f794be8d
Modify tests to work in FF on Mac -- functions are not run alphabetically there, so work needs to be repeated in 'subsequent' calls.
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@32 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-14 02:50:38 +00:00
crschmidt
768f800430
Test that setcenter creates a latlon, and that the values are equal to what we expect. (This would break if we ever
...
changed the order of LatLon's args, for example.)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@20 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-12 23:28:56 +00:00
crschmidt
05d213a806
Add a test for map.setCenter().
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@18 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-12 22:53:28 +00:00
Schuyler Erle
250b7758da
Got tests working.
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@15 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-12 22:36:52 +00:00
Schuyler Erle
ab312e867d
Added basic tests for Map, Layer, and Control base classes.
...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@14 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-12 22:31:14 +00:00