Need example for SFMaps + GeoJson

Need example for SFMaps + GeoJson

3 Replies

SG Sri Gayathri Gopalakrishnan Syncfusion Team April 20, 2018 12:48 PM UTC

Hi Shreyans, 
 
Query: Need example for SFMaps + GeoJson 
 
We have checked your query and faced issues while reading json file in SfMaps. we have considered this as defect logged defect report regarding the same and the fix will be included in our upcoming volume2 2018 main release which is expected to be rolled out by the mid of May 2018. You can use shapes file(.shp) by converting json file to shapes file in maps. Please use this http://mapshaper.org/ link to convert json file to .shp file.  
 
Regards, 
Sri Gayathri. G 



SW SHREYANS WAKEKAR April 23, 2018 09:14 AM UTC

Hello,

I tried to do so.

In my xaml i have written :

                  <maps:SfMaps Grid.Row="1" x:Name="Map" BackgroundColor="White">
            <maps:ShapeFileLayer Uri="muscat.shp">                        
            maps:ShapeFileLayer>
        maps:SfMaps>
  

And i have attached the shape file.

But it is giving me the following error :

Position 24:14. Can not set the content of maps:SfMaps as it doesn't have a ContentPropertyAttribute

Need help. If i'm doing wrong anywhere.

Attachment: Muscat_6ea23f6b.zip


SG Sri Gayathri Gopalakrishnan Syncfusion Team April 24, 2018 01:26 PM UTC

Hi Shreyans,  
 
Query: Cannot set the content of maps:SfMaps as it doesn't have a ContentPropertyAttribute 
 
We have analyzed your code snippet, ShapeFileLayer should come under Layers collection. We have prepared sample based on your code snippet. Please download the sample from the below link,  
 
 
Also, please refer our UG Document, 
 
 
 
Regards, 
Sri Gayathri. G 


Loader.
Up arrow icon