1

I am using ArcGIS Runtime SDK for Android and it supports wmslayer but there is no sample or code for selection feature with using wmslayer. My app shows the map getting data from my wms server.

Do you know how I can do that?

  • What do you mean with select? You can request feature information (if the server supports it), but selecting is not possible on a WMS server. – johanvdw Nov 27 '13 at 9:13
  • thanks for answer. I can tell you like that i have map and my app show map on android and it is getting data from geoserver wms. But when i click map, i need to get feature information which i click region on map. – Görkem Karadoğan Nov 27 '13 at 9:18
  • Nobody use wmslayer on argics android ? i just need to when i click somewhere on map i need to see feature information. – Görkem Karadoğan Nov 27 '13 at 10:40
1

What you want is to get featureinfo from a wms layer. This done using an operation called getfeatureinfo. This operation is not always enabled: this depends on your server. You can check whether your server supports this by running a getCapabilities request. This is an obliged operation for a wms service.

http://localhost:8080/geoserver/wms?
service=wms&
version=1.1.1&
request=GetCapabilities

Depending on the server and the request the response may have different formats, eg xml or html. Usually xml is one of them. You can then parse this xml using xsl/...

Googling getfeatureinfo will give you several examples. You just need to pass the point and whatever other info you passed before the the wms server

    http://localhost:8080/geoserver/wms?
&INFO_FORMAT=application/json
&REQUEST=GetFeatureInfo
&EXCEPTIONS=application/vnd.ogc.se_xml
&SERVICE=WMS
&VERSION=1.1.1
&WIDTH=970&HEIGHT=485&X=486&Y=165&BBOX=-180,-90,180,90
&LAYERS=COUNTRYPROFILES:grp_administrative_map
&QUERY_LAYERS=COUNTRYPROFILES:grp_administrative_map
&TYPENAME=COUNTRYPROFILES:grp_administrative_map

Note again that this is optional: you should first check whether your server supports this. Example URLS from: http://docs.geoserver.org/stable/en/user/services/wms/reference.html

  • t1311.hizliresim.com/1h/v/uxwcw.png this is my map and when you can see the island on the map when i click one of them, i need to get data from wms server. But on argcis there is no example or sample for wms server selection feature. Thats a problem. as you can say that i could get all data from wms and show map but i didnt access feature information. How can i access ? – Görkem Karadoğan Nov 27 '13 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.