nutiteq/hellomap3d-android

LOADING NML file from SDCARD

carlosharlens opened this issue · 3 comments

Hi guys,
Please could you provide us with a demo about loading nml models from sdcard instead from ASSET folder?.

Also we would like to know if there is a chance to override AssetsUtils class methods.

Best Regards,

Carlos Valdes
MAMBI Technologies

Carlos,

if you look at Overlays3DActivity sample, it actually loads from sdcard - nml asset is copied from APK assets to sdcard first and after that loaded from sdcard. The question about AssetUtils is not clear - note that all methods in this class are static methods, so they can not be overridden.

Hello Nutiteq,I'm using nutiteq 3.2.2 and i'm lookin for how load a simple nml model from sdcard. in Overlays3DActivity sample is only for SqliteNMLModelLODTreeDataSource.

Thanks

Hello,

Overlays3DActivity contains sample code for this. The following lines demonstrate how to do this

`

    MapPos modelPos = baseProjection.fromWgs84(new MapPos(24.646469, 59.423939));

    NMLModel model = new NMLModel(modelPos, AssetUtils.loadBytes("milktruck.nml"));

    model.setScale(20);

    model.setMetaDataElement("ClickText", "Single model");

    vectorDataSource.add(model);

`