I have two circles. The inner circle is red and represents a tightly controlled buffer around a point. The outer circle is yellow and represents a larger buffer where conditions are not as dire.
I want to combine the two circles, maintaining their individual symbologies, into one graphics that can be turned into a json object and stored in a user database.
Later, I want to pull this data into a map by using:
var dangerGraphic = new Graphic(json);
layer.add(dangerGraphic);
This would make the object similar to AutoCad blocks or Microstation Cells.
I know I can store the two circles as an array of graphics, but I am curious if there is a service that would do this.
Solved! Go to Solution.
Eugene,
One graphic can not have two different symbologies. So you would have to maintain two graphics. You can use toJson method of Circle
https://developers.arcgis.com/javascript/3/jsapi/circle-amd.html#tojson or Polygon
https://developers.arcgis.com/javascript/3/jsapi/polygon-amd.html#tojson to get the json for the geometry.
Eugene,
One graphic can not have two different symbologies. So you would have to maintain two graphics. You can use toJson method of Circle
https://developers.arcgis.com/javascript/3/jsapi/circle-amd.html#tojson or Polygon
https://developers.arcgis.com/javascript/3/jsapi/polygon-amd.html#tojson to get the json for the geometry.
OK, Thanks Robert!!!
It's as I thought...
Perhaps ESRI will consider this for future releases.