Hi,
I have no problems adding a feature layer to a gis.map('MyMap') and then make a selection from that feature layer. I can zoom to the single feature fine, query its attributes, update, delete ... but there are two things I cant find that I would like to do
I have too many features in a map extent to just change the extent ... I need to show the element better ..
Any help appreciated. I work in a jupyter notebook ...
Guenter
Solved! Go to Solution.
No comments so far - here my workaround if anyone stumbles across it:
I select the one feature I'd like to highlight using its ObjectID to create a "one-element-feature-set":
My_fset = MyLayer.query(where ='objectid = '+str(TheObjectID))
Now I can add that FeatureSet to the map as a draw-element and even (answer to my second question below) give it a basic popup:
For the popup I first need access to a feature (also there is only one in the Set):
My_feature = My_fset[0]
Now I can add it to the map and define the popup in one go
MyMap.draw(My_fset,{"title":"Popup-Title" , 'content': str(My_feature.attributes['field_a'])+" "+str(My_feature.attributes['field_b'])+': '+str(My_feature.attributes['field_c'])})
Hope this is helpful to anyone else - and still if there is an answer to my initial question - let me know 🙂
No comments so far - here my workaround if anyone stumbles across it:
I select the one feature I'd like to highlight using its ObjectID to create a "one-element-feature-set":
My_fset = MyLayer.query(where ='objectid = '+str(TheObjectID))
Now I can add that FeatureSet to the map as a draw-element and even (answer to my second question below) give it a basic popup:
For the popup I first need access to a feature (also there is only one in the Set):
My_feature = My_fset[0]
Now I can add it to the map and define the popup in one go
MyMap.draw(My_fset,{"title":"Popup-Title" , 'content': str(My_feature.attributes['field_a'])+" "+str(My_feature.attributes['field_b'])+': '+str(My_feature.attributes['field_c'])})
Hope this is helpful to anyone else - and still if there is an answer to my initial question - let me know 🙂