Commit Graph

64 Commits

Author SHA1 Message Date
euzuro
77c4cc2a8d protect for subclassing
git-svn-id: http://svn.openlayers.org/trunk/openlayers@471 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-30 17:54:11 +00:00
crschmidt
df375e7d29 This broke more than it fixed. Putting it back, and filing a bug on this issue.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@465 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-30 05:52:13 +00:00
crschmidt
bd0881d56b If a layer is not visible when a zoomlevel changes, and the map view is then dragged, the map view will not be filled with tiles by the inittiles call. Always make sure that we fill the view, even if we just init-tiles'd.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@464 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-30 05:50:14 +00:00
crschmidt
1d1452da61 r439@creusa: crschmidt | 2006-05-29 13:32:54 -0400
Change Layer.js to call a moveTo function after visibility changes: This allows us to implement #56. Layer/Grid.js now has code which shows how to have a layer which doesn't load when it's not visible: This code will be dependant on the layers, so this has to be implemented per class. However, classes like markers suffer very little performance cost for drawing, so Layer.Grid is the most important place for this improvement.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@458 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-29 19:18:29 +00:00
euzuro
fd184a3903 little bitta JSDOC
git-svn-id: http://svn.openlayers.org/trunk/openlayers@457 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-29 18:27:24 +00:00
euzuro
82839000d6 add 'selectedFeature' member to Layer.Text so that when the user clicks a second time on the same marker, the popup disappears.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@456 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-29 18:25:56 +00:00
euzuro
8a21a1dba4 only set popup content if values are defined
git-svn-id: http://svn.openlayers.org/trunk/openlayers@455 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-29 18:20:41 +00:00
euzuro
71df3e08fa update text layer to new paradigm
git-svn-id: http://svn.openlayers.org/trunk/openlayers@452 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-29 13:59:06 +00:00
euzuro
acb8dadd71 correcting comment
git-svn-id: http://svn.openlayers.org/trunk/openlayers@445 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-29 11:53:29 +00:00
crschmidt
82d01c73cc Working text layer with popups! woohoo! parseText suffered a reindentation, so not as much changed here as it looks like.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@424 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-27 13:11:22 +00:00
euzuro
da27fafa98 give WFS a featureClass and have it be set in the constructor
git-svn-id: http://svn.openlayers.org/trunk/openlayers@406 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 17:56:46 +00:00
euzuro
ef37b10ef7 pass the position in as parameter on new tile creation. remove unnecessary setPosition() function, as tiles no longer really get moved. they get drawn in their div and then the div moves around. no need to make that any more complicated. update tests for that. Also, finish renaming 'grid' to 'layer' (from r369).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@390 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-26 02:56:49 +00:00
crschmidt
fedfaea0bf Continued work on Layer.Text, implementing popups. Still has closure issues.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@375 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-25 23:08:14 +00:00
euzuro
0f7f771637 make tileSize member variable safe in Grid.js
git-svn-id: http://svn.openlayers.org/trunk/openlayers@330 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 23:04: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
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
5d1bc5ed78 Fixed redundant tileSize definition.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@318 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 06:26:54 +00:00
euzuro
80e048da92 dont need to position or append wfs tile
git-svn-id: http://svn.openlayers.org/trunk/openlayers@284 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 16:24:59 +00:00
crschmidt
4917ecac34 Change Layer.Marker to Layer.Markers.
Closes #50.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@278 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 15:35:38 +00:00
crschmidt
9190dd18d2 Add @require pragma to all source files.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@277 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 15:20:31 +00:00
crschmidt
d8ddc5aa36 More readable code, and change markerDiv -> markerImg, since we're not returning a div anymore.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@268 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 17:25:15 +00:00
crschmidt
c0ad6226de Adjust redraw. Before, we were appending the marker again -- but there's no reason to do that. The markers already exist, we're adjusting their position anyway. This should result in a 2/3rds speed win after the initial display, because appendChild was the largest length of time in the entire redraw process.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@267 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-22 17:13:15 +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
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
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
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
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
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
euzuro
9b638d91c6 coordinate method calling of subclasses
git-svn-id: http://svn.openlayers.org/trunk/openlayers@179 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 15:05:39 +00:00
euzuro
a5671cd452 subclass WFS layer off of Layer.Marker as well.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@178 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 14:48:26 +00:00
crschmidt
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!)
This has uncovered the fact that there is some logical error in our code somewhere: Visit markers.html then click the purple marker repeatedly.  Despite the fact that you start clicking in the sea, the marker moves north, as does your center point.

This text file layer does not yet support popups or anything else, just drawing the images at a lat/lon with an 'image' given in the textfile.


git-svn-id: http://svn.openlayers.org/trunk/openlayers@172 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 02:26:00 +00:00
crschmidt
9bff4c30f8 Remove "Hack hack hack" comment, which is no longer true.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@171 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-19 00:50:53 +00:00
euzuro
3f60da6dd4 use new WFS tile
git-svn-id: http://svn.openlayers.org/trunk/openlayers@169 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 19:18:37 +00:00
euzuro
b7d58fe9fe bubble up common functionality
git-svn-id: http://svn.openlayers.org/trunk/openlayers@165 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 18:58:36 +00:00
euzuro
ca2c0dba41 wfs doesnt take width and height parameters
git-svn-id: http://svn.openlayers.org/trunk/openlayers@164 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 18:52:58 +00:00
euzuro
f5a5c49ce9 adding a default parameter
git-svn-id: http://svn.openlayers.org/trunk/openlayers@163 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 18:50:20 +00:00
euzuro
28fe8c5a88 JSDOC coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@162 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 18:48:15 +00:00
euzuro
6f57cb4736 oops. forgot a comma. must always remember to test.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@161 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 18:47:11 +00:00
euzuro
bfc49a3ef4 JSDOC coding standards
git-svn-id: http://svn.openlayers.org/trunk/openlayers@160 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 18:38:14 +00:00
euzuro
14ee4e1146 coding standards. define CLASS_NAME
git-svn-id: http://svn.openlayers.org/trunk/openlayers@157 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 18:01:20 +00:00
euzuro
18e0393d00 renamed to WFS
git-svn-id: http://svn.openlayers.org/trunk/openlayers@156 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 17:58:10 +00:00
euzuro
c8d2628f0d set default parameters (taken from old trunk)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@155 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 17:55:53 +00:00
euzuro
fc2082fd6a svn copying WMS.js to WFS.js
git-svn-id: http://svn.openlayers.org/trunk/openlayers@154 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-18 17:54:49 +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