Mark Presling wrote:

Hi all.

I can't seem to find how to register a listener that notifies me of a change to the map state, ie zoom, pan, resize. I am rendering a point on the map at the moment, but whenever I alter the map in some way it stays in the same location. I want to be able to make it move with the world coordinates of the map.

One thing you could do is use the world to point transforms in the viewport model, and then whenever the system asks you to draw you can be placed in the correct spot?

I've been looking at the edit tools to see if I can figure out how they do it, but it's a bit above my level of understanding in there... :(

They have convience methods that go off and talk to the Viewport model.

Can someone PLEASE point me in the right direction... I'm going nuts. Too many hours + release tomorrow = STRESS!


I have updated the FAQ on how to tell when things change -
http://udig.refractions.net/confluence/display/DEV/How+to+tell+when+something+changes

But that does not seem to be your problem, you should not have to know when things change. Whenever you are asked to draw (in your MapGraphic I assume?) you can use the worldToPixel and pixelToWorld methods: http://udig.refractions.net/docs/api-udig/net/refractions/udig/project/render/IViewportModel.html

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to