Thanks Don!
Had the foll inserts into the
HelloWorldLayer code :
Iterator it = getBeanContext().iterator();
MapBean mapBean = null;
Object someObj;
while (it.hasNext()) {
someObj = it.next();
if (someObj instanceof MapBean) {
Debug.message("found a MapBean.");
mapBean = (MapBean)someObj;
}
}
mapBean.setCenter(new LatLonPoint(43.0f, -95.0f));
There was a Null Pointer exception, until
I realised that I had to set the "addToBeanContext"
property for the layer in the properties file ...
Regards,
Pradeep.
-- On Fri, 22 Jun 2001 10:18:18 Don Dietrick wrote: >Hi Pradeep, > >Have the layer use the BeanContext to get a handle to the MapBean, and >change the projection there. The MapBean will fire the ProjectionEvent. > >- Don > >PRADEEP RAMACHANDRAN wrote: >> >> Hello, >> >> Is there a mechanism in place by which a layer can fire a ProjectionEvent, if so how do I implement it in a Layer. >> >> The idea is that a layer would collect lat/lon data in the background and later render graphic objects at these lat/lon positions. There would be a second political layer that would serve as a background. >> >> When the first layer completes reading the set of data,it should trigger a projection change ( a recenter )for the political background map to an area that has a maximum density of the graphic objects. >> >> Thanks, >> Pradeep. >> >> Get 250 color business cards for FREE! >> http://businesscards.lycos.com/vp/fastpath/ >> >> -- >> [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"] Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/ -- [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 Fri Jun 22 14:18:34 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT