Hi,
I have a couple of landmarks (plotted using inMemoryFeatureLayer) which I wish to label them. I tried using the inMemoryFeatureLayer but tool tip text is not supported,
May I know if there are any other alternatives ?
Bai
Tool Tip Text
Hi Bai,
Thanks for your post, following code is for your consideration:
Feature feture = new Feature(new PointShape(0, 0));
feture.ColumnValues["label"] = "labelContent";
InMemoryFeatureLayer inmLayer = new InMemoryFeatureLayer();
inmLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.Antarctical("labelContent");
inmLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
inmLayer.Columns.Add(new FeatureSourceColumn("label"));
inmLayer.InternalFeatures.Add(feture);
if you have any more question , please feel free to let us know.
Best Regards
Summer
Hi Summer,
Thank you for the reply,
I have used an icon (i.e. GeoImage) to represent the landmarks (i.e. petrol kiosk) and added to the inMemoryFeatureLayer using customStyle.
I tried using defaultTextStyle to include the label but had problem compiling the program since 2 different styles (i.e. customstyle and defaultTextStyle) cannot co-exist.
Please advise,
Regards,
Bai
CustomStyle is a collection, so put the TextStyle in there as well instead of DefaultTextStyle.
Hi Guys,
Thanks to Allen’s reply, it is very helpful.
Ben, would you please put the textstyle into a customstyles as ben instructed.
Thanks
Summer