Package org.gwtopenmaps.openlayers.client.util

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


     * @param origin default is center
     * @return a new bounds that is scaled by ratio from origin
     */
    public Bounds scale(float ratio,
            LonLat origin) {
        JSObject originJsObj = (origin == null) ? null : origin.getJSObject();
        return Bounds.narrowToBounds(BoundsImpl.scale(this.getJSObject(), ratio,
                                                      originJsObj));
    }
View Full Code Here


   * @return
   */
    public void addRules(Rule[] rules, String symbolizer)
    {
        JObjectArray array = new JObjectArray(rules);
        JSObject style = getJSObject().getProperty("styles").getProperty(symbolizer);
        StyleImpl.addRules(style, array.getJSObject());
    }
View Full Code Here

    protected Response(JSObject jsObject) {
        super(jsObject);
    }

    public VectorFeature[] getFeatures() {
        JSObject out = ResponseImpl.getFeatures(this.getJSObject());
        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

     * Set the stylemap to use.
     * @param styleMap The stylemap to use.
     */
    public void setStyleMap(StyleMap styleMap)
    {
        JSObject styleOption = JSObject.createJSObject();
        styleOption.setProperty("styleMap", styleMap.getJSObject());
        this.getJSObject().setProperty("layerOptions", styleOption);
    }
View Full Code Here

     * used returns null.
     *
     * @return the clustered features or null if clustering isn't used
     */
    public VectorFeature[] getCluster() {
        JSObject jsObjects = VectorFeatureImpl.getCluster(getJSObject());
        JObjectArray jObjectArray = JObjectArray.narrowToJObjectArray(jsObjects);
        // Should be null if this is not a cluster
        if (jObjectArray == null) {
            return null;
        }
View Full Code Here

     * it doesn't work via event object, so removeListener will not work
     * the name should therefore not be addSelectFeature...
     */
    public void onSelect(SelectFeatureListener listener)
    {
        JSObject callback = SelectFeatureImpl.createSelectFeatureCallback(listener);
        getJSObject().setProperty(EventType.CONTROL_SELECT_FEATURE_SELECT, callback);
    }
View Full Code Here

     * it doesn't work via event object, so removeListener will not work
     * the name should therefore not be addUnSelectFeature...
     */
    public void onUnSelect(UnselectFeatureListener listener)
    {
        JSObject callback = SelectFeatureImpl.createUnselectFeatureCallback(listener);
        getJSObject().setProperty(EventType.CONTROL_SELECT_FEATURE_UNSELECT, callback);
    }
View Full Code Here

     *
     * TODO: Same concern that for onSelect and onUnSelect ?
     */
    public void clickFeature(ClickFeatureListener listener)
    {
        JSObject callback = SelectFeatureImpl.createClickFeatureCallback(listener);
        getJSObject().setProperty("clickFeature", callback);
    }
View Full Code Here

    public String getFID() {
        return FeatureImpl.getFID(getJSObject());
    }

    public Popup createPopup(boolean closeBox) {
        JSObject popupObj = FeatureImpl.createPopup(this.getJSObject(), closeBox);

        return Popup.narrowToOpenLayersPopup(popupObj);
    }
View Full Code Here

        super(eventObject);
    }

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

        return (object != null) ? Box.narrowToBox(object) : null;
    }
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.