Select to view content in your preferred language

Operational Layers

876
7
06-09-2011 09:23 AM
BrianKaplan
Occasional Contributor
Hi,  I have two questions about operational layers. 

1. I am having a problem with adding the following
http://ags.pdc.org/rest/services/GHIN/PDC_Active_Hazards/MapServer/10

Here's the tag in the config.xml

            <layer label="Forecast Storm Position" type="feature" visible="false" alpha="1.0"
                   popupconfig=""
                   url="http://ags.pdc.org/rest/services/GHIN/PDC_Active_Hazards/MapServer/10"/>

The spatial reference is 54004.  Does that matter?

2. I'm using another service with points.  The flex view shows the point as a black circle.  Is there a way of specifying another symbol?

Thanks.

Brian
Tags (2)
0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus
Brian,

   Try this.

<layer label="Forecast Storm Position" type="feature" visible="true" alpha="1.0" mode="snapshot"
                   url="http://ags.pdc.org/rest/services/GHIN/PDC_Active_Hazards/MapServer/10" useamf="false"/>


The issue with the symbology is that you are only using a ArcGIS Server 9.3. If you were using ArcGIS Server 10 than the symbology would come automatically.
0 Kudos
BrianKaplan
Occasional Contributor
Hi Robert,

Thank you very very much.  The mode command fixed it.  The symbology is a drawback though. I don't know if/when the Pacific Disaster Center will upgrade.

I'm now experimenting with the wms feeds from NOWCOAST and the symbology is retained.

Here's the address
http://nowcoast.noaa.gov/help/mapservices.shtml?name=mapservices

From the time I wrote the my question I finally got the following to work.

           <layer label="Nowcoast Data" type="wms"  visiblelayers="limits" version="1.1.1" skipgetcapabilities="true" visible="false" alpha="1.0" 
url="http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/wwa?service=wms&version=1.1.1&request=GetMap&Layer..."/>

BTW,  I came across your weather underground widget the other day.  Thank you for putting that together and posting it and I enjoyed viewing your County's web mapping application, past, current, and future.

Brian Kaplan
GIS Coordinator
Rapid Response and Emergency Preparedness Support
Geospatial Research Analysis and Services Program (GRASP)
Centers for Disease Control and Prevention
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Brian,

   There is a way for you to handle the symbology of the feature layer in the Flex Viewer MapManager.mxml if you are one of those that has access to Flash Builder. Let me know if you want to go down that route.
0 Kudos
BrianKaplan
Occasional Contributor
Hi Robert,

Yes, I do have access to flash builder.  Having the ability to change the symbology would by very helpful if you wouldn't mind passing that on.  Thanks  Brian.
0 Kudos
BrianKaplan
Occasional Contributor
Robert, if you are still listening to this post, could you point me in the right direction for changing the symbology for pre 10 service.  Thanks.  Brian

Brian,

   There is a way for you to handle the symbology of the feature layer in the Flex Viewer MapManager.mxml if you are one of those that has access to Flash Builder. Let me know if you want to go down that route.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Brian,

  Find the addLayerToMap function in the MapManager.mxml and add something like this:

case "feature":
                    {
                        var featureLayer:FeatureLayer = new FeatureLayer(url);
                        featureLayer.addEventListener(FlexEvent.HIDE, featureLayer_hideHandler);
                        featureLayer.alpha = alpha;
                        featureLayer.id = label;
                        featureLayer.name = label;
                        featureLayer.outFields = [ '*' ]; // TODO: be smarter
                        featureLayer.token = token;
                        featureLayer.visible = visible;
                        featureLayer.useMapTime = useMapTime;
                        if (label == "Traffic Cameras")
                        {
                            var picSymbol:PictureMarkerSymbol = new PictureMarkerSymbol("assets/images/i_camera.png",30,30,0,0,0);
                            var rend:Renderer = new SimpleRenderer(picSymbol);
                            featureLayer.renderer = rend;
                        }
                        if (label == "Louisville Police Facilities")
                        {
                            var picSymbol0:PictureMarkerSymbol = new PictureMarkerSymbol("assets/images/i_policestation.png",30,30,0,0,0);
                            var rend0:Renderer = new SimpleRenderer(picSymbol0);
                            featureLayer.renderer = rend0;
                        }
                        if (label == "Louisville Places")
                        {
                            var picSymbol2:PictureMarkerSymbol = new PictureMarkerSymbol("assets/images/bat.png",30,30,0,0,0);
                            var picSymbol3:PictureMarkerSymbol = new PictureMarkerSymbol("assets/images/horse.png",30,30,0,0,0);
                            var picSymbol4:PictureMarkerSymbol = new PictureMarkerSymbol("assets/images/mansion.png",30,30,0,0,0);
                            var uniqueValuerenderer:UniqueValueRenderer = new UniqueValueRenderer();
                            uniqueValuerenderer.attribute = "NAME";
                            var uniqueValueInfos:Array = [];
                            uniqueValueInfos.push(new UniqueValueInfo(picSymbol3, "Chuchhill Downs"));
                            uniqueValueInfos.push(new UniqueValueInfo(picSymbol2, "louisville slugger factory"));
                            uniqueValueInfos.push(new UniqueValueInfo(picSymbol4, "Whitehall Mansion"));
                            uniqueValuerenderer.infos = uniqueValueInfos;
                            featureLayer.renderer = uniqueValuerenderer;
                        }
                        if (useAMF)
                        {
                            featureLayer.useAMF = (useAMF == "true");
                        }
                        if (mode)
                        {
                            featureLayer.mode = mode;
                        }
                        if (definitionExpression)
                        {
                            featureLayer.definitionExpression = definitionExpression;
                        }
                        if (proxyUrl && useProxy)
                        {
                            featureLayer.proxyURL = proxyUrl;
                        }
                        layerObject.layer = featureLayer;
                        map.addLayer(featureLayer);
                        break;
                    }
0 Kudos
BrianKaplan
Occasional Contributor
Robert,  Thank you very much.  Brian
0 Kudos