Create a KmlLayer using the ArcObjects Java API

845
2
09-26-2011 07:37 PM
XtungBebei
New Contributor
How do you create a KmlLayer using the ArcObject Java API? I would like to then display that KmlLayer in a MapBean.

I've been able to load an ESRI Shapefile by creating a FeatureLayer using the ShapefileWorkspaceFactory and displaying that Feature Layer. I am trying to find a similar approach for loading a local KML file and displaying it in an ArcObject map using the Java API.

Thanks

xtungbebei
0 Kudos
2 Replies
EricBader
Occasional Contributor III
You can only add a kml layer to a GlobeBean.
0 Kudos
XtungBebei
New Contributor
Thanks. I have 2 follow up questions.

1. But if KmlLayer implements the ILayer interface then why couldn't I add it using a MapBean's addLayer method?


2. If I wanted to add it to a GlobeBean, is there some sample Java code around on how to create the KmlLayer from a local file?


Thanks

xtungbebei
0 Kudos