I've set aside the SOAP Service Client Portlets for now in favor of investigating the next task on the list. The goal is to build a map portlet that allows a user to select map layers from a WMS, draw a bounding box on the map, and download data from a WCS call. WMS and WCS are Open Geospatial Consortium (OGC) specs for Web Map Service and Web Coverage Service, respectively. And "map portlet" in this project that I'm a part of means having to struggle with my old friend, the OpenLayers JavaScript library.
Months past I struggled with OpenLayers when I was trying to build a Web Feature Service (WFS) client. I got the minimal test case working before I got dragged into other things. Wouldn't you know it, though, there's a whole new set of things to understand about WCS. I'd worked some with WMS and had the basic idea of that one, but I hadn't really paid any attention to WCS. I tried to get back into the mode of those two things by starting with some sample data sets. Surely there had to be some WMS and WCS sample data somewhere out on the Web.
What a tangled mess it is in the world of GIS data. Some things, including the Scott Davis "GIS for Web Developers", are excellent resources to a certain level but just when you need the key thing of "where is some data I can use in an OpenLayers call" you find out that the information is no longer current. Or the supposed map server is down. Or there is some layer that GAIA actually finds, but then it won't show anything because the zoom is wrong or some other inexplicable error.
I've learned way more in three days at this than I think my head can handle. I went back to playing around some more with GeoServer 1.7.0 that I had installed once before. That was explained well in the Scott Davis' book and provided a lot of insight. But it was an older version and talked about the Mapbuilder client, which is now replaced by an OpenLayers client. I hope I don't have to go to the extent of having my own functional OGC server just to get some sample WCS data to play with.
Some developers on my team have done work in this area and I was pointed to a couple of sample OpenLayers calls. But the only way to get the calls to actually return the data is to have a CAC-enabled workstation, which my laptop is not. Going back and forth between my laptop and a machine on another network where I can use the CAC helped me to make some headway. I hope to get either a CAC reader on my laptop or to find some WWW WCS data that I can use.
And, of course, there's a hassle everytime I have to add something to my basic OpenLayers map. I wasn't able to find the syntax error in the WCS call until a developer on my team said he used Firebug and it returned an exception saying the a map.setCenter call was needed. I never saw that when I was using Firebug--don't know why it didn't show up for me.
Unfortunately, when I go back and forth with the 2 systems I run into the problem that the CAC-enabled system does not have Firefox installed and security restraints prevent the installation of any software on that machine. Hence, using Firebug for debugging on my laptop is helpful but then IE7 on the other machine doesn't always agree with Firefox as to what is allowable JavaScript code. I was pointed to Visual Web Developer to debug IE issues. Something else I'll need to learn. Good thing I'm not opposed to learning new stuff. It never ends in this job.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment