POST
|
Hi Kristian Ekenes, Thank you very much for the help and i am getting Uniuevalues for multiple fields. Correct it is giving only 10 colors and im trying to assign each unique value feature with unique color (between user choosen "from color" and "to color" ex: AlgorithmicColorRamp ) Appreciate any hints on the colorramp. Thanks S B
... View more
08-23-2019
11:57 PM
|
0
|
0
|
63
|
POST
|
With the help of your other thread answer...https://community.esri.com/message/873424-initialize-uniquevalue-renderer-with-3-fields i am able to generate UniqueValue renderer for 3 fields Trying to render UniqueValue renderer with colorramp. Appreciate help on this. Thanks. S B
... View more
08-23-2019
09:57 PM
|
0
|
0
|
27
|
POST
|
Hi Egge-Jan, I want to create one Unique renderer with 3 fields. Thanks S B
... View more
08-23-2019
04:18 AM
|
0
|
0
|
63
|
POST
|
I am using ArcGIS JavaScript API 4.12 version. I would like to initialize UniqueValue renderer with 3 fields. But .createRenderer supporting only one field. // visualization based on categorical field var typeParams = { layer : layer , basemap : map . basemap , field : "Party" // field2: "State", // it is not supporting // field3: "County" // it is not supporting } ; // when the promise resolves, apply the visual variables to the renderer typeRendererCreator . createRenderer ( typeParams ) . then ( function ( response ) { layer . renderer = response . renderer ; } ) ; Any advise please.
... View more
08-23-2019
02:58 AM
|
0
|
5
|
177
|
POST
|
Unique Value Renderer JavaScript API Version 4X We are trying to generate " Unique Value Renderer" on a "string" type field of the polygon feature class and colors should be assign between the given "From color" and "To color". Input: To achieve this, w e have used "typeRendererCreator.createRenderer" by passing the "Feature Layer" and "Field" as parameters. Output: It is rendering features with system defined 12 colors. Help required on how to pass the colorramp i.e.. "From color" and "To color" (AlgorithmicColorRamp) Following is the JavaScript API Version 4X snippet of the code we are trying to use < ! DOCTYPE html > < html > < head > < meta charset = "utf-8" / > < meta name = "viewport" content = "initial-scale=1,maximum-scale=1,user-scalable=no" / > < title > Generate data - driven visualization of unique values - 4.12 < / title > < link rel = "stylesheet" href = "https://js.arcgis.com/4.12/esri/themes/light/main.css" / > < style > html , body , #viewDiv { padding : 0 ; margin : 0 ; height : 100 % ; width : 100 % ; } < / style > < script src = "https://js.arcgis.com/4.12/" > < / script > < script > require ( [ "esri/Map" , "esri/views/MapView" , "esri/layers/FeatureLayer" , "esri/renderers/smartMapping/creators/type" , "esri/renderers/smartMapping/symbology/type" , "esri/widgets/Legend" , "esri/widgets/BasemapGallery" , "esri/widgets/Expand" ] , function ( Map , MapView , FeatureLayer , typeRendererCreator , typeScheme , Legend , BasemapGallery , Expand ) { // Create a map and add it to a MapView var map = new Map ( { basemap : "gray" } ) ; var view = new MapView ( { container : "viewDiv" , map : map , center : [ - 100 , 39 ] , zoom : 5 } ) ; // Create FeatureLayer var layer = new FeatureLayer ( { url : "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/US_county_crops_2007_clean/FeatureServer/0" } ) ; map . add ( layer ) ; view . when ( generateRenderer ) ; function generateRenderer ( ) { var params = { layer : layer , field : "POP2007" } ; typeRendererCreator . createRenderer ( params ) . then ( function ( response ) { // set the renderer to the layer and add it to the map layer . renderer = response . renderer ; } ) . catch ( function ( error ) { console . error ( "there was an error: " , error ) ; } ) ; } } ) ; < / script > < / head > <body> <div id="viewDiv"></div> </body> </html> Same thing we could achieve with JavaScript API Version 3X. By using JavaScript API Version 3X version we could achieve this and below is the code snippet which we were used (Attached complete code) . function createRenderer ( field ) { // base symbol renderer var baseSymbol = new SimpleFillSymbol ( ) ; baseSymbol . setStyle ( SimpleFillSymbol . STYLE_SOLID ) ; baseSymbol . setColor ( new Color ( [ 255 , 255 , 0 , 0.25 ] ) ) ; var highlightOutline = new SimpleLineSymbol ( ) ; highlightOutline . setWidth ( 1 ) ; highlightOutline . setStyle ( SimpleLineSymbol . STYLE_DASH ) ; highlightOutline . setColor ( new Color ( [ 255 , 0 , 0 , 1 ] ) ) ; baseSymbol . setOutline ( highlightOutline ) ; // from to colors for the renderer var defaultFrom = Color . fromHex ( "#008000" ) ; var defaultTo = Color . fromHex ( "#FF0000" ) ; var uniqueDefinition = new UniqueValueDefinition ( ) ; uniqueDefinition . colorRamp = colorRamp ; uniqueDefinition . attributeField = field ; uniqueDefinition . baseSymbol = baseSymbol ; var colorRamp = new AlgorithmicColorRamp ( ) ; colorRamp . fromColor = defaultFrom ; colorRamp . toColor = defaultTo ; colorRamp . algorithm = "hsv" ; // options are: "cie-lab", "hsv", "lab-lch" uniqueDefinition . colorRamp = colorRamp ; var params = new GenerateRendererParameters ( ) ; params . classificationDefinition = uniqueDefinition ; var generateRenderer = new GenerateRendererTask ( countiesUrl ) ; generateRenderer . execute ( params , applyRenderer , errorHandler ) ; } function applyRenderer ( renderer ) { featureLayer . setRenderer ( renderer ) ; featureLayer . redraw ( ) ; } function errorHandler ( err ) { console . log ( 'Oops, error: ' , err ) ; } Appreciate help on this. Thanks.
... View more
08-08-2019
01:00 AM
|
0
|
2
|
471
|
POST
|
Hi John, Sorry for the late reply to this. Thank you very much. It works. Thanks Sirish
... View more
05-20-2015
12:02 AM
|
0
|
0
|
11
|
POST
|
Hi John, Did you find any solution. I am also looking for this. I have posted similar kind of question here...and unfortunately no replies from ESRI. here is my question.. https://community.esri.com/message/420864#420864 Thanks, Sirish
... View more
10-08-2014
09:30 PM
|
0
|
2
|
11
|
POST
|
Hi All, We are using Arc 9.3 & ArcSDE with SQL 2008. We are accessing ArcSDE feature class and trying to update the selected features attribute for the field "Oneway" which is having Domains with the following simple code ISelection pSelection = pMap.FeatureSelection; IEnumFeature pEnumFeature = pSelection as IEnumFeature; IFeature pFeature = pEnumFeature.Next(); while (pFeature != null) { pFeature.set_Value(pFeature.Fields.FindField("Oneway"), "FT"); //"FT" is the coded value pFeature.Store(); pFeature = pEnumFeature.Next(); } After making some modifications while trying to reconcile & post the data..getting error as "The version could not be reconciled. Underlying DBMS error......" Can some one help me in this regard. Does this error occurring due to the Code or something related to SQL?
... View more
05-29-2013
03:00 AM
|
0
|
1
|
695
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|