- marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
- marker.setLabelTextAnchor(TextAnchor.TOP_LEFT);
+ if (marker_top) {
+ marker.setLabelAnchor(RectangleAnchor.TOP_RIGHT);
+ marker.setLabelTextAnchor(TextAnchor.TOP_LEFT);
+ } else {
+ marker.setLabelAnchor(RectangleAnchor.BOTTOM_RIGHT);
+ marker.setLabelTextAnchor(TextAnchor.BOTTOM_LEFT);
+ }