Hi Nischal,
It looks like there is some constant pixel offset being introduced to
the polygon points, and I'm not sure why. I took your code, and slipped
it into a TestPlugIn object (included) and everything seemed to line up.
Properties for the plugin:
testPI.class=com.bbn.openmap.plugin.PlugInLayer
testPI.prettyName=TEST
testPI.plugin=com.bbn.openmap.plugin.TestPlugIn
I'm wondering about the how you are referencing the projection
(map.getProjection()). I would use the projection as you've received it
from the ProjectionEvent in your layer. I don't really know if that's
the problem (it shouldn't be), but I'm grasping at straws since I can't
really reproduce your problem any other way.
- Don
NVohra@eq-technologic.com wrote:
>
> Hi Don,
> I am attaching two screen shots, normal and zoomed version. Just check the
> output.
> Nischal vohra
>
> The future belong to those who believe in the beauty of their dreams.
> -Roosevelt.
>
> (See attached file: Maps.zip)
>
>
> Don Dietrick
> <dietrick@bbn To: NVohra@eq-technologic.com
> .com> cc: openmap-users@bbn.com
> Subject: Re: How to use OMGraphics classes like OMPoly?
> 06/28/01
> 06:41 PM
>
>
>
> Hi Nischal,
>
> It looks like you are doing everything perfectly, and I'm surprised
> everything wouldn't line up. How far off is the polygon above the
> points? Do you have a screen shot? Also, does the effect change when
> you zoom in and out?
>
> - Don
>
> NVohra@eq-technologic.com wrote:
> >
> > Hello Don,
> > I am new to openmap and until now i am successful in drawing and
> > plotting points on a map using csv file.
> > Now when i give same points to OMPoly so that they get connected, the
> > figure appears above the points i.e
> > not exactly on the points
> >
> > float points[] = { 28.4f, 77.2f,
> > 23.03f, 72.40f,
> > 18.55f, 72.54f,
> > 11.0f, 77.0f,
> > 22.34f, 88.24f,
> > 28.4f, 77.2f};
> > OMPoly poly = new OMPoly(points, OMGraphic.DEGREES,
> > OMGraphic.LINETYPE_STRAIGHT);
> > poly.setVisible(true);
> > poly.setLinePaint(Color.black);
> > poly.generate(map.getProjection());
> >
> > I have given the points in the similar fashion in csv .
> > Loc1,28.4,77.2
> > Loc2,23.03,72.40 and so on.
> >
> > I am not able to understand the reason behind it..is it that OMPoly
> > converts points array to Radians and due to that
> > something happens?
> >
> > Thanx in advance
> >
> > -Nischal(See attached file: dietrick.vcf)
>
> ------------------------------------------------------------------------
> Name: Maps.zip
> Maps.zip Type: application/zip (application/zip)
> Encoding: base64
> Description: .ZIP File
-- [To unsubscribe to this list send an email to "majdart@bbn.com" with the following text in the BODY of the message "unsubscribe openmap-users"]
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:31 EDT