Re: [OpenMap Users] Serializing OMGraphics

From: Piotr Kamiński <>
Date: Sun, 10 Apr 2005 11:54:10 +0200

Hi David,
I had the same problem when I tried to store OMGraphic created in
DrawingTool into file on disk. (User wanted to store his drawings and
load them later, just like in regular drawing program.) Serialization
didn't work for all OMGraphic classes. I modified some of them and it
helped a little. I've submitted my changes to openmap-users list

But after any change in OMGraphic classes (new field, method, etc.)
my stored files could not be loaded any more - this is due to default
serialization feature - serial id.

In my opinion OMGraphic *should* serialize properly and problems you
wrote about should be fixed. Here Don is a person which decide what to
do with this.

I don't know what exactly mean 'later' in your case. If it is short time
and you are not planning to permanently store created graphics, simple
serialization should work for you.

If you want to store your graphics for longer time (just as I wanted) I
would recommend using Java 1.4 XML storing mechanism. I will send you
another letter which contains some code which might help you. This is a
library which I used to store OMGraphic now instead of simple serialization.

Hope this helps,
Piotr Kaminski

David Ward napisał(a):
> I'm trying to preserve OMGraphics by serializing them to a stream which
> is stored on a server and later retrieved.
> It appears that the OMGraphics don't serialize all of their members
> necessary to properly reconstitute the graphic. Specifically the stroke
> is not serialized with the OMGraphic because stroke is declared as
> transient.
> Is there a technique to fully serialize the OMGraphics?
> Cheers,
> David
> -----------------
> David J. Ward
>> From: "Ellwein, Brent A" <>
>> To:
>> Subject: [OpenMap Users] Minimum zoom
>> Date: Wed, 6 Apr 2005 11:18:28 -0600
>> All,
>> It seems like there is only so far that OpenMap will allow me to zoom
>> out. After some cutoff point (which I haven't exactly determined yet)
>> why can I not make the map any smaller? Maybe I'm doing something
>> wrong.
>> Thanks,
>> Brent
> --
> [To unsubscribe to this list send an email to ""
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Sun Apr 10 2005 - 06:00:38 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:06 EDT