use of org.discotools.gwt.leaflet.client.types.IconOptions in project opennms by OpenNMS.
the class NodeMapConnector method initializeIcons.
private void initializeIcons() {
if (m_icons == null) {
m_icons = new HashMap<String, Icon>();
for (final String severity : new String[] { "Normal", "Warning", "Minor", "Major", "Critical" }) {
IconOptions options = new IconOptions();
options.setIconSize(new Point(25, 41));
options.setIconAnchor(new Point(12, 41));
options.setPopupAnchor(new Point(1, -34));
options.setShadowUrl(new Point(41, 41));
String basePath = GWT.getModuleBaseForStaticFiles() + "images/";
if (isRetina()) {
options.setIconUrl(basePath + severity + "@2x.png");
} else {
options.setIconUrl(basePath + severity + ".png");
}
Icon icon = new Icon(options);
m_icons.put(severity, icon);
}
}
}
Aggregations