Shrikant
Shrikant

Reputation: 71

How to send WMS feature request

I am using react-native-mapbox-gl in my react-native app. I want to send a feature request to WMS server. In openlayer I found a solution

        MyLayer.getSource()
        .getGetFeatureInfoUrl(
            evt.coordinate,
            map.getView().getResolution(),
            map.getView().getProjection(),  
            {
                'INFO_FORMAT': 'application/json',
                'propertyName': 'OBJECTID,HOUSE_NUM'
            }
        );

This creates an URL of feature request. Is there any alternative method for "getGetFeatureInfoUrl" in mapbox-gl. Example will be very helpful.

Upvotes: 0

Views: 385

Answers (1)

Steve Bennett
Steve Bennett

Reputation: 126687

There is no direct support for constructing a GetFeatureInfo request in Mapbox-GL-JS. You will need to construct it yourself, and make your own HTTP request.

Upvotes: 1

Related Questions