Hi all,
I'm trying to add an OverviewMapHandler in my app.
I've managed to put it in a Jpanel, but I can't view anything in the
overview map.
It seems to respond to center and zoom events, and controls the managed
mapbean recentering and zooming....but I can't see nothing... I append some
code to see if anyone can help me...
Thanks in advance,
Rubén.
public void cargaOverViewMap() {
_locator.addControlledMap(this.bufferedMapBean1);
this.bufferedMapBean1.addProjectionListener(_locator);
jPanel3.add(_locator.getMap(),BorderLayout.CENTER);
jPanel3.addComponentListener(_locator);
Properties locatorProps = this.cargaProps("mapas/locator.properties");
_locator.setProperties("",locatorProps);
Properties ovmProps = this.cargaProps("mapas/overviewLayer.properties");
_locator.setProperties("overviewLayer",ovmProps);
_locator.repaint();
}
The props file are:
Locator.properties:
class=com.bbn.opemap.gui.OverviewMapHandler
overviewLayers=overviewLayer
overviewScaleFactor=10f
overviewMinScale=100000f
overviewStatusLayer.class=com.bbn.openmap.layer.OverviewMapAreaLayer
overviewMapHandler.lineColor=FF800000
threshold=200000000
overviewLayer.properties:
overviewLayer.class=com.bbn.openmap.layer.shape.ShapeLayer
overviewLayer.prettyName=world Overview
overviewLayer.shapeFile=mapas/PM_BASE_lin.shp
overviewLayer.lineColor=FFFFFFFF
overviewLayer.threshold=200000000
Maybe the real question is...how do i add a layer to the overview map? I
have some layers loaded in the mapbean, maybe using:
_locator.setLayers(_layerHandler.getLayers());???'
Or the overview map takes the layers directly from the mabbean when you set
the controlledMap??
Any given help is wellcome...
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Wed Jul 14 2004 - 14:47:38 EDT