合并小地图到地图模块

Signed-off-by: donghongyu <donghongyu@zhidaoauto.com>
This commit is contained in:
donghongyu
2022-03-04 16:58:57 +08:00
parent b02481462e
commit 3cc9fbe4bf
42 changed files with 31 additions and 220 deletions

View File

@@ -0,0 +1,61 @@
package com.mogo.eagle.core.utilcode.mogo;
import android.content.Context;
import java.io.IOException;
import java.io.InputStream;
/**
* @author donghongyu
* @date 12/18/20 5:37 PM
*/
public class MapAssetStyleUtils {
public static byte[] getAssetsStyle(Context context) {
byte[] buffer1 = null;
InputStream is1 = null;
try {
is1 = context.getResources().getAssets().open("small_map_style.data");
int lenght1 = is1.available();
buffer1 = new byte[lenght1];
is1.read(buffer1);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (is1 != null) {
is1.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
return buffer1;
}
public static byte[] getAssetsExtraStyle(Context context) {
byte[] buffer1 = null;
InputStream is1 = null;
try {
is1 = context.getResources().getAssets().open("small_map_style_extra.data");
int lenght1 = is1.available();
buffer1 = new byte[lenght1];
is1.read(buffer1);
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (is1 != null) {
is1.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
return buffer1;
}
}