I do not know or use the best mapgraphic not know how to "get" the
mapgraphic the map in order to draw him to call the function
I saw how it works with this link
(
http://udig.refractions.net/confluence/display/DEV/Providing+Visual+Feedback+from+a+View
)
but not found anything talking about how to get the mapgraphic
could help me with this please?


Date: Sun, 26 Jun 2011 09:46:27 +1000
From: Jody Garnett <[email protected]>
Subject: Re: [udig-devel] draw in map
To: User-friendly Desktop Internet GIS
       <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="utf-8"

You may wish to use a "Mapgraphic" or decorator to display feedback on the
map that moves around with the map. The draw shape command is mostly
intended for visual feedback when using a tool. You can (if needed) update
the data that your draw shape command uses (your teste Line2D in this case)
so that the line is scaled as the map zoom changes. It is best to record
your positions as "coordinates" in this case; and use the viewport methods
to transform them into pixels as needed.

--
Jody Garnett


On Friday, 24 June 2011 at 1:41 AM, carlos henrique de souza junior wrote:

>
> hello guys I'm trying to create a plugin to draw the map floor plan for an
irrigation system, but am having trouble with the fact of drawing lines on
the map because the drawings do not move together with the map.
>  For example if I give a map zoom increases the size but the design stays
the same size
> this test is that when I give a click on the map it should draw a line
from the point you clicked:
>
>
> Line2D teste = new Line2D.Double(new Double(e.x), new Double(e.y),e.x +
122, e.y + 15);
>
>  DrawShapeCommand dF =
getContext().getDrawFactory().createDrawShapeCommand(teste,Color.BLUE);
>
> dF.setStroke(133333, 0);
>
> getContext().sendSyncCommand(dF);
>
>
>
> Anyone know why this desenhao not respond to command together with the
map?
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <
http://lists.refractions.net/pipermail/udig-devel/attachments/20110626/7756914e/attachment-0001.html
>
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to