Select to view content in your preferred language

Change the Polygon width on ARCGIS Layers

1261
5
Jump to solution
05-09-2014 08:35 AM
HelenAraya1
Deactivated User
I want to change the polygon boundary width for my zipcode layers inside javascript API for ARCGIS.Does any one know on how I can do it?

I am using a rest webservice for the zipcode layers

Here is the code I use to get the zipcode layer on top of the base map.
var queryTask = new esri.tasks.QueryTask(USZipCodesURLREST);
   var query = new esri.tasks.Query();
   query.outFields = ['ZIP'];
   query.returnGeometry = true;
   query.outSpatialReference = $Guardian_Scripts_Application.$mapDiv.spatialReference;
   query.geometry = $Guardian_Scripts_Application.$mapDiv.extent;
   queryTask.execute(query, null, null);
0 Kudos
1 Solution

Accepted Solutions
JohnGravois
Deactivated User
hi helen,

if you are passing the results of your query to a generic graphics layer, you can make the symbology anything you want.

new SimpleLineSymbol(style,color,width)
https://developers.arcgis.com/javascript/jsapi/simplelinesymbol-amd.html

when working with featureLayers, by default we inherit the symbology from the service itself, but you are able to override and set your own symbology on the clientside in that situation too.

FeatureLayer.setRenderer()
https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#setrenderer

View solution in original post

0 Kudos
5 Replies
JohnGravois
Deactivated User
hi helen,

if you are passing the results of your query to a generic graphics layer, you can make the symbology anything you want.

new SimpleLineSymbol(style,color,width)
https://developers.arcgis.com/javascript/jsapi/simplelinesymbol-amd.html

when working with featureLayers, by default we inherit the symbology from the service itself, but you are able to override and set your own symbology on the clientside in that situation too.

FeatureLayer.setRenderer()
https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#setrenderer
0 Kudos
HelenAraya1
Deactivated User
hi helen,

if you are passing the results of your query to a generic graphics layer, you can make the symbology anything you want.

new SimpleLineSymbol(style,color,width)
https://developers.arcgis.com/javascript/jsapi/simplelinesymbol-amd.html

when working with featureLayers, by default we inherit the symbology from the service itself, but you are able to override and set your own symbology on the clientside in that situation too.

FeatureLayer.setRenderer()
https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#setrenderer


Thanks a lot that worked for me!!!
0 Kudos
JohnGravois
Deactivated User
helen,

very glad to help.  when you have a moment, please consider marking this thread as 'answered'.
0 Kudos
HelenAraya1
Deactivated User
helen,

very glad to help.  when you have a moment, please consider marking this thread as 'answered'.


Can you let me know how I can set it answered. I am not sure how to do that.
0 Kudos
JohnGravois
Deactivated User
no worries, just click the �??check mark�?� icon on the right side of a helpful reply.

http://resources.arcgis.com/en/help/forums-mvp/
0 Kudos