Hello,
I want to set the property of a redline layer added through the API:
After setting the Height en Width etc. I want to set the property of the
maplayer to Constant Size Screen Units (see Author)
Does anyone know if this and if yes, how to do this?
Or is it possible to make an empty redline layer with this property already
set in the author?
Regards,
Marco Scheffers
Adogis BV, The Netherlands
marco@gis.nl
Here's a bit of the code I used:
var redlineSet = map.getRedlineSetup();
var symbolSetup = redlineSet.getSymbolAttr();
symbolSetup.setHeight(grootte,"M");
symbolSetup.setWidth(grootte,"M");
//symbolSetup.setRotation(-45.0);
//This only works if you have selected the API symbols in the general
properties of the MWF-used
symbolSetup.setSymbol("Balls - Red");
var myLayer = map.getMapLayer("Gezochte locatie");
if (myLayer == null)
{
myLayer = map.createLayer("redline", "Gezochte locatie");
//Put on top of every other maplayer
myLayer.ShowInLegend = true;
myLayer.setPriority(100.0);
}
else
{
myLayer.removeAllObjects();
}
var object = myLayer.getMapObject(key);
if (object == null)
{
var object = myLayer.createMapObject(key, maptip, "");
}
object.addSymbolPrimitive(mapPoint, false);
//Turn visibilty of other maplayers off
map.getMapLayer("gemeenten").Visibility = false;
map.getMapLayer("provincies").Visibility = false;