Select to view content in your preferred language

Does georsslayer support georss:box... (or only point), No renderer works..

2510
4
08-16-2012 02:05 PM
caseycupp
Deactivated User
POSSIBLE BUG WITH GEORSSLAYER OBJECT... DOESN'T SUPPORT GEORSS BOX.. (Mostly Supports.. it just doesn't show up on the map) See Post 3 for more details

I have a sample georss working using the earthquakes...

I'm trying to consume a georss feed that has an a polygon... actual xml looks like this..
<georss:box>-156.00000 -51.38000 176.20600 78.57000</georss:box>

The good news is that the GeoRssLayer loads. And I can see the graphics loaded in my map object. (They are an envelope)
however I can't get a renderer to actually display them. I've primarily tried the SimpleFillSymbol with no luck.


 <esri:SimpleRenderer x:Key="MySimpleRenderer4">
                <esri:SimpleRenderer.Symbol>
                    <esri:FillSymbol  Fill="Yellow" BorderBrush="Black" BorderThickness="6" ></esri:FillSymbol>
                </esri:SimpleRenderer.Symbol>
            </esri:SimpleRenderer>
0 Kudos
4 Replies
caseycupp
Deactivated User
Ooops, had plain FillSymbol in code sample.. mainly trying SimpleFillSymbol

   <esri:SimpleRenderer x:Key="MySimpleRenderer4">
                <esri:SimpleRenderer.Symbol>
                    <esri:SimpleFillSymbol  Fill="Yellow" BorderBrush="Black" BorderThickness="6" ></esri:SimpleFillSymbol>
                </esri:SimpleRenderer.Symbol>
            </esri:SimpleRenderer>
0 Kudos
caseycupp
Deactivated User
I think this is a bug with the GeoRssLayer object

So GeoRss:box Esri georsslayer converts this to a Envelope. (See first post thumbnail) (box is part of the georss spec .. see http://georss.org/simple)

That is cool, however, envelopes don't seem to draw on the map.. (like points/lines/polygons do)

Looks like others have found that envelopes don't draw also..
http://forums.esri.com/Thread.asp?c=158&f=2455&t=298616


here is some sample code I wrote..
 //POLY WORKS
            System.Windows.Media.SolidColorBrush orangecolor = new SolidColorBrush(Colors.Orange);
            SimpleFillSymbol sampleFillSymbolorange = new SimpleFillSymbol() { Fill = orangecolor, BorderBrush = orangecolor, BorderThickness = 3, };

            GraphicsLayer graphicslayerPoly = new GraphicsLayer() { ID = "PolygonWorks", Opacity = .5 };

            ESRI.ArcGIS.Client.Geometry.PointCollection circlePts = new ESRI.ArcGIS.Client.Geometry.PointCollection();
            circlePts.Add(new MapPoint() { X = -60, Y = -30 });
            circlePts.Add(new MapPoint() { X = -30, Y = 00 });
            circlePts.Add(new MapPoint() { X = 00, Y = 00 });
            circlePts.Add(new MapPoint() { X = 00, Y = -30 });
            circlePts.Add(new MapPoint() { X = -30, Y = -60 });

            ESRI.ArcGIS.Client.Geometry.Polygon isolationZonePts = new ESRI.ArcGIS.Client.Geometry.Polygon();
            isolationZonePts.Rings.Add(circlePts);
            isolationZonePts.SpatialReference = new SpatialReference() { WKID = 4326 };
            
           //ENVELOPE DOESN'T 
            graphicslayerPoly.Graphics.Add(new Graphic() { Geometry = isolationZonePts, Symbol = sampleFillSymbolorange });
            System.Windows.Media.SolidColorBrush purplecolor = new SolidColorBrush(Colors.Purple);
            SimpleFillSymbol sampleFillSymbol = new SimpleFillSymbol() { Fill = purplecolor, BorderBrush = purplecolor, BorderThickness = 20 };
            GraphicsLayer graphicslayerEnvelope = new GraphicsLayer() { ID = "EnvelopeFails", Opacity = .5 };
            Envelope envelope = new Envelope(30, 30, 0, 0);
      MyMap.Layers.Add(graphicslayerPoly);
            MyMap.Layers.Add(graphicslayerEnvelope);


[ATTACH=CONFIG]17038[/ATTACH]
0 Kudos
caseycupp
Deactivated User
I feel more confident of my assessment after further test.

This xaml snippet (using a georss feed that utilizes polygon) draws fine..
<georss: polygon>40.859449062067746 -73.773361265529715 40.854830471980755 ... 40.859449062067746 -73.773361265529715</georss: polygon>

<esri:GeoRssLayer ID="MyGeoRssLayerPolyBronx" Source="http://rss.nyalert.gov/GeoAtom/Feeds/BronxGEOATOM.xml" Renderer="{StaticResource MySimpleRenderer4}" >
</esri:GeoRssLayer>


This code (using a georss feed that utilizes box) does not draw.. same renderer as above
<georss:box>-156.00000 -51.38000 176.20600 78.57000</georss:box>
 <esri:GeoRssLayer ID="MyGeoRssLayerBox" Source="http://myurl:8888/feed?q=aapg%20AND%20type:layer"  Renderer="{StaticResource MySimpleRenderer4}" >               
</esri:GeoRssLayer>
0 Kudos
by Anonymous User
Not applicable
Original User: caseycupp

I think this is due to the fact that the feed I was trying to consume had it's lat/long reversed.

casey
0 Kudos