Hi
I don't know why your code don't work, seem to be correct...
I have an old example (it work i think...) of code using mapj 2.0 , don't
have this kind of examples on our mapj3.0 projects
AnnotationTableDescHelper myATDH = new
AnnotationTableDescHelper("SelectionLayer");
AnnotationDataProviderHelper myADPH = new
AnnotationDataProviderHelper();
LocalDataProviderRef myLDPR = new LocalDataProviderRef(myADPH);
mapJLayer = mapJ.getLayers().insert(myLDPR,myATDH,0);
Rendition rendition = new Rendition();
rendition.setValue(Rendition.SYMBOL_TYPE,Rendition.SYMBOL_TYPE_FONT);
rendition.setValue(Rendition.SYMBOL_FONT_NAME, "Map Symbols");
rendition.setValue(Rendition.SYMBOL_CHAR,34);
rendition.setValue(Rendition.SYMBOL_COLOR, java.awt.Color.red);
OverrideTheme oTheme = new OverrideTheme(rendition, "SelectPoint");
mapJLayer.getThemeList().add(oTheme);
MapJ mapJ = mapWrapper.getMapJ();
FeatureFactory ff = mapJ.getFeatureFactory();
DoublePoint doublePoint = new DoublePoint(point.x,point.y);
doublePoint = mapJ.transformScreenToNumeric(doublePoint);
feature = ff.createPoint(doublePoint, null, null, null);
mapJLayer.addFeature(feature);
_______________________________________________
KOREM (http://www.korem.com)
GEObroadcasting your information
GEOdiffusion de l'information
_______________________________________________
Best MapInfo New Partner 2000 - North America
_______________________________________________
Antoine Gilbert
Analyst - Programmer
KOREM inc.
680, boul. Charest Est
Québec (Qc)
G1K 3J4 tél.: 418 647-1555
CANADA fax: 418 647-1666
Téléphone sans frais: 1 888 440-1MAP
_______________________________________________
----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 31, 2001 9:40 AM
> Subject: MI-L MapXtreme (Java) Layers editing
>
>
> > Hello Listers,
> > I have just started using MapXtreme Java. I am trying to edit a
> > layer ( add a feature via FeartureFactory.createPoint(....) method ) but
> am
> > getting an IncompatibleFeatureException. I am also using the
> > AnnotationDataProviderHelper and AnnotationTableDescHelper classes.
> > The line at which I am getting the exception is
> > "myMap.getLayers().getLayer("LA").addFeature(ff.createPoint(dp,
> > null, null, null));"
> > where myMap = obj of type MapJ and ff = obj of type FeartureFactory
> > com.mapinfo.dp.annotation.IncompatibleFeatureException
> > at
> >
>
com.mapinfo.dp.annotation.AnnotationDataProvider.checkFeature([DashoPro-V1.2
> > -120198])
> > at
> >
com.mapinfo.dp.annotation.AnnotationDataProvider.a([DashoPro-V1.2-120198])
> > at
> >
>
com.mapinfo.dp.annotation.AnnotationDataProvider.addFeature([DashoPro-V1.2-1
> > 20198])
> > at com.mapinfo.mapj.Layer.addFeature([DashoPro-V1.2-120198])
> > Can someone point out what wrong am I doing?
> > Also can you send me sample code where the same is being achieved?
> >
> > Thanx in advance,
> > Sachin D
> > [EMAIL PROTECTED]
> >
> >
> >
> > _______________________________________________________________________
> > List hosting provided by Directions Magazine | www.directionsmag.com |
> > To unsubscribe, send e-mail to [EMAIL PROTECTED] and
> > put "unsubscribe MapInfo-L" in the message body.
>
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.