@@ -0,0 +1,2208 @@
+package fi.nls.oskari.control.view.modifier.param;%0A%0Aimport fi.nls.oskari.annotation.OskariViewModifier;%0Aimport fi.nls.oskari.util.JSONHelper;%0Aimport fi.nls.oskari.view.modifier.ModifierException;%0Aimport fi.nls.oskari.view.modifier.ModifierParams;%0Aimport fi.nls.oskari.view.modifier.ParamHandler;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0A@OskariViewModifier(%22cam%22)%0Apublic class CamParamHandler extends ParamHandler %7B%0A%0A    private static final String KEY_CAMERA = %22camera%22;%0A    private static final String KEY_ORIENTATION = %22orientation%22;%0A    private static final String KEY_HEADING = %22heading%22;%0A    private static final String KEY_PITCH = %22pitch%22;%0A    private static final String KEY_ROLL = %22roll%22;%0A    private static final String KEY_LOCATION = %22location%22;%0A    private static final String KEY_ALTITUDE = %22altitude%22;%0A    private static final String KEY_X = %22x%22;%0A    private static final String KEY_Y = %22y%22;%0A%0A    public boolean handleParam(final ModifierParams params) throws ModifierException %7B%0A        if(params.getParamValue() == null) %7B%0A            return false;%0A        %7D%0A%0A        final String%5B%5D camProps = params.getParamValue().split(%22_%22);%0A        if (camProps.length != 6) %7B%0A            return false;%0A        %7D%0A%0A        JSONObject location = new JSONObject();%0A        JSONHelper.putValue(location, KEY_X, camProps%5B0%5D);%0A        JSONHelper.putValue(location, KEY_Y, camProps%5B1%5D);%0A        JSONHelper.putValue(location, KEY_ALTITUDE, camProps%5B2%5D);%0A%0A        JSONObject orientation = new JSONObject();%0A        JSONHelper.putValue(orientation, KEY_HEADING, camProps%5B3%5D);%0A        JSONHelper.putValue(orientation, KEY_PITCH, camProps%5B4%5D);%0A        JSONHelper.putValue(orientation, KEY_ROLL, camProps%5B5%5D);%0A%0A        JSONObject camera = new JSONObject();%0A        JSONHelper.putValue(camera, KEY_LOCATION, location);%0A        JSONHelper.putValue(camera, KEY_ORIENTATION, orientation);%0A%0A        try %7B%0A            final JSONObject mapfullState = getBundleState(params.getConfig(), BUNDLE_MAPFULL);%0A            mapfullState.put(KEY_CAMERA, camera);%0A        %7D catch (JSONException je) %7B%0A            throw new ModifierException(%22Could not apply cam parameters%22);%0A        %7D%0A        return false;%0A    %7D%0A%7D%0A

move cam param handler from pti server