|
From: todd r. <tod...@ya...> - 2006-06-12 20:12:12
|
Greetings all,
There are some changes in MyMaps that will hopefully
come as good news. As usual, if you have any
questions, please feel free to email me directly.
First of all, I've changed some of the main classes
around (again - sorry). For those that have been away
from the project for awhile, I'm going to do a quick
rundown of the Viewer interface - this will help when
I explain the most recent changes.
Viewer is an interface that describes a visual map
display. Each implementation can support different
actions such as zoom, pan, etc., which can be called
with the doAction method. To determine whether an
action is supported, the supportsAction comes in
handy. Finally, each Viewer can report whether an
action is temporarily unavailable (for example, if
you're at the left edge of a map image,
ACTION_PAN_LEFT is unavailable) with the
isActionEnabled method. MyMaps currently has the
following Viewers:
1) WmsViewer for Web Mapping Services
2) ShapefileViewer for Shapefiles
3) TigerViewer for Tiger line files
4) MultiStoreViewer for one or more DataStore (which
is an interface available through Geotools).
Okay, if you haven't figured this out, the
MultiStoreViewer is new and pretty cool. By simply
building a Geotools DataStore, you can display the
data in MyMaps. In fact, I've been messing around
with displaying Shapefiles and Tiger line files
together in a single map display. In theory, any
DataStore available through GeoTools is now available
in MyMaps. And MyMaps makes it easy to set up a
simple display.
For those who have been following the API changes, you
may remember that we had an AbstractViewer class.
While we still do, it's been changed - it's now a true
abstract implementation of the Viewer interface and
should make creating new Viewer implementations
easier.
The old version of AbstractViewer was simply a wrapper
that made a Viewer work like a JPanel. That
functionality is now available in ViewerPanel. To see
how easy it is to use MyMaps, consider that the
following line creates a Shapefile display that can be
used like any other Swing component (since "panel" is,
after all, just a JPanel).
ViewerPanel panel = new
ShapefileViewer("shapefile.shp");
With this single line of code, you get a component
that displays the shapefile and allows zooming in by
simply clicking and dragging a box (called a "zoom
box"). By adding an SLD file and some controls (we
currently have a set of buttons and menu item
controls), you can produce a pretty decent display and
user experience.
One other change is the old ShapefileViewer had a
context menu appear when you righted clicked on it.
Because of changes in Geotools, I removed anything
using their MapPane objects. We can certainly add
that functionality back in, but since users had to
stumble upon it to even know it was there, I didn't
see any harm in removing it.
One more change to the project is that I'm finally
going to take Ed's advice and start listing tasks on
our sourceforge homepage. While there may not be much
there now, there will be soon. If there's something
in there you're interested in, or something that you
need more info on, just let me know. Ditto if you
think of something that should be there, but isn't
Thanks for your continued interest in MyMaps. Please
let me know if you have any questions.
Todd
P.S. The manuals will be out of date until I can get
those updated. I'm hoping to update those in CVS by
the end of today.
The only "dumb question" is the one you were too afraid to ask.
________________________________________
Check out RouteRuler - Free software for runners, cyclists, walkers, etc.
http://routeruler.sourceforge.net
________________________________________
Get a handle on your data with "pocOLAP", the "little" OLAP project
http://pocolap.sourceforge.net
________________________________________
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
|