[mapguide-users] Chaging feature background color on client side

anniechan03 at yahoo.com anniechan03 at yahoo.com
Mon Feb 24 07:13:01 PST 2025


 Thanks Jackie,
That is what im actually doing, i put a debugger on the my html and tried to check the layer, i was able to get the layer but failed to fet all the features on it, its always blank, so, maybe you are right, i would need to go directly to fusion.js file. Reason for this scenario is that i am adding a filter section  on my maps and i want to change colors of those features whenever a user apply the filters on it.
But anyways thanks for the tips on what to do, ill see what i can really do with it.
Regards
    On Monday 24 February 2025 at 05:07:11 GMT-5, Jackie Ng via mapguide-users <mapguide-users at lists.osgeo.org> wrote:  
 
 If you can work with JavaScript then there is probably a way, but this is very hard in Fusion. The reason it is hard is because the selection color that is in your appdef is read and copied to many different places in the fusionSF javascript bundle, and there is no easily-callable function to change this value in all the appropriate places.
So while there are many instances of "selectionColor" in the bundle, you will have to intensely debug through the fusionSF JS bundle in your browser developer tools to see which "selectionColor" or "this.selectionColor" is ultimately being used to build the GETDYNAMICMAPOVERLAY request for the selection image. Once you have figured out which "selectionColor" this is, you'll then have to figure out how to get to this object from the object returned by Fusion.getMapByXXX() function at the root.
To assist in debugging, you should edit the index.html of your fusion template and change the fusionSF-compressed.js to fusionSF.js so that any breakpoints you put in your code will stick.
If you aren't a webdev, then what I just said is probably gibberish so the answer can be simply no.
That's all the hint breadcrumbs I can give you right now.
- Jackie

You wrote:
Hi,
Is there  a way to change a features background color in client side? Currently using fusion maps.
Thanks
Regards_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapguide-users/attachments/20250224/0c679092/attachment.htm>


More information about the mapguide-users mailing list