Hi Oliver, > I searched around on the DirectPosition... Should I use the following to > define it: > Di DirectPosition dp = new DirectPosition2D(crs, lon, lat); >
That's fine. You don't have to use DirectPosition if you don't want. You could, for instance, use Point2D instead. The advantage of working with DirectPosition objects is that they can hold both the coords and the CRS. > Also I'm confused on getting the area: > double displayAreaWidth = ... > > Is this from the ReferencedEnvelope that can be extracted from the > JMapPane.getDisplayArea? > ReferencedEnvelope re = wrappedPane.getDisplayArea(); > double displayAreaWidth = re.getWidth(); The code snippet assumes that you have some map width (in world coords) or zoom factor in mind. The displayAreaWidth var is the desired (minimum) width of the display area in world coords that will be centred on the point. For example, this might be calculated as a fraction of the current display width, or based on the spatial accuracy of your data or the local density of points. Hope this makes sense. Michael ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
