package org.maptalks.gis.core.geojson;

import java.util.Map;

public class Feature extends GeoJSON {
    private Geometry geometry;
    private Map<String, Object> properties;
    
    public Feature(
            Geometry geometry,
            Map<String,Object> properties) {
        super();
        this.setGeometry(geometry);
        this.setProperties(properties);
    }

    public Feature(
            Geometry geometry) {
        this(geometry,null);
    }

    public Feature() {
        super();
    }

    public Geometry getGeometry() {
        return geometry;
    }

    public void setGeometry(Geometry geometry) {
        this.geometry = geometry;
    }

    public Map<String, Object> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, Object> properties) {
        this.properties = properties;
    }

    @Override
    public boolean equals(Object obj) {
        if (!(obj instanceof Feature)) {
            return false;
        }

        Feature o = ((Feature) obj);
        if (this.geometry == null) {
            if (o.geometry != null) {
                return false;
            }
        } else if (!this.geometry.equals(o.getGeometry())) {
            return false;
        }
        if (this.properties == null) {
            if (o.properties != null) {
                return false;
            }
        } else if (!this.properties.equals(o.getProperties())) {
            return false;
        }
        return true;
    }
}

@@ -95,16 +95,39 @@
 oJSON %7B%0A
+    private Object id;%0A
     priv
@@ -145,24 +145,24 @@
 y geometry;%0A
-
     private 
@@ -876,24 +876,142 @@
 ies;%0A    %7D%0A%0A
+    public Object getId() %7B%0A        return id;%0A    %7D%0A%0A    public void setId(Object id) %7B%0A        this.id = id;%0A    %7D%0A%0A
     @Overrid
@@ -1628,16 +1628,18 @@
 n true;%0A
-
     %7D%0A
+%0A%0A
 %7D%0A

add id in Feature