Commit Graph

80 Commits

Author SHA1 Message Date
euzuro
dda9d167af add tests for createAlphaImageDiv function
git-svn-id: http://svn.openlayers.org/trunk/openlayers@365 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 17:12:51 +00:00
euzuro
022ffde95e moved oppositeQuadrant() function from Anchored.js to Util.js, where it is now a static function on the OpenLayers.Bounds class. Updated usage in code accordingly. Added test.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@343 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 00:54:45 +00:00
euzuro
e727450196 no reason for Popup to be using an OpenLayers construct in the declaration phase. make it WIDTH and HEIGHT instead of using OpenLayers.Size.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@338 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 00:27:46 +00:00
euzuro
b55debdd48 adding determineQuadrant() function to OpenLayers.Bounds. Tests included.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@334 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 23:43:09 +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
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
Schuyler Erle
0417c9feb5 Fix test_Layer_Text.html, which was also broken by r301.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@313 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 04:34:27 +00:00
Schuyler Erle
3ebbf969f2 Fix test_Layer_WMS.html, which was broken by r301.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@312 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 04:31:57 +00:00
Schuyler Erle
b7e9c0596f Fix test function names in test_Layer_Markers.html.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@311 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 04:23:48 +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
0821a4ef99 update tests for popup for r298
git-svn-id: http://svn.openlayers.org/trunk/openlayers@299 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 21:46:06 +00:00
euzuro
d6f1dedeb1 fix tests for r294
git-svn-id: http://svn.openlayers.org/trunk/openlayers@295 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 19:06:17 +00:00
crschmidt
16ac9ce885 Fix Marker tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@293 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 18:14:18 +00:00
euzuro
e86628b17e updating tests to changes made in r278
git-svn-id: http://svn.openlayers.org/trunk/openlayers@290 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 17:28:08 +00:00
Schuyler Erle
7378388d45 Added a position property to Control, which allows us to specify a default
location for each Control class, and saves us from *having* to supply a pixel
position to the map.addControl() method -- the sensible default will tend to be
used instead.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@269 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 17:25:46 +00:00
crschmidt
7c564bf17c update tests for newly added events.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@265 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 16:20:24 +00:00
euzuro
08e7a5f10f update Control, Marker, and Popup such that they all have draw(px) and move(px) functions. standardization. update tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@255 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 12:50:09 +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
7f11d01e87 changing function name from generateMarker to draw() to remain consistent with other areas of the code. (specifically OpenLayers.Control, whouses the draw() function to render the control and return a link to the div)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@249 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 10:50:35 +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
crschmidt
1be7117f5b Fix tests from recent projection change.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@242 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:54:06 +00:00
euzuro
cdbcd48e3f actually test setpx setsize and setcontenthtml
git-svn-id: http://svn.openlayers.org/trunk/openlayers@233 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 17:59:22 +00:00
euzuro
e5f4e4aa4a add member variables, constants, getters and setters, and tests for id, px, size, content html, background color, opacity, border
git-svn-id: http://svn.openlayers.org/trunk/openlayers@232 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 17:55:49 +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
euzuro
b5c6bbbf20 make popup take arguments, allow it to draw itself. tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@226 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 15:27:36 +00:00
euzuro
d694efa60e add indexOf() function to array - returns first index of a given element in an array. useful for testing, etc
git-svn-id: http://svn.openlayers.org/trunk/openlayers@225 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 14:42:18 +00:00
euzuro
6dd191c86f create testing file for Popup
git-svn-id: http://svn.openlayers.org/trunk/openlayers@222 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 13:43:11 +00:00
crschmidt
0033ba70a9 Add Control.PanZoom tests.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@218 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 02:07:07 +00:00
crschmidt
e7c6d4df19 Change order of Marker creation from icon, latlon to latlon,icon. I don't know why I would have done it the other way.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@215 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 20:39:33 +00:00
crschmidt
e88c6abb1f Initial tests for OpenLayers.Feature. tests the createMarker method added in r212.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@213 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 13:29:11 +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
crschmidt
83030847a1 Fix Layer.Marker test file: <div id="map"> wasn't defined in the file.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@203 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 02:28:23 +00:00
crschmidt
2874c72367 Add Layer.Text tests and supporting data file.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@198 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 22:53:19 +00:00
crschmidt
2684454343 Naturally layer.map is 0 if we never add it to a map in the first place...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@197 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 22:11:07 +00:00
euzuro
e114a80311 updating tests for [180]. smack me. some of them are still failing. seems like it might be browser-related
git-svn-id: http://svn.openlayers.org/trunk/openlayers@182 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 15:52:21 +00:00
euzuro
95d8c8f2c8 still need to get into the habit of testing *before* committing. im working on it. i promise. fixing test for Tile.Image based on [173].
git-svn-id: http://svn.openlayers.org/trunk/openlayers@177 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 14:46:21 +00:00
euzuro
5a01d3b510 last test function for Util.js. In theory, that entire file is now fully tested
git-svn-id: http://svn.openlayers.org/trunk/openlayers@153 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 17:13:47 +00:00
euzuro
db33b7b260 more tests! createDiv and createImage now testable.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@152 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 16:59:39 +00:00
euzuro
60013db953 correctly identify getParameterString as a Util function
git-svn-id: http://svn.openlayers.org/trunk/openlayers@149 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 13:42:14 +00:00
euzuro
233600a284 new util test
git-svn-id: http://svn.openlayers.org/trunk/openlayers@148 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 13:41:19 +00:00
euzuro
eeba5a34c6 Changed OpenLayers.Bounds to use left, bottom, right, top INSTEAD OF minlon, minlat, maxlon, maxlat. Removed OpenLayers.Box which was not getting used. JSDOC/coding standard-ified the OpenLayers.Bounds code and wrote thorough testing for it. Should be all good.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@140 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 12:48:52 +00:00
crschmidt
6ab326f67d Changing all tabs to spaces, per CodingStandards.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@139 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 12:42:38 +00:00
crschmidt
147a45feff Test for r137, event constructor with null EventTypes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@138 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 12:33:41 +00:00
crschmidt
6f997014c0 Test case for 'addlayer': check if markers.length is set correctly. (This would have failed with r133, had I written it earlier.)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@136 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 12:23:42 +00:00
euzuro
233a638e3e change diff to add in OpenLayers.LonLat. Even though it is not used, it is probably better to have all these Util objects be consistent. See [129]
git-svn-id: http://svn.openlayers.org/trunk/openlayers@131 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 05:31:17 +00:00
euzuro
bb55859445 remove unused diff and diffABS functions from OpenLayers.Pixel
git-svn-id: http://svn.openlayers.org/trunk/openlayers@129 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 05:19:51 +00:00
euzuro
50d4546af4 udpated tests for completed util classes
git-svn-id: http://svn.openlayers.org/trunk/openlayers@122 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 04:22:23 +00:00
crschmidt
8cf86b2a10 Commit initial tests for inittiles.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@119 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 03:23:17 +00:00
Schuyler Erle
a5d6ad32da Added test for fix in r114. (take two)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@116 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 01:03:29 +00:00