[OpenLayers-Users] Experience using OpenLayers
Jeff Yutzler
Jeff.Yutzler at ionicenterprise.com
Thu May 17 18:39:56 EDT 2007
I've spent some time over the last couple of weeks evaluating OpenLayers v2.3 as a web mapping client and I have a series of observations.
First of all, a little about our architecture. We have a J2EE web application built on top of IONIC's Red Spider Enterprise API. We also have a web mapping client built on top of OpenLayers. In between we have an AJAX/JSON conduit between the two. This works well for us because the Enterprise API supports all of the OGC capabilities we need, things like Web Map Context, Web Feature Server, and Catalog. Besides, the idea of using an open proxy is not palatable for many of our customers for security reasons. Since we can take advantage of all of our OGC capabilities through the Enterprise API, we do all of that work on the web application side and pass the relevant bits to the client via AJAX/JSON.
For us, the trivial use case is allowing the user to load a Web Map Context, add, remove, reorder, and configure WMS/WFS layers and do WMS GetFeatureInfo/WFS GetFeature requests to see the data underlying the layers. We were able to do most of these things with OpenLayers almost directly out of the box and we are pretty excited about that. The most interesting use case we have developed on top of OpenLayers to this point is the following:
* an Oracle database is being populated in real time by an external process with feature / location data of moving features
* We have a Web Map Context that we load into OpenLayers containing:
o some base map
o a WMS layer representing the current location of the features in the database
o a WMS layer representing past locations of the features in the database. This layer supports temporal extents so we can see the feature tracks for a fixed length of time (this length is called feature decay)
o a layer (extending OpenLayers.Layers.Markups) that contains feature information for the features currently on the screen (we cap the number of features so that it doesn't get unwieldy). We put invisible markups on the screen that the users can click on to find out feature details.
* The user configures the map refresh rate and the feature decay. As the map refreshes, features start moving around the map.
* The user can activate "chase mode" whereby the map recenters itself to where the chased feature is right now whenever it updates.
The biggest problem we have with OpenLayers is the way image updates are handled. The main thing that attracted us to OpenLayers is the way the map scrolls smoothly when the user pans around. The screen does not turn blank and since adjacent tiles are already downloaded, updates are fast. Unfortunately, this only applies when the user moves laterally, not when specific tiles need to be redrawn. In our use case above, the map refreshes can take a few seconds depending on the amount of data involved and the speed of the server and it looks pretty lame when the layer disappears while it is reloading. We know it is possible to keep the old tile image in place, load the new image on top, then remove the old image when the new one is done loading, but I don't see any reference to this concept in the trac ticketing system. We would be interested in seeing this in a future release and would consider developing it ourselves if necessary.
My next step in development is to support WFS-T. We are reluctant to try out 2.4RC3, but maybe it is time. We are also interested in multi-line, multi-polygon, and inner ring support. We've implemented this capability in other web clients so we know it can be done here. I see this is on the road map for 2.5. Since we have full WFS-T support via Red Spider Enterprise, this work should go quickly.
The most annoying thing I had to do was provide something more capable than the default Layer Switcher. Before working with OpenLayers, we built a client from scratch on top of YUI so we had a lot of controls already built. Unfortunately, the YUI event model and the Prototype-based event model are like oil and water. I could not use the drag and drop ability from YUI because the Layer Switcher was eating the mouse up events before they could reach the <LI> that was being dragged. Because of this, it would not stop dragging reliably. Ack! I ended up replacing the Layer Switcher completely with our own thing which is not awful, but it is so different it would not fit into your code base at all.
By the way, is there an example for using the measurement tool? I don't see one anywhere. I see it in the code but I figure I would want to see an example of using it before I add it to our own client.
Oh, and on the forum debate, I recommend not having a separate forum. However, I do suggest you publicize the link to Nabble a little more. I spent a lot of time blindly looking through the mail archives before I spotted it.
I hope this is helpful to you.
Regards,
Jeff Yutzler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070517/5b1b303b/attachment.html
More information about the Users
mailing list