Package org.gwtopenmaps.openlayers.client.util

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


        super(eventObject);
    }

    public Layer getSource()
    {
        JSObject object = getSourceJSObject();

        return (object != null) ? Layer.narrowToLayer(object) : null;
    }
View Full Code Here


     *  This is a fix to a FF issue to prevent pink rectangles.
   *  @see http://lists.osgeo.org/pipermail/openlayers-users/2012-March/024610.html
     */
    public void crossOriginFix()
    {
      JSObject topO = JSObject.createJSObject();
      topO.setProperty("crossOriginKeyword",(String) null);
      this.getJSObject().setProperty("tileOptions", topO);
    }
View Full Code Here

        super(eventObject);
    }

    public Control getSource()
    {
        JSObject object = getSourceJSObject();

        return (object != null) ? TransformFeature.narrowToControl(object) : null;
    }
View Full Code Here

     *
     * @return Layer - the layer on the map or null if there is no layer with
     * the given id
     */
    public Layer getLayer(String id) {
        JSObject jsObject = MapImpl.getLayer(id, getJSObject());
        Layer layer = Layer.narrowToLayer(jsObject);
        return layer;
    }
View Full Code Here

        Layer layer = Layer.narrowToLayer(jsObject);
        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));
        }
View Full Code Here

        }
        return layers;
    }

    public Control getControlsByClass(String className) {
        JSObject jsObject = MapImpl.getControlsByClass(getJSObject(), className);
        return Control.narrowToControl(jsObject);
    }
View Full Code Here

     *
     * Returns: {<OpenLayers.Control>} The control from the map's list of
     * controls which has a matching 'id'. If none found, returns null.
     */
    public Control getControl(String controlID) {
        JSObject jsObject = MapImpl.getControl(getJSObject(), controlID);

        return (jsObject != null) ? Control.narrowToControl(jsObject) : null;
    }
View Full Code Here

    public SLD() {
        this(SLDImpl.create());
    }

    public SLDResult read(String data) {
        JSObject result = SLDImpl.read(getJSObject(), data);
        return new SLDResult(result);
    }
View Full Code Here

    // specific read functions should be constructed.
    // 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));
View Full Code Here

  public StyleOptions(){
    this(JSObject.createJSObject());
  }
   
    public void addContextStyleCallback(String id, ContextStyler styler) {
        JSObject context = getJSObject().getProperty("context");
        if (context == null) {
            getJSObject().setProperty("context", JSObject.createJSObject());
            context = getJSObject().getProperty("context");
        }
        context.setProperty(id, StyleOptionsImpl.createContextStylerCallback(styler));
    }
View Full Code Here

TOP

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

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.