change the colore of the selection

160
3
11-21-2021 05:39 AM
Labels (1)
giladuzann
New Contributor

hallow.

I want to change the color of the choice from turquoise to another color.

When I choose a particular polygon, the choice is turquoise but I want it to be a different color.

Is this even possible?

thanks

giladuzann_0-1637501748284.png

 

 

 

 

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

is it a map widget?

Map widget—ArcGIS Experience Builder | Documentation

Options
Selection highlight—Change the highlight color for features selected in the map.


... sort of retired...
TonghuiMing
Esri Contributor

@giladuzann @DanPatterson - This issue should have been fixed and the selection change will take effect. Could you please double-check? Thanks.

TonghuiMing_0-1644562225063.png

 

0 Kudos
FredericPoliart_EsriAU
New Contributor III

1. Clone the entire 'arcgis-map' folder from ArcGISExperienceBuilder\client\dist\widgets\arcgis\arcgis-map

2. paste it in your \ArcGISExperienceBuilder\client\your-extensions\widgets  but rename the folder
to \my-arcgis-map\

3. Edit your manifest.json  ( "name": "my-arcgis-map", ) < must be exactly the same name as the folder name.

4. Add your my-arcgis-map widget in your project instead of the original (+select an AGOL map)

5. Edit the file \ArcGISExperienceBuilder\client\your-extensions\widgets\bcc-arcgis-map\src\runtime\components\mapbase.tsx   (not basemap.tsx, there is also a basemap.tsx but don't change that one)

6. Locate   if (config.selectionHighlightColor) {  

7. add your own code in there: (there is a haloColor and HaloOpacity but it doesn't seem to work yet)

    if (config.selectionHighlightColor) {
      // this.mapView.highlightOptions.color = new this.Color(config.selectionHighlightColor);
      this.mapView.highlightOptions.fillOpacity = 0.0;
      this.mapView.highlightOptions.haloOpacity = 0.95;
      this.mapView.highlightOptions.color = new this.Color('#00FF00');
      this.mapView.highlightOptions.haloColor = new this.Color('#FF0000');

      console.log('----------use Chrome Console to look at Object this.mapView.highlightOptions')
      console.log(this.mapView.highlightOptions)
    }


8. Reload the map 

 

voilà .

Ideally I would love to be able to create my own renderer and create some fancy double-lines,  dashed red and white with a proper halo,  but unfortunately it is a bit limited for now. 

=F=

 


@giladuzann wrote:

hallow.

I want to change the color of the choice from turquoise to another color.

When I choose a particular polygon, the choice is turquoise but I want it to be a different color.

Is this even possible?

thanks

giladuzann_0-1637501748284.png

 

 

 

 


 

0 Kudos