Reputation: 71
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
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