Open Street Map working offline android

后端 未结 3 531
遥遥无期
遥遥无期 2020-12-14 03:55

I am a newbie to Open Street Map. I made some research and found that we can download and store the map into a folder. But i didn\'t find any tutorial or sample that provide

3条回答
  •  北海茫月
    2020-12-14 04:44

    I have found this tutorial that explains all things you need step by step.

    In brief:

    1- You must download map tiles using Mobile Atlas Creator. I have explained the steps HERE

    2- Move the resulting zip-file to /mnt/sdcard/osmdroid/ on your device.

    3- Adding osmdroid-android-XXX.jar and slf4j-android-1.5.8.jar into build path your project

    4- Adding MapView: You can add a MapView to your xml layout

    
    

    Or create a MapView programmatically:

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
    {
        mResourceProxy = new ResourceProxyImpl(inflater.getContext().getApplicationContext());
        mMapView = new MapView(inflater.getContext(), 256, mResourceProxy);
        return mMapView;
    }
    

    Hope it Helps ;)

提交回复
热议问题