Don,
> You probably have to update the openmap.properties file so
> the layers
> you want to have in the image are defined.
I am using the default openmap.properties provided with the distribution.
Doesn't this include layers for cities, states, etc?
> The ImageServer class can be run directly. You might want to
> look at
> the main() function, it does pretty much what you are trying
> to do in
> your code, but it's using the projection parameters defined in the
> openmap.properties file instead of defining them in the code.
I have tried using the following command from within $OPENMAP_HOME:
java com.bbn.openmap.image.ImageServer -file test2 -properties
openmap.properties
And I get the following output:
OpenMap.getLayers(): [date, drawing, quake, daynight, cities, test,
graticule, demo, shapePolitical, politicalCombo]
SunJPEGFormatter setting image quality to: 0.8
ImageServer: creating image with projection Mercator[ world(640,0)
radius=6378137.0 ppm=3272 center(19.999998,-19.999998) scale=2.0488352E8
maxscale=2.0488352E8 minscale=62.0 width=640 height=480]
ImageServer: using the new ProjectionPainter interface! createImage with
layer mask.
ImageServer.createGraphics: graphics is cool
ImageServer: ready to create formatted image.
ImageServer: using full scale image (unscaled).
Writing image file to: test2.jpg
It seems that it is aware of several layers, and the default properties
defined in the out of the box openmap.properties file are:
openmap.Latitude=20f
openmap.Longitude=-20f
# Scale: zoom level (1:scale)
openmap.Scale=300000000f
# Projection type to start the map with. Try "cadrg", "orthographic",
# which are projection IDs. Check a particular projection class for
# it's ID string.
openmap.Projection=mercator
# Width and Height of map, in pixels
openmap.Width=640
openmap.Height=480
# Change this for a different title in the main window.
openmap.Title=OpenMap(tm)
# pixel X/Y window position (if values < 0, then center window on screen)
openmap.x=-1
openmap.y=-1
Which seems like it would generate something, but I am still ending up with
an image which is a solid block of a single color with no details or
information in it whatsoever. Is there some trick to getting the properties
to be read? Does the out of the box openmap.properties need to be modified?
Thanks!
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]Received on Wed Aug 13 09:34:57 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT