Android based on Mappwidget implementation freehand Map (v)--How to create a map resource

Source: Internet
Author: User

Map resources can be generated from the slicing tool tools, as follows:

1. Open Eclipse Standard Version 4.3.2, import the "Slicingtool" project as a Java project, run. (Must be eclipse4.3.2 and above version, or will be less packet and error)

2. A new eclipse will be opened at this time, and in the new widow-->show View-->mappwidget-->map slicing Tool, open the window:

Select the size of the block (256 block for general recommendation)

If you want to use the GPS features of the map, fill in the correction data

After export, you will get an XML file and a lot of PNG files and copy them to the project's assets:

Manual calibration: To make it easy for you to calibrate your offline map manually, you can modify the Map.xml, similar to this:

<?xml version= "1.0" encoding= "Utf-8"? ><image format= "PNG" overlap= "1" tilesize= "" "><size height=" 970 "width=" 1665 ">  <calibrationrect>      <point lat=" 51.512234697322576 "lon="- 0.18319487571716309 "topleft=" 1 "x=" 218 "y=" ">      <point lat=" 51.50428161952125 "lon="- 0.15317827463150024 "x=" 1625 "y=" 728 ">  </calibrationrect></image>

The map resource is the following structure:

<map_name>_files files are stored in the Zoom level folder. In this picture 0 is the lowest zoom level, and 11 is the highest zoom level. The highest zoom level is the original picture that is cut into a broken-down grid. Any slice file is named in the following format: (< column name >_< row name >.png)

<map_name>.xml is a configuration file for offline maps.

Android based on Mappwidget implementation freehand Map (v)--How to create a map resource

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.