Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Troubleshooting label widget #28

Open
green3g opened this issue Dec 5, 2016 · 6 comments
Open

Troubleshooting label widget #28

green3g opened this issue Dec 5, 2016 · 6 comments

Comments

@green3g
Copy link
Owner

green3g commented Dec 5, 2016

Moved from cmv/cmv-app#642 (comment)

@roemhildtg We're giving it a try in a copy of our editor. Looks good for a long time, but ultimately doesn't label. We keep getting an error , maybe one of those still existing bugs you mention. Maybe analyzing the error in the app helps to see what's happening: https://www.hgis-indias.net/cmv-app-master/label/

Anyway, please keep me updated, this seems to be really useful for us, probably not for all layers, but for the "aggregated data" ones, where I can imagine people would want to use different values as labels and there's no need to label more than one of them.

@green3g
Copy link
Owner Author

green3g commented Dec 5, 2016

I tried adding labels to the lagos layer (https://www.hgis-indias.net:6443/arcgis/rest/services/HGIS/hgis_fisico/MapServer/1)

The error I get is esri.layers.FeatureLayer: unable to find a field of type 'esriFieldTypeGeometry' in the layer 'fields' information. If you are using a map service layer, features will not have geometry [url: https://www.hgis-indias.net:6443/arcgis/rest/services/HGIS/hgis_fisico/MapServer/1]

This means you don't have your "Shape" field turned on when you published the service. This is highly recommended to have turned on, and it is necessary for Feature layers which the label layer uses.

@Wernazuma
Copy link

FYI, I published the service again with all fields turned on!

@green3g
Copy link
Owner Author

green3g commented Jan 20, 2017

@Wernazuma I've made some major enhancements to the label widget.

After going back through your original issue, it appears we both had a very similar issue...people want different types of labels and rather than providing a set of 15-20 layaers just for labels, why not let the user create them on the fly?

The new functionality allows exactly this, and you can also set up predefined labels as the developer to enable users to quickly add frequently used/complex label expressions.

https://github.com/roemhildtg/cmv-widgets/tree/master/widgets/LabelLayer

@green3g
Copy link
Owner Author

green3g commented Apr 21, 2017

FYI, your app is using an old version of the api (3.14). you may want to try updating to 3.19 and see if anything changes.

@Wernazuma
Copy link

Thank you for your update! We'll try that and make a new effort to get it working. This could make our app so much lighter instead of having dozens of "label only" layers. I'm at a conference next week, but I will report back how we fare!

@Wernazuma
Copy link

An update: We checked the new version 3.2 but we figured that there is a lot we'd have to work over so we wait for CMV version 2.0 so we don't do redundant work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants