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. Image for the cookie policy date

SfMaps "Attempt to invoke virtual method on a null object reference"

Hi! 
I'm trying to implement the SfMaps Control in my Xamarin Forms PCL project. I tried use the code as the samples downloaded with the library but not work for me. I run the sample project and works, but if I create a new project, I get the following error:

Attempt to invoke virtual method 'com.syncfusion.maps.BoundingBox com.syncfusion.maps.ShapeFileHeader.getBoundingBox()' on a null object reference

The control only works for me when I run the sample project, but I can't create my own project with this control.
I have also tried to create a project following the instructions found on the website, but I keep getting the same error

Thanks for your help!!

7 Replies

MV Mohana V Syncfusion Team July 19, 2016 12:46 PM UTC

Hi Luis,

Thanks for using syncfusion products.

We have validated your query and found the possible scenario that would cause the reported error. So, could you please ensure the following instruction from your side

1.Whether shapefile(.shp) referenced under "Assets" folder.

Please get back us , if you still facing the problem with map control.

Regards,
Mohana V


LU Luis July 19, 2016 01:53 PM UTC

Hi, thanks for your support!

Excuse me, I can't understand what I have to do to fix the error.

Here are some pictures about the error and configuration of my project.

Thanks!

Attachment: ScreenshotsProject_e64181e.rar


MV Mohana V Syncfusion Team July 20, 2016 12:03 PM UTC

Hi Luis,

Thanks for your additional information.

We have further validated your query with the attachment and the files are referenced correctly.

It would be better for us to assist you further, if you share us the sample along with shapefile(.shp) and dbffile(.dbf) which you have tried to reproduce the reported issue.

Regards,
Mohana V




LU Luis July 21, 2016 02:17 PM UTC

Hi

This is a simple project that I'm using to test the library

https://www.dropbox.com/s/luacwef4vuynckm/SfMapTestExample.rar?dl=0

Thank you!


MV Mohana V Syncfusion Team July 26, 2016 05:55 AM UTC

Hi Luis,

Thanks for your additional information.

We are able to reproduce the reported issue "Exception throws when shape file doesn’t contain bounding box" and we have logged an issue report for this.

This fix will be included in our up coming Essential studio volume 2 2016 service pack 1 release which is expected to be released on end of July 2016.

Regards,
Mohana V


LU Luis July 26, 2016 03:05 PM UTC

Hi!

Thanks for your support!!

I'll be waiting for the service pack release.


MV Mohana V Syncfusion Team July 27, 2016 11:56 AM UTC

Hi Luis,

Thanks for your update.

As we mentioned earlier the fix for your requirement will be included in our Essential studio volume 2 2016 service pack 1 release.

We would appreciate your patience until then.

Regards,
Mohana V

Loader.
Live Chat Icon For mobile
Up arrow icon