fill symbol?

1084
3
05-19-2011 10:18 AM
LisaT
by
Occasional Contributor III
Hi, I am new to the javascript REST API and am having issues with applying a fill symbol to polygons in a resultset.  I am using myMapService.find() to pull a resultset.  From there, I can loop through the geometries and apply a fill/stroke using google.maps.polygon:
var polygon = new google.maps.Polygon({
              paths: Lines,
              strokeColor: colorStroke,
              strokeOpacity: 1,
              strokeWeight: 2,
              fillColor: colorFill,
              fillOpacity: 1,
              clickable: false
          });

However, I need to apply a diagonal stroke style to my fill instead of ONE color.  I see in the documentation (http://sampleserver3.arcgisonline.com/ArcGIS/SDK/REST/index.html) that there are symbol and renderer objects...but how to apply them??  I see a lot of examples utilizing dojo that access "map.graphics" or "feature.setSymbol", but these do not seem to be available with REST.  I have created my fill symbol:

   var fillSymb ={
        "type": "esriSFS",
        "style": "esriSFSBackwardDiagonal",
        "color": "#ADEFAB",
        "outline": {
            "type": "esriSLS",
            "style": "esriSLSSolid",
            "color": [110,110,110,255],
            "width": 1
         }
      };

How do I apply it to my result set??

Any comments/ideas would be MUCH appreciated!  Thank you!
0 Kudos
3 Replies
LisaT
by
Occasional Contributor III
Hi, I am new to the javascript REST API and am having issues with applying a fill symbol to polygons in a resultset.  I am using myMapService.find() to pull a resultset.  From there, I can loop through the geometries and apply a fill/stroke using google.maps.polygon:
var polygon = new google.maps.Polygon({
              paths: Lines,
              strokeColor: colorStroke,
              strokeOpacity: 1,
              strokeWeight: 2,
              fillColor: colorFill,
              fillOpacity: 1,
              clickable: false
          });

However, I need to apply a diagonal stroke style to my fill instead of ONE color.  I see in the documentation (http://sampleserver3.arcgisonline.com/ArcGIS/SDK/REST/index.html) that there are symbol and renderer objects...but how to apply them??  I see a lot of examples utilizing dojo that access "map.graphics" or "feature.setSymbol", but these do not seem to be available with REST.  I have created my fill symbol:

   var fillSymb ={
        "type": "esriSFS",
        "style": "esriSFSBackwardDiagonal",
        "color": "#ADEFAB",
        "outline": {
            "type": "esriSLS",
            "style": "esriSLSSolid",
            "color": [110,110,110,255],
            "width": 1
         }
      };

How do I apply it to my result set??

Any comments/ideas would be MUCH appreciated!  Thank you!




It has been a month with no replies...anyone have an idea as to why the fillsymbol object even exists in this library??  In what capacity would it even be used??  I have a heavy ArcObjects background and am having real problems with the limitations on the REST API...and now I'm finding that of the few objects available, many are not even usable!?  Please help if I am missing something!
0 Kudos
derekswingley1
Frequent Contributor
Since you're using the extender for Google Maps, you're limited by the capabilities of v2 of the Google Maps API. As far as I know, there is not a way to have use a diagonal fill symbol. The only way I know to accomplish this would be to move to the full ArcGIS API for JavaScript.
0 Kudos
LisaT
by
Occasional Contributor III
OK, so does anyone know how/why to use the "RendererObject" in the REST API?  (http://sampleserver3.arcgisonline.com/ArcGIS/SDK/REST/index.html) If not used as I am wanting to use it, why is it there? 

I am trying to build a case for using something different.  However, there is red tape in my company...
0 Kudos