Hi Laura,
On Oct 27, 2003, at 11:33 AM, Laura Paterson wrote:
> Thanks for the pointer, Don! I am not using menus, so I took out the
> functional code and set it to be called whenever the state of the
> layers
> were changed.
>
> I have only tried saving shape files so far, but I have found a couple
> of
> things which cause me some problems. Firstly, when I write the shape
> file
> to the properties, it writes the filepath with single back slashes
> (i.e.
> C:\openmap-4.5.4\share\data\shape\dcwpo-browse.shp). These seem to get
> escaped out when rewritten so I get an error along the lines of:
> "C:openmap-4.5.4sharedatashapedcwpo-browse.shp not available".
What happens if you specify the file names (originally) in the
openmap.properties as:
C:/openmap-4.5.4/share/data/shape/dcwpo-browse.shp
with forward slashes? I think the \ problem is a java problem.
>
> My second problem is more significant to my application at present:
> not all
> of the properties are written out, particularly 'addableLayers'. This
> means
> that a user can attempt to save a layer, but on the next execution of
> the
> program, no layers can be added. Judging by the reduction of my
> properties
> file (from 19k to 6k) it is likely that other properties have been
> removed.
This is a bug in the LayerAddPanel. I'll add that to the list for 4.6
bugs to fix before the final release.
> Is there any way of telling the ProeprtyHandler to write all of the
> properties?
It will automatically write out all it can.
> And what would be the best way to amend the written shape file
> path to use forward slashes?
See above, changing the paths in the properties file.
- Don
> -----Original Message-----
> From: Don Dietrick [mailto:dietrick@bbn.com]
> Sent: 25 October 2003 03:43
> To: Laura Paterson
> Cc: openmap-users@bbn.com
> Subject: Re: [OpenMap Users] Saving Layers in Properties file
>
>
> Hi Laura,
>
> The OpenMap application has an option in the File menu, Save Map, which
> writes out the properties from the components and layers to a new
> openmap.properties file. In OpenMap 4.6, the menu is "Save Map
> Properties". This menu item tells the PropertyHandler to write these
> properties.
>
> Not all layers write out their properties properly, but many do, and
> the RpfLayer does. The 4.6 version is pretty solid in this regard.
>
> Hope this helps,
>
> - Don
>
> On Oct 22, 2003, at 9:26 AM, Laura Paterson wrote:
>
>> Hi,
>>
>> I am new to the OpenMap API, so I apologise in advance for asking
>> newbie
>> questions! I have used the AddLayer tool to allow users to add RPF
>> and
>> shape files to my map, however I cannot work out how to persist these
>> to the
>> properties file. Ideally I would like the changes to be written to
>> the file
>> as soon as they are added or removed.
>>
>> If anyone has any pointers on how to accomplish this, it would be much
>> appreciated!
>>
>> Cheers,
>> Laura
>>
>>
>> General Dynamics United Kingdom Limited
>> Registered in England and Wales No. 1911653
>> Registered Office: 100 New Bridge Street, London, EC4V 6JA
>> --
>> [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"]
>>
>>
>
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Don Dietrick, dietrick@bbn.com
> BBN Technologies, Cambridge, MA
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
>
> General Dynamics United Kingdom Limited
> Registered in England and Wales No. 1911653
> Registered Office: 100 New Bridge Street, London, EC4V 6JA
>
-- [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 Thu Oct 30 17:39:57 2003
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:36 EDT