Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Setting properties for Redline layer (screen units vs. MCS units)

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
236 Views, 0 Replies

Setting properties for Redline layer (screen units vs. MCS units)

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;
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report