Select to view content in your preferred language

Are MapTips Supported in GraphicsLayer and are they working in FXMap in the beta?

1814
1
10-27-2015 05:18 AM
EricHolsinger
Deactivated User

We're working with a GraphicsLayer.  After adding attributes to a graphic and creating a corresponding LinkedHashMap, no worky, see code below:

//add a symbol and attributes, create the graphic

GraphicsLayer graphicsLayer = new GraphicsLayer();

TextSymbol textSymbol = new TextSymbol(10, "The symbol's contructor text!", Color.BLUE);

Map<String, Object> attributes = new HashMap<String, Object>();

attributes.put("UserId", "UserId");  //and other fields

Graphic graphic = new Graphic(point, textSymbol, attributes);

//after layer is initialized, from layerInitializeComplete on graphicslayer, add MapTips, tried this 6 Ways From Sun'dy, no worky:

LinkedHashMap<String, String> displayFields = new LinkedHashMap<String, String>();

displayFields.put("UserId", "UserId");  //and other fields if needed

MapTip mapTip = new MapTip(displayFields);

mapTip.setEnabled(true);

graphicsLayer.setMapTip(mapTip);

I figure this is not supported on GraphicsLayer, correct me if I'm wrong?

Also, if this is supported on GraphicsLayer, how is it added in FXMap?

final InfoPopupOverlay infoPopupOverlay = new InfoPopupOverlay();

        infoPopupOverlay.setPopupTitle("Building Data");

        infoPopupOverlay.setItemTitle("Extent of damage: {typdamage}");

map.??

Same answer?  Not supported in GraphicsLayer or FXMap viewer, right?

Thanks in advance,

The Other Eric

0 Kudos
1 Reply
EricBader
Honored Contributor

Hi Eric,

I've used your code above with point graphics in a graphicslayer and I can get it to work. However, it looks like you are trying to get it to work with graphic TextSymbols. This isn't supposed to work, I don't believe.

As for the Beta of JavaFX, you are right. At Quartz we will fully support JavaFX and this workflow.

0 Kudos