46eb9df3 by chiangbt

update 3.28

1 parent e9b52a2e
This file is too large to display.
......@@ -11,7 +11,6 @@
android:allowBackup="true"
android:icon="@mipmap/logo"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
......
......@@ -31,8 +31,7 @@ public class BootActivity extends OnboarderActivity {
Manifest.permission.ACCESS_COARSE_LOCATION,
Manifest.permission.ACCESS_FINE_LOCATION,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.READ_PHONE_STATE
Manifest.permission.READ_EXTERNAL_STORAGE
};
private static final int PERMISSON_REQUESTCODE = 0;
......@@ -42,13 +41,16 @@ public class BootActivity extends OnboarderActivity {
private boolean isNeedCheck = true;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
protected void onResume() {
super.onResume();
// 系统权限检查
if(isNeedCheck){
checkPermissions(needPermissions);
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 引导页设置
OnboarderPage onboarderPage1 = new OnboarderPage("Keymap", "服务于智慧城市信息化的产品", R.drawable.planet1);
......
package com.pashanhoo.landsurvey;
import android.annotation.SuppressLint;
import android.location.Location;
import android.location.LocationListener;
import android.os.Bundle;
......@@ -85,6 +86,7 @@ public class MainActivity extends AppCompatActivity {
if (locationDisplayManager != null) {
locationDisplayManager.stop();
}
// 保证地图级别小于20
if (curLevel < 20) {
mapView.zoomin(true);
}
......@@ -98,6 +100,7 @@ public class MainActivity extends AppCompatActivity {
if (locationDisplayManager != null) {
locationDisplayManager.stop();
}
// 保证地图级别大于0
if (curLevel > 0) {
mapView.zoomout(true);
}
......@@ -110,6 +113,7 @@ public class MainActivity extends AppCompatActivity {
public void onClick(View view) {
locationDisplayManager.stop();
graphicsLayer.removeAll();
// 恢复初始设置地图范围
mapView.zoomToResolution(AppInfo.initPoint, AppInfo.initRes);
curLevel = TDTTileinfo.getCurrentLevel(AppInfo.initRes);
mapinfoView.setText("当前地图级别为:" + String.valueOf(curLevel));
......@@ -120,6 +124,7 @@ public class MainActivity extends AppCompatActivity {
gps.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
// 设置GPS功能
if (locationDisplayManager.isStarted()) {
locationDisplayManager.stop();
} else {
......@@ -128,6 +133,21 @@ public class MainActivity extends AppCompatActivity {
}
}
});
final FloatingActionButton search = (FloatingActionButton) findViewById(R.id.search);
search.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if (floatingSearchView.getVisibility() == View.INVISIBLE) {
floatingSearchView.setVisibility(View.VISIBLE);
search.setImageResource(R.mipmap.ic_find_replace_white_48dp);
} else {
search.setImageResource(R.mipmap.ic_search_white_48dp);
graphicsLayer.removeAll();
floatingSearchView.clearSuggestions();
floatingSearchView.setVisibility(View.INVISIBLE);
}
}
});
//地图初始化-------------------------------------------------------------------
ArcGISRuntime.setClientId("1eFHW78avlnRUPHm");
mapView = (MapView) findViewById(R.id.map);
......@@ -195,7 +215,8 @@ public class MainActivity extends AppCompatActivity {
locationDisplayManager.setLocationListener(new LocationListener() {
@Override
public void onLocationChanged(Location location) {
mapView.zoomToResolution(new Point(location.getLongitude(), location.getLatitude()), mapView.getResolution());
mapView.zoomToResolution(new Point(location.getLongitude(), location.getLatitude()), TDTTileinfo.getRes4490()[18]);
mapinfoView.setText("当前地图级别为:18");
}
@Override
......
......@@ -30,6 +30,7 @@
android:layout_marginTop="70dp"
android:layout_marginLeft="16dp"
android:layout_marginBottom="16dp"
android:visibility="invisible"
app:floatingSearch_searchHint="地名地址检索..."
app:floatingSearch_suggestionsListAnimDuration="250"
app:floatingSearch_showSearchKey="true"
......@@ -61,6 +62,14 @@
android:layout_marginRight="0dp"
app:srcCompat="@mipmap/ic_zoom_out_white_48dp" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/search"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top|end"
android:layout_marginTop="16dp"
android:layout_marginRight="0dp"
app:srcCompat="@mipmap/ic_search_white_48dp" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/gps"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
......