Greetings,

Yes, it is possible to do this. After you create the ArcIMS layer, set up
the mouse click event to call something like:

function mapclick( e ){
    layer.getFeatureInfo( openlayers_map.getLonLatFromPixel( e.xy ),
layer.options.layers[0],
      {
        callback: clickresult,
        scope: window
      }
    );
  }
};

function clickresult(features){
    if ( features !== null ) {
        vector.addFeatures( features.feature );
    }
};

Where "layer" is your arcims layer, "layer.options.layers[0]" is a layer
definition ArcXML needs a layer to query.  In the callback, "features" is an
object that corresponds to the ArcXML "FEATURES" element, and "vector" is
your vector layer where you want your features.  There is no need to
manually parse the response, it is handled before the getFeatureInfo
callback is invoked.

Just to let you know, there is a 1 map unit buffer by default.  This may not
be desireable, especially if you are working in EPSG:4326 (a 1 degree buffer
may be massively huge).

Zwarg

On Tue, Sep 15, 2009 at 6:20 AM, Jbaklouti <
[email protected]> wrote:

>
> Hello,
>
> i see your implementation of arcxml format and arcims layer, that work's
> very well.
> I would like to know if that is possible to display vector layer from
> arcxml.
> It will work like wfs:
>           - do arcxml request's (getfeature)
>           - parse xml response
>           - display vector from parsing.
> Are there an easy way to do it?
>
> Best regards
>
> --
> View this message in context:
> http://n2.nabble.com/Vector-layer-with-ArcXML-tp3648072p3648072.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to