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: 

Constant size Redline Symbol

4 REPLIES 4
Reply
Message 1 of 5
vajdaur
330 Views, 4 Replies

Constant size Redline Symbol

Dear Developers,

I have a problem. I create a redline layer dynamicaly from my program, then I add new Symbols to the Layer.
How Can I make this symbols "Constant size" like I can do it with the predefined layers? Or I always have to check them at every zoom and Remove them and create it with the new calculated size?
I hope there is a much more easier way only I don't know about it. Please tell me how you use to solve this problem.

Best Regardes

Vajdaur
4 REPLIES 4
Message 2 of 5
Anonymous
in reply to: vajdaur

Vajdaur,

Unfortunately any redline symbols you add to the map through the api will
behave in this manner, such that they grow bigger or smaller as you zoom in
or out. Your other option is to add the symbols to the map by using the
dynamic authoring toolkit and the api's support for the AddMapLayer()
method. I have done this before, so I can at least tell you that it will
work.

To do this you would setup a routine on your server application that
receives the parameters for the redline symbols to add to the map (such as
the x/y location, name, etc.). Based on these parameters you would build a
dynamic map layer (.mlf) which you would then have to stream back the the
user's map. It's not a simple solution, but in the end it is much better
functionality than having to resize all of your redline symbols upon each
map view change.

Navid


"vajdaur" wrote in message
news:f1a4725.-1@WebX.maYIadrTaRb...
Dear Developers,
I have a problem. I create a redline layer dynamicaly from my program, then
I add new Symbols to the Layer.
How Can I make this symbols "Constant size" like I can do it with the
predefined layers? Or I always have to check them at every zoom and Remove
them and create it with the new calculated size?
I hope there is a much more easier way only I don't know about it. Please
tell me how you use to solve this problem.
Best Regardes
Vajdaur
Message 3 of 5
Anonymous
in reply to: vajdaur

I don't think that is true
I think I actually did this a while back
With the viewer API I believe you can set symbol(point elements) height,
width etc. using MGSymbolAttr object (setHeight, setWidth).
Refer to the viewer api help.
I'm not sure if I still have an example of how I did this. Plus I did it in
VBScript so I'm not sure how much help it would really be is fou are using
JavaScript(which I am not personally real fond of) but hey that's just me

Bob


"Navid Falconer" wrote in message
news:B90ED9FD034B9B4FF7363AD17A78E09B@in.WebX.maYIadrTaRb...
> Vajdaur,
>
> Unfortunately any redline symbols you add to the map through the api will
> behave in this manner, such that they grow bigger or smaller as you zoom
in
> or out. Your other option is to add the symbols to the map by using the
> dynamic authoring toolkit and the api's support for the AddMapLayer()
> method. I have done this before, so I can at least tell you that it will
> work.
>
> To do this you would setup a routine on your server application that
> receives the parameters for the redline symbols to add to the map (such as
> the x/y location, name, etc.). Based on these parameters you would build
a
> dynamic map layer (.mlf) which you would then have to stream back the the
> user's map. It's not a simple solution, but in the end it is much better
> functionality than having to resize all of your redline symbols upon each
> map view change.
>
> Navid
>
>
> "vajdaur" wrote in message
> news:f1a4725.-1@WebX.maYIadrTaRb...
> Dear Developers,
> I have a problem. I create a redline layer dynamicaly from my program,
then
> I add new Symbols to the Layer.
> How Can I make this symbols "Constant size" like I can do it with the
> predefined layers? Or I always have to check them at every zoom and Remove
> them and create it with the new calculated size?
> I hope there is a much more easier way only I don't know about it. Please
> tell me how you use to solve this problem.
> Best Regardes
> Vajdaur
>
>
Message 4 of 5
Anonymous
in reply to: vajdaur

I checked the Autodesk Developer Network website. It also says that it is
not possible to create redlines whose text and sizes don't change with map
scale (document id: 66029) .

If it's just symbols that you need to create, and you have the dynamic
authoring toolkit, I'd recommend my first solution in the previous post.
However, if you need to create other redline objects as well (lines,
polygons, etc) then the storing and recreation upon scale change is probably
a better option.

Navid


"Bob Cassarly" wrote in message
news:04CF0380C0644CC48ADD45CF51E77637@in.WebX.maYIadrTaRb...
> I don't think that is true
> I think I actually did this a while back
> With the viewer API I believe you can set symbol(point elements) height,
> width etc. using MGSymbolAttr object (setHeight, setWidth).
> Refer to the viewer api help.
> I'm not sure if I still have an example of how I did this. Plus I did it
in
> VBScript so I'm not sure how much help it would really be is fou are using
> JavaScript(which I am not personally real fond of) but hey that's just me
>
> Bob
>
>
> "Navid Falconer" wrote in message
> news:B90ED9FD034B9B4FF7363AD17A78E09B@in.WebX.maYIadrTaRb...
> > Vajdaur,
> >
> > Unfortunately any redline symbols you add to the map through the api
will
> > behave in this manner, such that they grow bigger or smaller as you zoom
> in
> > or out. Your other option is to add the symbols to the map by using the
> > dynamic authoring toolkit and the api's support for the AddMapLayer()
> > method. I have done this before, so I can at least tell you that it
will
> > work.
> >
> > To do this you would setup a routine on your server application that
> > receives the parameters for the redline symbols to add to the map (such
as
> > the x/y location, name, etc.). Based on these parameters you would
build
> a
> > dynamic map layer (.mlf) which you would then have to stream back the
the
> > user's map. It's not a simple solution, but in the end it is much
better
> > functionality than having to resize all of your redline symbols upon
each
> > map view change.
> >
> > Navid
> >
> >
> > "vajdaur" wrote in message
> > news:f1a4725.-1@WebX.maYIadrTaRb...
> > Dear Developers,
> > I have a problem. I create a redline layer dynamicaly from my program,
> then
> > I add new Symbols to the Layer.
> > How Can I make this symbols "Constant size" like I can do it with the
> > predefined layers? Or I always have to check them at every zoom and
Remove
> > them and create it with the new calculated size?
> > I hope there is a much more easier way only I don't know about it.
Please
> > tell me how you use to solve this problem.
> > Best Regardes
> > Vajdaur
> >
> >
>
>
Message 5 of 5
MrGuran
in reply to: vajdaur

I trying to set up such a solution with the "Dynamical Authoring Toolkit" but have some problems making it work. Do you have any good example code how you did it. In other case I how some questions to specify my problems:

1, I tried to use the "WriteToMlf"-function, to save the redline layer as a mlf-file on the server through the DAT API without any success. It does not seams to work for "Redline" layers. What key functions did you use to get the redline layer to the server?

2, How do you make the layer "constant size"? Is the layer stored as an mlf-file and is the size recalculated before the redrawn in the map?

I would really appreciate a response! A good solution to this problem would really be useful!

/Goran

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

Post to forums  

Autodesk Design & Make Report