A period of time with Baidu Map, in the use of Offline map package import when found a problem, from the Baidu official website download offline package can not be imported, but with Baidu map of the demo could download offline package use, at that time there is no requirement, can use on the line, with their demo download offline package, the recent demand for the way, You have to use the offline package method
Then with the Baidu map of the demo can not be imported, and then go online a check, hehe, all kinds of fellow people in suffering, after careful observation, found some doorway, hope to help you
First of all, Baidu offline map package downloaded, under the Baidumap under VMP there is a folder, it should be noted that this is a letter named , H or L, the problem appears in the two names
There is such a sentence on Baidu:
Premise: Get the resolution of your phone.
Action: After selecting the brand, at the bottom of the Model drop-down list, select "High split screen package (resolution 480*800 and above)" or "Low split screen package (resolution 480*800)
Note: If 540*960 use high split screen package (resolution 480*800 and above)
My tablet resolution seems to be 1024*600, because it is an industrial flat, without my brand I am using HTC One s, downloaded after the VMP is H, copy, Paste, will not lead in
Accidentally found that my original demo download offline map is under the vmp/l, and after the import failure will automatically generate an l file, so I think it might be offline package is wrong
Then re-download from the Baidu Map official online, the brand or the choice of HTC, model, the drop-down list box to the bottom of the selection of low-split screen package, and then the import succeeded
Also does not use the scan method, uses moffline.importofflinedata directly ();
Main code:
Activity needs implements Mkofflinemaplistener, automatically fill a
@Override
public void ongetofflinemapstate (int arg0, int arg1) {
//TODO auto-generated method stub
}
Mkofflinemap moffline = new Mkofflinemap ();
Moffline.init (this);
int num = Moffline.importofflinedata ();
String msg = "";
if (num = = 0) {
msg = "The offline package is not imported, it may be the offline package placement is incorrect, or the offline package has been imported";
else {
msg = String.Format ("Successfully imported%d offline packages, can be viewed in download management", num);
}
Toast.maketext (This, MSG, Toast.length_short). Show ();
It worked.
Android Baidu map sdk3.2 offline map Package Import