ThinkGeo.com    |     Documentation    |     Premium Support

Problem loading mbtiles json styles

Hi
I managed to generate mbtiles using QGIS desctop. This export does does not create a style json file.

When I try to load a json style file
var openstackMbtiles = new MbTilesLayer(dataFilePath, jsonFilePath);
an exception is thrown - it seems like it is required to to able to lookup a style for every data entry in the
mbtiles file
I would like to get better information when an exception is thrown:

  • information on the attribute name would help a little in addition to the information that an element is missing.
    . I was able to find the attribute name using visual studio debugger.

Is it possible to retrieve the necessary style definitions required when openin a mbtiles file ?
Regards
Gunnar

Hi Gunnar,

I just added an overload constructor in MBTilesLayer and provided a default styling in beta021.
public MbTilesLayer(string filePath)

It will just use black pens to draw the lines/polygon/points if the styleJson is not provided, so at least you can see what the data would look like.

Let us think more regarding the throwing better exception thing.

Thanks,
Ben

Thank you. I want to test it when available. I am testing/evaluating different map vector formats avaiable in https://docs.thinkgeo.com/products/mobile-maps/supported-data-formats/
Do you have any experience of which vector format is most usable when implementing a map application based on ThikGeo ? Does ThinkGeo have a strategy of which is the most important to support/update? Regards Gunnar Gisleberg

I would say Shapefile is the most usable one.