Package org.gwtopenmaps.openlayers.client.util

Examples of org.gwtopenmaps.openlayers.client.util.JObjectArray


        this(PanelImpl.create(options.getJSObject()));
    }

    public void addControls(Control[] controls)
    {
        JObjectArray controlArray = new JObjectArray(controls);
        PanelImpl.addControls(this.getJSObject(), controlArray.getJSObject());
    }
View Full Code Here


    protected MultiPoint(JSObject element) {
        super(element);
    }

    public MultiPoint(Point[] points) {
        this(MultiPointImpl.create((new JObjectArray(points)).getJSObject()));
    }
View Full Code Here

    protected Polygon(JSObject element) {
        super(element);
    }

    public Polygon(LinearRing[] rings) {
        this(PolygonImpl.create((new JObjectArray(rings)).getJSObject()));
    }
View Full Code Here

    protected LinearRing(JSObject linearRing) {
        super(linearRing);
    }

    public LinearRing(Point[] pts) {
        this(LinearRingImpl.create((new JObjectArray(pts).getJSObject())));
    }
View Full Code Here

    public VectorOptions getVectorOptions() {
        return this.vectorOptions;
    }

    public void addFeatures(VectorFeature[] features) {
        JObjectArray a = new JObjectArray(features);
        VectorImpl.addFeatures(getJSObject(), a.getJSObject());

        /*
         * Solution without relay (see VectorImpl): for(int i = 0, max =
         * features.length; i < max; i++){ addFeature(features[i]); }
         */
 
View Full Code Here

        for (int i = 0; i < features.length; i++) {
            o[i] = features[i].getJSObject();
        }

        VectorImpl.removeFeature(getJSObject(),
                new JObjectArray(o).getJSObject());
    }
View Full Code Here

        JSObject[] jsObjects = new JSObject[layers.length];
        for (int i = 0; i < layers.length; i++) {
            jsObjects[i] = layers[i].getJSObject();
        }

        JObjectArray array = new JObjectArray(jsObjects);
        MapImpl.addLayers(getJSObject(), array.getJSObject());
    }
View Full Code Here

        return layer;
    }

    public Layer[] getLayers() {
        JSObject jsObjects = MapImpl.getLayers(getJSObject());
        JObjectArray jObjectArray = JObjectArray.narrowToJObjectArray(jsObjects);
        Layer[] layers = new Layer[jObjectArray.length()];
        for (int i = 0; i < jObjectArray.length(); i++) {
            layers[i] = Layer.narrowToLayer(jObjectArray.get(i));
        }
        return layers;
    }
View Full Code Here

     * @param vectorFeatures - an array of vector features
     * @return a String containing the vector features written in a particular
     * format.
     */
    public String write(VectorFeature[] vectorFeatures) {
        JObjectArray objectArray = new JObjectArray(vectorFeatures);

        return FormatImpl.writeArray(getJSObject(), objectArray.getJSObject());
    }
View Full Code Here

    // For example:
    // read(String vfString, WKTReadOptions options)
    // readToMap(String vfString, WKTReadOptions options)
    public VectorFeature[] read(String vectorFormatString) {
        JSObject out = FormatImpl.read(getJSObject(), vectorFormatString);
        JObjectArray jObjectArray = JObjectArray.narrowToJObjectArray(out.ensureOpaqueArray());
        int nr = jObjectArray.length();
        VectorFeature[] vfs = new VectorFeature[nr];
        for (int i = 0; i < nr; i++) {
            // get objects and narrow them to vector features
            vfs[i] = VectorFeature.narrowToVectorFeature(jObjectArray.get(i));
        }

        return vfs;
    }
View Full Code Here

TOP

Related Classes of org.gwtopenmaps.openlayers.client.util.JObjectArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.