Quantcast
Channel: esrislcontrib Discussions Rss Feed
Viewing all articles
Browse latest Browse all 20

New Post: Shapes rendered in center of map

$
0
0
staxmanade wrote:
Below is a link to a shape file that displays all the lakes in Nevada US. No matter what I do (I'm new to this, but... I feel like I've hacked everything except the one I need) the lakes show up over the top of Africa (center of map) http://cid-c0f357e4555270e7.skydrive.live.com/self.aspx/Public/Fishing-Lakes.dbf Can anyone give any tips on how to get this rendered??? Here's my C# code to load up the file & below that some Xaml for display. Any thoughts?   ShapeFile shapeFile = new ShapeFile(); shapeFile.ReadShapes(Resource_Nevada.Fishing_Lakes1.ToStream()); GraphicsLayer graphicsLayer = MyMap.Layers["shapefileGraphicsLayer"] as GraphicsLayer; foreach (ShapeFileRecord shapeFileRecord in shapeFile.Records) { Graphic graphic = shapeFileRecord.ToGraphic(); if (graphic != null) { graphicsLayer.Graphics.Add(graphic); } }     <esri:Map x:Name="MyMap" Extent="" CacheMode="BitmapCache"> <esri:Map.Layers> <esri:ArcGISDynamicMapServiceLayer ID="topo" Url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer"/><esri:GraphicsLayer ID="shapefileGraphicsLayer" > </esri:GraphicsLayer> </esri:Map.Layers> </esri:Map>      
I would strongly suggest you to check the coordinate system that your web application is using. If you are using ArcGIS Online (Webbuilder or Standalone app) most likely it's running on the WebMercator 4326 system (depends on the services that you application consume), you will have to write your own coordinate converter from let's say Decimal Degrees (if this is the format that is defined in the shape file that you are trying to load) to WebMercator .

Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>