Describe the bug
Identify on MapImagerLayer return response saying geometry was not provided when it was. You appear to have fallen victim to the well know issue of python requests and nested dictionaries.
To Reproduce
Steps to reproduce the behavior:
l = arcgis.layers.MapImageLayer('https://coast.noaa.gov/arcgis/rest/services/FloodExposureMapper/CFEM_CoastalFloodHazardComposite/MapServer', gis=gis) f = {"geometry": Point({ "x" : -13575713.5781, "y" : 4384575.0913000032, "spatialReference": {"wkid": 102100, "latestWkid": 3857}})} l.identify(geometry=f['geometry'], geometry_type='Point', map_extent={ 'xmin': f['geometry']['x'], 'xmax': f['geometry']['x'], 'ymin': f['geometry']['y'], 'ymax': f['geometry']['y'], 'spatialReference': site['geometry']['spatialReference'] }, image_display='600,550,96', tolerance=0, return_geometry=False, layers='visible')
error:
{'error': {'code': 400, 'message': "Missing 'geometry' for identify operation.", 'details': []}}
Screenshots
You can clearly see the mangled data that requests is sending to the server.
Expected behavior
Expect it to return the output of the identify operation from the service.
Platform (please complete the following information):
Additional context
I should not have to wrap the geometry in json.dumps to get it to work.
l.identify(geometry=json.dumps(f['geometry']), geometry_type='Point', map_extent=json.dumps({ 'xmin': f['geometry']['x'], 'xmax': f['geometry']['x'], 'ymin': f['geometry']['y'], 'ymax': f['geometry']['y'], 'spatialReference': site['geometry']['spatialReference'] }), image_display='600,550,96', tolerance=0, return_geometry=False, layers='visible')
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4