I am importing a KML file from GoogleEarth into a DesktopEdition application. I recently upgraded our application to MapSuite Desktop Edition 8.0 and I have replaced custom KMLFeatureLayer, KMLFeatureSource, and KMLStyle code with the MapSuite 8.0 classes for KMLFeatureLayer and KMLFeatureSource. Our application has to be run in a local intranet without connections to the internet.
I would like to know how to override the default IconStyle in the MapSuite 8.0 KMLFeatureLayer. I have tried to define a ZoomlLevelSet with ZoomLevel where I define my own PointStyle to set the DefaultPointStyle and defined an IconStyle which I add to the CustomStyles but they are ignored and the KMLFeatureLayer. The icon is always displayed with some default icon that looks like a blue rectangle (no connection to the internet means so icons available by href from Google).
Before MapSuite 8.0 I was able to define a custom PointStyle in the custom KMLFeatureLayer class. Do I have to return to a custom defined KMLFeatureLayer in order to define the PointStyle/IconStyle to override the default?
Richard
KMLFeatureLayer PointStyle
Hi Richard,
I view the code of KmlFeatureLayer and found it have two styling type: EmbeddedStyle and StandardStyle, and the default is EmbeddedStyle.
It looks if you don’t set the property StylingType of KmlFeatureLayer, the style will comes from data source.
So I think if you want to make your custom styles works, you can try to set the value to StandardStyle.
Please let me know whether that works for you.
Regards,
Don
Don,
Thanks for the quick response.
Thanks also for the tip on the KMLStylingType. I tried the StandardStyle and it does exactly what I was looking for. I can define my own PointStyle to show as the icon. The EmbeddedStyle is using some default PointStyle that must be defined when the IconStyle from the KML can not be referenced.
Thanks again for the help.
Richard
Richard,
I am glad to hear that works for you.
We will do our best to reply the questions in forum.
Any question please let us know.
Regards,
Don