Sorry - long and lat we're reversed. "Andy Czerwonka" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > "Jesse Eichar" <[EMAIL PROTECTED]> wrote in > message > news:[EMAIL PROTECTED] >> Hi, >> >> So what exactly are you trying to do here? Just transform from a point >> in world space to a coordinate on the screen? If that is the case then >> you can use one of the context's worldToPoint() methods to make the >> transformation. Look at the AbstractContext interface for the code if >> you don't want to use the context methods directly (you can create a >> ToolContext with the method: ApplicationGIS.createContext(map). Also >> all MapGraphics have access to a MapGraphics context. A final place to >> look is the layer's layerToMapTransform(). >> > [snip] > > I've got code that is correctly giving me the coordinates: > > double lat = getLatValue(location); > double lon = getLonValue(location); > Coordinate coordinate = new Coordinate(lat, lon); > > But, when I do this... > > MapGraphicContext context... (geeting it from the MapGraphic) > Point point = context.worldToPixel(coordinate); > > I get a very large point - way off the screen. When I render it... > > point = buildPoint(context, location); > int x = (int) point.getX(); > int y = (int) point.getY(); > graphics.fillRect(x - 3, y - 3, 5, 5); > > It's nowhere to be found... > > Help??? > >
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
