ThinkGeo.com    |     Documentation    |     Premium Support

Labeling for InMemoryFeatureLayer

Hello,


This is further to the topic of 'Labelling Markers'. 


I am trying to add descriptive labels to Markers on the map.  The reason that I am using Markers is to be able to have hover and right click capabilities.  I need to labels to be able to contain multiple lines of data.


Added InMemoryMarkerOverlay to Map.CustomOverlays.  Created InMemoryFeatureLayer (positioned slightly off position of each Mark) added it is a new LayerOverlay and then added to Map.CustomOverlays. For the InMemoryFeatureLayer I have added a TextStyle using a customdata field with the label text to display (is there anyway to specify a string of text containing 1 or more customdata fields?)


I do the above again for  another type of Marker.  I have created the 4 CustomOverlays so I can make each visible or not depending on what options the user clicks.


When I change the IsVisible to true for the LayerOverlay containing my labels, the labels are cropped when I do any zooming and some are not displayed at all initially?  I have attached a 3 word documents (max file size issue) with an examples of what I am going for as well as a screen shot of the cropping labels.  Please let me know.


 



174-LabellingScreenShotsGoal.doc (35.5 KB)
175-LabellingScreenShots1.doc (177 KB)
176-LabellingScreenShots2.doc (156 KB)

Tony,


After having looked at your ScreenShots Goal, I think the attached demo is ideal for you, which uses popup for marker labels and here is the screenshots.


Here are the answers of your questions.


1, now we don’t support specifying a string containing 1 or more custom data fields directly, but you can write your own TextStyle and implement it. 
2, about label cutting, please have a look the post here, which has a detailed explanation why we have labels cut and how to solve it.
 
Any more queries please let us know.
 
Ben 

193-Post4967.zip (6.94 KB)