Commit Graph

185 Commits

Author SHA1 Message Date
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
9fd1d458ae coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@254 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 12:36:14 +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
d2c18d4de7 rename 'object' to 'image', coding standards, remove duplicate declaration of 'events'
git-svn-id: http://svn.openlayers.org/trunk/openlayers@251 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 11:09:27 +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
5dcb062be1 small re-org of Marker layer innards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@248 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 10:25:02 +00:00
euzuro
043f833a30 adapt OpenLayer.Layer.Marker to use the new Map.getPixelFromLonLat()
git-svn-id: http://svn.openlayers.org/trunk/openlayers@247 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 10:02:04 +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
Schuyler Erle
af7dc7661a Commented out code to cancel zoom box if shift key is released before left mouse button. I find myself doing this consistently by accident, so we should probably find another way to cancel the zoom, like hittin ESC or something.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@245 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 03:47:19 +00:00
Schuyler Erle
7999253c74 Make the zoom box thicker and semi-opaque.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@244 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 03:27:51 +00:00
euzuro
f623bbe2f1 updated comment from [239]
git-svn-id: http://svn.openlayers.org/trunk/openlayers@243 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 22:33:14 +00:00
crschmidt
2f5f40bfe1 Move projection information storage to map. Layer/Grid.js sets the projection when it creates a tile url, and it's no longer in the default params of WMS.js.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@240 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:34:01 +00:00
crschmidt
d295e5a892 This variable is set in map.addLayer, not within the layer itself, so this comment is not correct.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@239 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:30:08 +00:00
euzuro
2b9c021d83 default opacity should be full
git-svn-id: http://svn.openlayers.org/trunk/openlayers@236 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:25:47 +00:00
euzuro
9a16fe612d forgot a comma. sorry.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@235 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:13:11 +00:00
euzuro
d36388c19e coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@234 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 18:07:46 +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
8487728e09 popup actually can use 'parentNode' to determine his parent. so no need to set anything. also, only try removing from viewPortDiv if popup.div is not null
git-svn-id: http://svn.openlayers.org/trunk/openlayers@231 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 17:54:23 +00:00
euzuro
359fe02bd5 popup doesnt want a reference back to the map, it wants a reference to the div that it was added to. this we will call 'parent'. with this reference, it will be able to destroy itself
git-svn-id: http://svn.openlayers.org/trunk/openlayers@229 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 16:59:09 +00:00
euzuro
2e4f6129f6 forgot that these declarations are still only statically initialized. even though the chance of somebody *modifying* one of these strings (rather than just replacing it) is rather low... we might as well do things the right way
git-svn-id: http://svn.openlayers.org/trunk/openlayers@228 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 16:02:29 +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
7db43c23c9 since r206, controlDiv member var no longer needed
git-svn-id: http://svn.openlayers.org/trunk/openlayers@223 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 13:50:28 +00:00
euzuro
50ea534cec add OpenLayers.Popup and a directory Popup, in which we will put all custom popups.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@220 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 13:39:06 +00:00
crschmidt
e97ccc7dd4 Missed a switch from this.map -> this on mouseDefaults. Dragging was
broken.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@219 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 03:12:53 +00:00
crschmidt
d0da958e57 1. Change the calling syntax for events on this control so that they go
from this instead of this.map. This has practical as well as idealogical 
benefits, namely that we can now call other methods on the control from 
within a control. This is neccesary for...
2. When the shift key is lifted, stop the zoomBox. This is the way in 
which users can *not* zoom once they've started.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@217 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-21 00:35:04 +00:00
crschmidt
24eb8fe144 Implement Drag-to-Zoom for ticket #30.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@216 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 22:18:44 +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
334fb4c2ed Add start of a KeyboardDefaults class. This works, but because Keyboard events apparently always happen on the document level, I haven't yet figured out how to have them only happen when you're 'focused' on the map, so these are currently off by default. To test them, map.addControl(new OpenLayers.Control.KeyboardDefaults()); in your HTML file.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@214 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 19:59:50 +00:00
crschmidt
f67177cf21 Add Feature.createMarker method. Not complete yet.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@212 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 13:28:28 +00:00
crschmidt
bdc0b9eefd Move setting of the zIndex of the control div back to map where it belongs.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@211 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 11:45:25 +00:00
crschmidt
149d65a045 Commit old Feature class as Feature.MetaCarta. This may move out of the main OL repository at some point, and no matter what, it needs to get cleaned up before it goes too much farther.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@209 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 04:42:33 +00:00
crschmidt
eaa7ddcfd9 Commit simplified Feature class. Features in the main OpenLayers parlance will not be the behemoth that they were in past versions, doing data parsing and everything on their own. Instead, a feature will be a minimal container for point-based data, to which other methods can be added: Feature.WFS might parse data out of XML, while Feature.Text might parse it out of CSV.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@208 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 04:39:04 +00:00
crschmidt
6c83a73519 Controls each create their own div, which is then individually added to the viewPortDiv directly, rather than to a Controls Div. This may fix some issues with event handling of lower layers, and may be related to #36. It also prevents the need for the markers hack a couple commits back.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@206 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 03:47:46 +00:00
crschmidt
563b828ede Migrate Map MouseControls to MouseDefaults.js. This moves event handling into a control, where we can modify it and edit it without mucking about in the main map class, bringing this portion of the code more into line with the way other aspects of the controls situation work.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@204 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 02:29:39 +00:00
crschmidt
8539ce0a71 Remove old comments.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@202 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 02:19:08 +00:00
crschmidt
b842c09705 Register mouseout operator on div to be same as mouseup, so we don't drag ourselves right out of the box.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@201 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 01:47:15 +00:00
crschmidt
50a9f706b9 Add the ability to set the zIndex explicitly to the addLayer call, and do so in the markers.html file. This demonstrates the creation of a marker which can be clicked upon to give the url of its icon.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@200 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 01:18:17 +00:00
crschmidt
26c2b6651b Remove temporary hacks from Marker.js.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@199 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-20 01:08:46 +00:00
crschmidt
9685524e26 Change position to absolute, and round pixel values. This puts markers back in their place.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@196 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 21:36:56 +00:00
euzuro
3c740acf17 append markers and features.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@194 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 18:41:47 +00:00
euzuro
bfece3fc4e temporary hack to bring over functions from the old application.js
git-svn-id: http://svn.openlayers.org/trunk/openlayers@192 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 18:40:32 +00:00
euzuro
7e8417959e oops. copy/paste error
git-svn-id: http://svn.openlayers.org/trunk/openlayers@190 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 18:37:22 +00:00
euzuro
0456e80862 this function is private.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@189 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 17:49:55 +00:00
euzuro
072e0a2b04 this is a dummy commit just because on the last commit, i forgot to specify that i didnt want to commit the changes i had made to Tile/WFS.js. So, know that in [186], the change to fix the bug was *just* the modification to Grid.js. The modifications to Tile/WFS.js were just more small steps in the process of getting WFS ported and working again...
git-svn-id: http://svn.openlayers.org/trunk/openlayers@187 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 17:41:37 +00:00
euzuro
61d3c4412f fixing bug introduced in [184]. just needed to be dereferencing grid (this.grid) and also to be making sure to only try to clean out when the grid has actually been initialized. SOMEBODY PUT THIS BOY IN A SANDBOX UNTIL HE CAN LEARN TO RUN THE DAMN TESTS BEFORE CHECKING IN.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@186 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 17:37:10 +00:00
euzuro
c59e66f167 fixing bug introduced with [179]. basically, the Layer constructor should not be making new divs when it is initialized by a subclass. that was the point of [179]. the problem is that because of the way Layer.Grid is making the call to Layer's initialize() -- createing a new arguments array regardless of the orginal (ie although name is void, it nonetheless creates a new array with one element, a void element) well so then when init gets called it thinks it does have arguments. The real god's truth here is that we need a better way than if (arguments.length > 0) to distinguish between actual object creation and the creation of the classes.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@185 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 17:34:16 +00:00
euzuro
20a13f43a6 make a destroy method and a clear grid. preventing circular refrences and memory leaks
git-svn-id: http://svn.openlayers.org/trunk/openlayers@184 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 16:25:19 +00:00
euzuro
54f519a255 code fixes for [180]. smack me again
git-svn-id: http://svn.openlayers.org/trunk/openlayers@183 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 15:53:35 +00:00