package fi.nls.oskari.map.layer.formatters;

import org.json.JSONObject;

import fi.nls.oskari.domain.map.MyPlaceCategory;
import fi.nls.oskari.domain.map.OskariLayer;

/**
 * MyPlaces category to Oskari layer JSON
 */
public class LayerJSONFormatterMYPLACES extends LayerJSONFormatterUSERDATA {

    private static final String KEY_IS_DEFAULT = "isDefault";

    public JSONObject getJSON(OskariLayer baseLayer, MyPlaceCategory category, String srs) {
        category.getWFSLayerOptions().setProperty(KEY_IS_DEFAULT, category.isDefault());

        return super.getJSON(baseLayer, category, srs);
    }

}

@@ -442,16 +442,29 @@
 ring srs
+, String lang
 ) %7B%0A    
@@ -602,16 +602,22 @@
 ory, srs
+, lang
 );%0A    %7D

add lang to myplaces layerjson formatter