-
Notifications
You must be signed in to change notification settings - Fork 776
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
modify js script in stylesheet #2624
Comments
No, unfortunately there is no way to change the script dynamically. This would be a new feature request. Let us know if you come up with another solution! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is there any solution that I can modify the script in stylesheet?
I add a
FeatureModelLayer
and create a script for stylesheet, for render shapefile. In code, I create a array for stores feature.id, which those features I interested, there maybe more than one array, each array has own style. for example: the layer total has 6 features, I choose first 3 features for array A, others for array B. A=[1,2,3], B=[4,5,6], the number isfeature.id
, and use below function:after some operations, A=[1,2,3,5], B=[4], and I generate
std::string
by replace the array in JS. So the script like below:after call
featuremodellayer.dirty()
the render image is same as before. there are no difference;means the script is not update
I check the code in
FeatureModelGraph
, the_session
is create after add to map, and never changed._session
only rebuild scriptengine whenstyles()
is not set, however when add to map, the stylesheet of session has been seted, and never changed.May I miss some thing, about update script? Or I need modify the source code?
Thanks for any help.
The text was updated successfully, but these errors were encountered: