We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

OSM SfMaps Shape Layer Uri throws Java.Lang.FileNotFoundException for the .dbf file

Thread ID:

Created:

Updated:

Platform:

Replies:

141671 Dec 27,2018 06:28 AM UTC Dec 31,2018 06:47 AM UTC Xamarin.Forms 1
loading
Tags: SfMaps
Virgil John A. Lomocso
Asked On December 27, 2018 06:28 AM UTC

Hey guys, we are having trouble making the shape layer work. We just want the maps to display a clean view with only roads and blocks rather than the default one with the detailed labels in it. We tried our best to understand the syncfusion documentation with no luck. Here are some of the things we've tried.
- .dbf is an embedded resource, Uri is "Images/roadtrl020.dbf"
- .dbf is an embedded resource, Uri is "App.NameSpace.Images.roadtrl020.dbf"
- .dbf is an embedded resource, Uri is "resource://App.NameSpace.Images.roadtrl020.dbf"
- transfer the embedded .dbf file to PersonalFolder and link to it with "/path/to/roadtrl020.dbf"
- transfer the embedded .dbf file to PersonalFolder and link to it with "file:///path/to/roadtrl020.dbf"

The documentation doesn't exactly tell us what the Uri expects so we wouldn't know what to give it. All we get is this.

Michael Prabhu M [Syncfusion]
Replied On December 31, 2018 06:47 AM UTC

Hi Virgil, 
 
Greetings from Syncfusion. 
 
Query: How to use the shape file layer in maps. 
 
You can use the SfMaps control to display the required country boundaries, rail roads or etc. This can be achieved by adding the required shape files in the project and accessing it via Uri property in the shape file layer. 
 
You need to mention the shape file (.shp) name in the Uri property. Dbf file corresponding to that shape file is mainly used for additional features such as displaying bubbles, color mapping etc. Hence you must specify the shape file name in the Uri property as in the below code snippet. 
 
  <maps:SfMaps.Layers > 
                    <maps:ShapeFileLayer Uri="usa_state.shp" > 
 
                    </maps:ShapeFileLayer> 
                </maps:SfMaps.Layers> 
 
Please refer the below documentation link for how to specify the Uri property and how to add and access the shape files in the project. 
 
 
We have also prepared a simple sample to show the US map. You can refer this sample and add the shape file which is required for you instead of US map. 
 
You can download the sample from the below link. 
 
 
Output Image: 
 
 
 
 
Note: Please refer and follow the mentioned UG link for adding shape files in the project. 
 
Please contact us if you need further assistance on this. Also, if your scenario is different from the above please provide additional information on this. This would help us to guide you accordingly with the better solution at the earliest. 
 
Regards, 
Michael 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;