Search in sources :

Example 46 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class GeometryStyleRenderer method toMap.

@Override
public MapEx toMap() {
    final MapEx map = super.toMap();
    if (this.style != null) {
        final Map<String, Object> styleMap = this.style.toMap();
        map.putAll(styleMap);
    }
    return map;
}
Also used : MapEx(com.revolsys.collection.map.MapEx) LineString(com.revolsys.geometry.model.LineString)

Example 47 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class MarkerStyle method toMap.

@Override
public MapEx toMap() {
    final boolean geometryStyle = this instanceof GeometryStyle;
    final MapEx map = new LinkedHashMapEx();
    for (final String name : PROPERTY_NAMES) {
        if (geometryStyle || name.startsWith("marker")) {
            final Object value = Property.get(this, name);
            boolean defaultEqual = false;
            if (DEFAULT_VALUES.containsKey(name)) {
                final Object defaultValue = DEFAULT_VALUES.get(name);
                defaultEqual = DataType.equal(defaultValue, value);
            }
            if (!defaultEqual) {
                addToMap(map, name, value);
            }
        }
    }
    return map;
}
Also used : MapEx(com.revolsys.collection.map.MapEx) LinkedHashMapEx(com.revolsys.collection.map.LinkedHashMapEx) LinkedHashMapEx(com.revolsys.collection.map.LinkedHashMapEx)

Example 48 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class WebMercatorTileCacheLayer method toMap.

@Override
public MapEx toMap() {
    final MapEx map = super.toMap();
    map.put("type", "openStreetMap");
    addToMap(map, "url", this.url);
    return map;
}
Also used : MapEx(com.revolsys.collection.map.MapEx)

Example 49 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class GridLayerRenderer method toMap.

@Override
public MapEx toMap() {
    final MapEx map = super.toMap();
    addToMap(map, "geometryStyle", this.geometryStyle);
    addToMap(map, "textStyle", this.textStyle);
    return map;
}
Also used : MapEx(com.revolsys.collection.map.MapEx)

Example 50 with MapEx

use of com.revolsys.collection.map.MapEx in project com.revolsys.open by revolsys.

the class GeoreferencedImageLayer method toMap.

@Override
public MapEx toMap() {
    final MapEx map = super.toMap();
    map.remove("querySupported");
    map.remove("selectSupported");
    map.remove("editable");
    map.remove("showOriginalImage");
    map.remove("imageSettings");
    addToMap(map, "url", this.url);
    addToMap(map, "opacity", this.opacity, 1);
    return map;
}
Also used : MapEx(com.revolsys.collection.map.MapEx)

Aggregations

MapEx (com.revolsys.collection.map.MapEx)144 LinkedHashMapEx (com.revolsys.collection.map.LinkedHashMapEx)48 ArrayList (java.util.ArrayList)17 Resource (com.revolsys.spring.resource.Resource)9 GeometryFactory (com.revolsys.geometry.model.GeometryFactory)7 Map (java.util.Map)7 HashMap (java.util.HashMap)6 PathName (com.revolsys.io.PathName)5 UrlResource (com.revolsys.spring.resource.UrlResource)5 DataType (com.revolsys.datatype.DataType)4 FieldDefinition (com.revolsys.record.schema.FieldDefinition)4 PathResource (com.revolsys.spring.resource.PathResource)4 Color (java.awt.Color)4 LinkedHashMap (java.util.LinkedHashMap)4 List (java.util.List)4 TreeMap (java.util.TreeMap)4 NamedLinkedHashMapEx (com.revolsys.collection.map.NamedLinkedHashMapEx)3 Geometry (com.revolsys.geometry.model.Geometry)3 LineString (com.revolsys.geometry.model.LineString)3 Record (com.revolsys.record.Record)3