Commit Graph

  • 0cc4aa316d Set up a resize event listener to call map.updateSize() as necessary. Schuyler Erle 2006-05-22 14:08:15 +00:00
  • 27c99baacb Make it possible to supply an empty list to the Map() constructor, to disable the default controls. Schuyler Erle 2006-05-22 14:06:09 +00:00
  • ea4e785409 Huge performance win in caching this. Need to document updateSize, and probably set a 'resize' handler for the document or something like that to call it automatically. Note that GMaps v1 didn't have this concept: If you resized the map, you were stuck with it. GMapsv2 exposes a function to do this, so we're in line with that expectation. Profile difference: Before, 291 calls took 3 seconds. Now, 649 calls takes 3.49 milliseconds. Total Time: 2859.72 (min/max/avg 0.12/35.62/9.83) vs. Total Time: 3.49 (min/max/avg 0/1.53/0.01) crschmidt 2006-05-22 13:28:37 +00:00
  • f5b1cc270c fixing tabs euzuro 2006-05-22 13:05:14 +00:00
  • 08e7a5f10f update Control, Marker, and Popup such that they all have draw(px) and move(px) functions. standardization. update tests. euzuro 2006-05-22 12:50:09 +00:00
  • 9fd1d458ae coding standards euzuro 2006-05-22 12:36:14 +00:00
  • 758ebee26e update popups.html demo to changes from r252 euzuro 2006-05-22 11:46:53 +00:00
  • 2410d94107 removed px member from OpenLayers.Popup. user must now specify a px value in the draw() method, just like with markers. updated tests euzuro 2006-05-22 11:45:38 +00:00
  • d2c18d4de7 rename 'object' to 'image', coding standards, remove duplicate declaration of 'events' euzuro 2006-05-22 11:09:27 +00:00
  • 144da2ba73 Test case to show map with *lots* of markers. Seems pretty responsive euzuro 2006-05-22 10:57:43 +00:00
  • 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) euzuro 2006-05-22 10:50:35 +00:00
  • 5dcb062be1 small re-org of Marker layer innards euzuro 2006-05-22 10:25:02 +00:00
  • 043f833a30 adapt OpenLayer.Layer.Marker to use the new Map.getPixelFromLonLat() euzuro 2006-05-22 10:02:04 +00:00
  • 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 euzuro 2006-05-22 09:55:20 +00:00
  • 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. Schuyler Erle 2006-05-22 03:47:19 +00:00
  • 7999253c74 Make the zoom box thicker and semi-opaque. Schuyler Erle 2006-05-22 03:27:51 +00:00
  • f623bbe2f1 updated comment from [239] euzuro 2006-05-21 22:33:14 +00:00
  • 1be7117f5b Fix tests from recent projection change. crschmidt 2006-05-21 18:54:06 +00:00
  • 491bc1a515 Convert from storing srs in each layer to setting it for the map. crschmidt 2006-05-21 18:36:36 +00:00
  • 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. crschmidt 2006-05-21 18:34:01 +00:00
  • d295e5a892 This variable is set in map.addLayer, not within the layer itself, so this comment is not correct. crschmidt 2006-05-21 18:30:08 +00:00
  • 7249f61930 place popup under the control chrome to show that its zindex is set correctly euzuro 2006-05-21 18:29:42 +00:00
  • 9d691612e7 improved test code in popups.html euzuro 2006-05-21 18:27:19 +00:00
  • 2b9c021d83 default opacity should be full euzuro 2006-05-21 18:25:47 +00:00
  • 9a16fe612d forgot a comma. sorry. euzuro 2006-05-21 18:13:11 +00:00
  • d36388c19e coding standards euzuro 2006-05-21 18:07:46 +00:00
  • cdbcd48e3f actually test setpx setsize and setcontenthtml euzuro 2006-05-21 17:59:22 +00:00
  • e5f4e4aa4a add member variables, constants, getters and setters, and tests for id, px, size, content html, background color, opacity, border euzuro 2006-05-21 17:55:49 +00:00
  • 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 euzuro 2006-05-21 17:54:23 +00:00
  • 21cbfff2c7 popup no longer needs a reference to its map euzuro 2006-05-21 17:53:11 +00:00
  • 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 euzuro 2006-05-21 16:59:09 +00:00
  • 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 euzuro 2006-05-21 16:02:29 +00:00
  • 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 euzuro 2006-05-21 15:47:10 +00:00
  • b5c6bbbf20 make popup take arguments, allow it to draw itself. tests. euzuro 2006-05-21 15:27:36 +00:00
  • d694efa60e add indexOf() function to array - returns first index of a given element in an array. useful for testing, etc euzuro 2006-05-21 14:42:18 +00:00
  • d87992649f Add freemap of example of using different projection system (Mass state plane) with no changes to any code. This is relevant to #8: The only aspect of this missing is the ability to have a WMS layer automatically inherit a projection from its map, rather than being set explicitly. crschmidt 2006-05-21 14:26:48 +00:00
  • 7db43c23c9 since r206, controlDiv member var no longer needed euzuro 2006-05-21 13:50:28 +00:00
  • 6dd191c86f create testing file for Popup euzuro 2006-05-21 13:43:11 +00:00
  • 13b35c68d7 include Popup.js in dynamic loader euzuro 2006-05-21 13:42:45 +00:00
  • 50ea534cec add OpenLayers.Popup and a directory Popup, in which we will put all custom popups. euzuro 2006-05-21 13:39:06 +00:00
  • e97ccc7dd4 Missed a switch from this.map -> this on mouseDefaults. Dragging was broken. crschmidt 2006-05-21 03:12:53 +00:00
  • 0033ba70a9 Add Control.PanZoom tests. crschmidt 2006-05-21 02:07:07 +00:00
  • 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. crschmidt 2006-05-21 00:35:04 +00:00
  • 24eb8fe144 Implement Drag-to-Zoom for ticket #30. crschmidt 2006-05-20 22:18:44 +00:00
  • 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. crschmidt 2006-05-20 20:39:33 +00:00
  • 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. crschmidt 2006-05-20 19:59:50 +00:00
  • e88c6abb1f Initial tests for OpenLayers.Feature. tests the createMarker method added in r212. crschmidt 2006-05-20 13:29:11 +00:00
  • f67177cf21 Add Feature.createMarker method. Not complete yet. crschmidt 2006-05-20 13:28:28 +00:00
  • bdc0b9eefd Move setting of the zIndex of the control div back to map where it belongs. crschmidt 2006-05-20 11:45:25 +00:00
  • 2d51e17692 MapViewerService ported to new code. By the way, for those of you who were participating in the Mythical Man Month discussion: 9 minutes. Although I'm not sure the text file support is completely working. crschmidt 2006-05-20 04:55:18 +00:00
  • 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. crschmidt 2006-05-20 04:42:33 +00:00
  • 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. crschmidt 2006-05-20 04:39:04 +00:00
  • ac70551a26 Update map constructor test: we no longer have a Controls div. Also, remove duplicate test of 'ok map.layerContainerDiv is an HTMLDivElement' crschmidt 2006-05-20 04:17:58 +00:00
  • 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. crschmidt 2006-05-20 03:47:46 +00:00
  • 0e011e4584 Commit changes to proxy script. Specifically: * add allowedHosts. * Wrap all code in a try/except in case something breaks crschmidt 2006-05-20 03:29:43 +00:00
  • 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. crschmidt 2006-05-20 02:29:39 +00:00
  • 83030847a1 Fix Layer.Marker test file: <div id="map"> wasn't defined in the file. crschmidt 2006-05-20 02:28:23 +00:00
  • 8539ce0a71 Remove old comments. crschmidt 2006-05-20 02:19:08 +00:00
  • b842c09705 Register mouseout operator on div to be same as mouseup, so we don't drag ourselves right out of the box. crschmidt 2006-05-20 01:47:15 +00:00
  • 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. crschmidt 2006-05-20 01:18:17 +00:00
  • 26c2b6651b Remove temporary hacks from Marker.js. crschmidt 2006-05-20 01:08:46 +00:00
  • 2874c72367 Add Layer.Text tests and supporting data file. crschmidt 2006-05-19 22:53:19 +00:00
  • 2684454343 Naturally layer.map is 0 if we never add it to a map in the first place... crschmidt 2006-05-19 22:11:07 +00:00
  • 9685524e26 Change position to absolute, and round pixel values. This puts markers back in their place. crschmidt 2006-05-19 21:36:56 +00:00
  • 3470045a93 Added proxy.cgi from Mk II(I). Schuyler Erle 2006-05-19 19:48:02 +00:00
  • 3c740acf17 append markers and features. euzuro 2006-05-19 18:41:47 +00:00
  • 92a4ff077b include wfs.html for testing purposes euzuro 2006-05-19 18:41:18 +00:00
  • bfece3fc4e temporary hack to bring over functions from the old application.js euzuro 2006-05-19 18:40:32 +00:00
  • de294029b5 include WFS.js's in the dynamic loader euzuro 2006-05-19 18:39:31 +00:00
  • 7e8417959e oops. copy/paste error euzuro 2006-05-19 18:37:22 +00:00
  • 0456e80862 this function is private. euzuro 2006-05-19 17:49:55 +00:00
  • aa6228eeaf including Feature.js in dynamic loader. All Tests Pass. euzuro 2006-05-19 17:47:35 +00:00
  • 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... euzuro 2006-05-19 17:41:37 +00:00
  • 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. euzuro 2006-05-19 17:37:10 +00:00
  • 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. euzuro 2006-05-19 17:34:16 +00:00
  • 20a13f43a6 make a destroy method and a clear grid. preventing circular refrences and memory leaks euzuro 2006-05-19 16:25:19 +00:00
  • 54f519a255 code fixes for [180]. smack me again euzuro 2006-05-19 15:53:35 +00:00
  • e114a80311 updating tests for [180]. smack me. some of them are still failing. seems like it might be browser-related euzuro 2006-05-19 15:52:21 +00:00
  • af81e44e9a JSDOC euzuro 2006-05-19 15:21:04 +00:00
  • 59fb5b050d give tiles a reference back to their container OpenLayers.Grid euzuro 2006-05-19 15:19:49 +00:00
  • 9b638d91c6 coordinate method calling of subclasses euzuro 2006-05-19 15:05:39 +00:00
  • a5671cd452 subclass WFS layer off of Layer.Marker as well. euzuro 2006-05-19 14:48:26 +00:00
  • 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]. euzuro 2006-05-19 14:46:21 +00:00
  • 50fe4e712f update loadFeatures() function euzuro 2006-05-19 14:29:51 +00:00
  • 55e0e47c89 bring in Feature.js from old repository euzuro 2006-05-19 14:26:52 +00:00
  • b183aa69ba add ajax code to WFS euzuro 2006-05-19 14:20:47 +00:00
  • 70a702a9b0 bubble up the setPosition into the main Tile class. then let subclasses override it if they need to do special things (as in the case of Image). euzuro 2006-05-19 14:11:56 +00:00
  • 519fb6da15 Add working version of text file layer. (For those of you playing along at home, this was about 45 minutes of work -- part of which was trying to figure out why the data file wouldn't work, only to find out I had expandtab on in vim -- so I wasn't typing tabs, i was typing spaces!) crschmidt 2006-05-19 02:26:00 +00:00
  • 9bff4c30f8 Remove "Hack hack hack" comment, which is no longer true. crschmidt 2006-05-19 00:50:53 +00:00
  • 006053f769 Added CLASS_NAME to OpenLayers.Map. Schuyler Erle 2006-05-18 19:36:32 +00:00
  • 3f60da6dd4 use new WFS tile euzuro 2006-05-18 19:18:37 +00:00
  • 78ba803e36 this guy was supposed to get updated in [167]. typo on the commit. euzuro 2006-05-18 19:17:12 +00:00
  • b7e043df92 bubble up more common functionality. no need for multiple accessors euzuro 2006-05-18 19:16:38 +00:00
  • 27d2ac30d3 created WFS tile class based on Image tile euzuro 2006-05-18 19:12:10 +00:00
  • b7d58fe9fe bubble up common functionality euzuro 2006-05-18 18:58:36 +00:00
  • ca2c0dba41 wfs doesnt take width and height parameters euzuro 2006-05-18 18:52:58 +00:00
  • f5a5c49ce9 adding a default parameter euzuro 2006-05-18 18:50:20 +00:00
  • 28fe8c5a88 JSDOC coding standards euzuro 2006-05-18 18:48:15 +00:00
  • 6f57cb4736 oops. forgot a comma. must always remember to test. euzuro 2006-05-18 18:47:11 +00:00
  • bfc49a3ef4 JSDOC coding standards euzuro 2006-05-18 18:38:14 +00:00