Hi Anoop,
In general, you can't have multiple values for a same key, but you might
try using a scoping prefix to the values you want:
myfirstpoint.lat = latitude
myfirstpoint.lon = longitude
myfirstpoint.name = name
mysecondpoint.lat = latitude2
mysecondpoint.lon = longitude2
mysecondpoint.name = name2
etc.
I don't think you'd want to do this for big collections.
You could also do
myfirstpoint = latitude longitude name
and then use the PropUtils class to parse the space-separated string for
you. That assumes alot from the order of the values, though.
- Don
On Thursday, December 6, 2001, at 01:34 AM, anoop wrote:
> yes, thanks to all of u..its working fine..alomost perfect. I hadnt
> called
> generate(proj)
> on the point, now i hv.
> Maybe u can help me with one more thing.. I use th Properties class to
> load
> a name value
> pair from a file..is there any other similar utlity which can load a
> single
> name but multiple
> values and later i can extract the individual values..which will be the
> latLongs to be diplayed
> on the map.
>
> thankz a lot,
> anoop
> ----- Original Message -----
> From: "Donald Dietrick" <dietrick@bbn.com>
> To: "anoop" <anoopkumar.v@tatainfotech.com>
> Cc: "Openmap-Users (E-Mail)" <openmap-users@bbn.com>
> Sent: Wednesday, December 05, 2001 8:18 PM
> Subject: Re: Thread in DemoLayer
>
>
> Hi Anoop,
>
> Are you calling generate() on the point with the current projection of
> the map?
>
> - Don
>
> On Tuesday, December 4, 2001, at 11:30 PM, anoop wrote:
>
>> hi all,
>>
>> I am trying to modify the demolayer code so that it wd diplay
>> co-ordinates (lat/long) as taken from a file. This i hv managed to do.
>> Right now i am trying to include a Thread in the DemoLayer so that
>> the co-ordinates from the file is taken at regular intervals, but i am
>> running into problems here. I do not get any errors but the point fails
>> to show up. I am briefing what i hv done here..
>>
>> i added the implementation of Runnable to DemoLayer.
>>
>> in init() i instantiated a Thread t=new Thread(this);
>> t.start();
>>
>> then i made another method run() and called
>>
>> for(;;){
>> Properties p=new Properties();
>> p.load(myfile);
>> point.setLat(lat from myfile);
>> point.setLong(long from myfile);
>> omList.add(point);
>> omList.render();
>> t.sleep(500);
>> }
>>
>> But this does not show any point. But when i take out the thread
>> inplementation
>> the point is shown as picked up from myfile, and when i change the Lat
>> Long
>> in the file..refreshing the screen updates the points. Is there
>> something i am missing
>> here. Or do i need to use some thing else to update and repaint my
>> DemoLayer.
>>
>> THanks in adv..
>> anoop
>>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Donald Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>
> --
> [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"]
>
-- [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 Dec 6 16:28:34 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT