Feature layers don't display on the map (WPF Application)

10-16-2014 03:05 AM
New Contributor

With the release of ArcGIS Runtime SDK 10.2.4, I've read the developer's guide and tried to do the various tutorials.

But I have a problem with the part "Add a feature layer to provide operational data" (https://developers.arcgis.com/net/desktop/guide/access-feature-data-in-the-cloud.htm).

When I add a feature layer on the base map, it doesn't display at all, no matter how I try (by XAML or by code). I even used the layer.InitializationException to check if it was correctly loaded. All I can see is the basemap without the swimming pool permits layer.

For your informations, I'm working with Visual Studio 2013 Express Edition.

Can you please help me to find what I'm doing wrong?

Thanks in advance for your answers.

Here's the code I use for my basic project (WPF Application in Visual Basic):

<Window x:Class="MainWindow"
    Title="MainWindow" Height="536.596" Width="888.705">
        <esri:MapView x:Name="MyMapView">
            <esri:Map x:Name="MyMap">
                <esri:ArcGISTiledMapServiceLayer ID="BaseMap"
                <esri:FeatureLayer ID="PoolPermits">
                    <esri:ViewpointExtent XMin="-13075816.40"


0 Kudos
21 Replies
Esri Frequent Contributor

Looks like the PoolPermit feature server<http://sampleserver6.arcgisonline.com/arcgis/rest/services/PoolPermits/FeatureServer> is no longer working well.

Even the arcgis.com viewer<http://www.arcgis.com/home/webmap/viewer.html?url=http%3A%2F%2Fsampleserver6.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FPoolPermits%2FFeatureServer&source=sd> is not able to display the features.

Error returned by the server:

{"error":{"code":500,"message":"Error performing query operation","details":[]}}


0 Kudos
New Contributor

Indeed, you're right, thanks. But the PoolPermit feature service was working yesterday! I was able to open it directly in arcgis.com.

Homever, my problem remains. I've tried to create an application with internal datas using an

ArcGISDynamicMapServiceLayer and a FeatureLayer (like the example). The first was visible but not the second. And I could see all my features with the ArcGIS.com Map viewer.

0 Kudos
Esri Frequent Contributor

PoolPermit service is up again. I tested your code and it seems working.

Could you try again?

If you are experiencing issue with another services, please share your code so we can reproduce the issue.


0 Kudos
New Contributor

Thank you for your help.

Indeed, The PoolPermit is up again. But my code still doesn't work on my side. For your information, I've created a WPF application (Visual Basic) in Visual Studio Express 2013 (my test platform is on Windows 7). I've pasted my code in the MainWindow.xaml and this is the result I get:


Could it be a problem with the Visual "Express" edition? Or with some parameters of the solution? (I've left everything by default) I've also tried a WPF application in C# with the same result.

0 Kudos
Regular Contributor II

Have you checked if there is any errors when layer is loaded? You can access to that from MapView.LayerLoaded event.

Also could you check what data is fetched from the server using Fiddler etc.

0 Kudos
New Contributor

Thank you for your tips.

I've tried the mapView.LayerLoaded event and the PoolPermits layer was loaded successfully.

And here's a screenshot of the traffic data through Fiddler:


Everything seems allright.

0 Kudos
New Contributor

I've opened the tiles under the FeatureServer (in Fiddler) and there isn't any pool drawed on the map (only the base map).

Here's the complete url sent:


0 Kudos
Regular Contributor II

What was the response from the server?

I tried the code that you posted in the original post and it seems to work for me. Going to test that in express edition but need to install it first.

Just for kicks, can you try to set CultureInfo to en-US or GB and see if that helps. I assume that you are using some other. Or can you let me know what you are using?

0 Kudos
New Contributor

Here's the response from the Server:

{"objectIdFieldName":"objectid","globalIdFieldName":"","geometryType":"esriGeometryPolygon","spatialReference":{"wkid":102100,"latestWkid":3857},"fields":[{"name":"objectid","alias":"OBJECTID","type":"esriFieldTypeOID"},{"name":"has_pool","alias":"Has_Pool","type":"esriFieldTypeInteger"}],"features":[{"geometry":{"rings":[[[-13073563.808187518,4016000.5893990993],[-13073539.07662103,4015994.5016283691],[-13073500.561194843,4015994.182299681],[-13073501.322782392,4015900.7540653944],[-13073501.607079294,4015893.4926456138],[-13073502.34006433,4015886.2629382163],[-13073503.519120546,4015879.0929854736],[-13073505.139425823,4015872.010486193],[-13073507.195057658,4015865.0431517512],[-13073509.677879972,4015858.2176130638],[-13073512.578285273,4015851.5601492599],[-13073515.021006852,4015846.6929872781],[-13073518.624360956,4015840.3916177973], ...

I've tried to change the CultureInfo to en-US without success. My CultureInfo is "fr-CH".

Thanks for your help.

0 Kudos