Select to view content in your preferred language

Spatial Data Server (SDS) support in SFV

1089
1
11-27-2012 03:16 AM
AdneKylleso
Emerging Contributor
Hi 🙂

We have recently upgraded to 10.1 and are looking at the new Spatial Data Server (SDS).

We have managed to get it installed and working from arcgis.com webmap, but we are struggeling with getting it to work with SFV (v. 3.0) defined as a Featrure layer.

Is SDS supported by SFV? If so how to specify?

Regards,
Kjetil
Tags (2)
0 Kudos
1 Reply
ChrisNorth
Esri Contributor
Hi,

I have not had any luck. I have a custom widget in the Flex viewer and it does display feature services from SDS, but ironically the main map does not.  THe reason for this (as far as I can tell) is that when the main map adds an operational layer, it treats it like a map service, and adds the layer, but not the graphics.  My custom widget (and other widgets) interact with the graphics, so they work.  you get this strange situation where the legend, custom print widget and TOC all show the layer, but the main map does not. 

SDS based layers do work in the Flex API, it's all about how you add them.

So, for SDS-based layers, something like this works...

var newfl:FeatureLayer = new FeatureLayer(url, proxyURL, .token);
var featgl:GraphicsLayer = new GraphicsLayer();
var featexistingGraphics:ArrayCollection=newfl.graphicProvider as ArrayCollection;
  featgl.renderer = myRenderer; //define elsewhere
  featgl.visible = true;
  for each (var featgra:Graphic in featexistingGraphics)
  {
    var featnewgra:Graphic = new Graphic();
    featnewgra.geometry = featgra.geometry;
    featnewgra.symbol = featgra.symbol;
    featgl.add(featnewgra);
  }
  featgl.addEventListener(LayerEvent.LOAD, layerLoadComplete);
  map.addLayer(featgl);

... But this does not...

var newfl:FeatureLayer = new FeatureLayer(url, proxyURL, .token);
newfl.alpha = 0.5;
newfl.visible = true;
newfl.name = "My Layer";
newfl.addEventListener(LayerEvent.LOAD, layerLoadComplete);
previewMap.addLayer(newfl);

I know this doesn't help with the SFV.
0 Kudos