Re: [OpenMap Users] Issues with layer

From: Don Dietrick <dietrick_at_bbn.com>
Date: Thu, 28 May 2009 20:15:43 -0400

Hi Mulone,

What do the coordinates look like coming out of the database? At
first glance, it looks like you are doing everything right. I'd check
what the list looks like in the paint method - are there OMGraphics
on graphList, is their needToRegenerate flag set to false, etc.

Are you calling repaint() on your layer when the list is ready? I
might be able to come up with more ideas if I see your layer code.

- Don

On May 28, 2009, at 7:34 PM, Mulone wrote:

>
> Hi everybody,
> I'm writing a layer to render some geometries loaded from PostGIS
> (imported
> from OpenStreetMap via osm2pgsql).
> For some reason he geometries are invisible. Taking a simple
> OMPoint, I
> create it with this simple function:
>
> static public OMPoint createOMGeomFromPostGis(org.postgis.Point
> point) {
> Assert.assertExp(point!=null);
> Assert.assertExp(org.postgis.Geometry.POINT == point.getType());
> OMPoint ompoint = new OMPoint((float) point.getY(), (float)
> point.getX());
> return ompoint;
> }
>
> And then I set some values:
>
> ompoint.setRadius( osmId.getPointSize() );
> ompoint.setFillPaint( osmId.getFillColor() );
> ompoint.setVisible(true);
> ompoint.setAppObject(outcome);
> graphList.add(ompoint);
> graphList.project(getProjection());
>
> In the paint() function I simply call a render
>
> public void paint(Graphics g) {
> graphList.render(g);
> }
>
> This way I'm not getting anything rendered on the map.
> What's wrong with my code?
>
> Bye,
> Mulone
> --
> View this message in context: http://www.nabble.com/Issues-with-layer-tp23771979p23771979.html
> Sent from the OpenMap mailing list archive at Nabble.com.
>
> --
> [To unsubscribe to this list send an email to "majdart_at_bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu May 28 2009 - 20:16:03 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT