Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
蒋波涛
/
landsurvey
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
46eb9df3
authored
2018-03-28 11:00:18 +0800
by
chiangbt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update 3.28
1 parent
e9b52a2e
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
38 additions
and
7 deletions
app/release/app-release.apk
app/src/main/AndroidManifest.xml
app/src/main/java/com/pashanhoo/landsurvey/BootActivity.java
app/src/main/java/com/pashanhoo/landsurvey/MainActivity.java
app/src/main/res/layout/activity_main.xml
app/src/main/res/mipmap-mdpi/ic_explore_white_48dp.png
app/src/main/res/mipmap-mdpi/ic_find_in_page_white_48dp.png
app/src/main/res/mipmap-mdpi/ic_find_replace_white_48dp.png
app/src/main/res/mipmap-mdpi/ic_search_white_48dp.png
app/release/app-release.apk
View file @
46eb9df
This file is too large to display.
app/src/main/AndroidManifest.xml
View file @
46eb9df
...
...
@@ -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
...
...
app/src/main/java/com/pashanhoo/landsurvey/BootActivity.java
View file @
46eb9df
...
...
@@ -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
);
...
...
app/src/main/java/com/pashanhoo/landsurvey/MainActivity.java
View file @
46eb9df
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
...
...
app/src/main/res/layout/activity_main.xml
View file @
46eb9df
...
...
@@ -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"
...
...
app/src/main/res/mipmap-mdpi/ic_explore_white_48dp.png
0 → 100755
View file @
46eb9df
622 Bytes
app/src/main/res/mipmap-mdpi/ic_find_in_page_white_48dp.png
0 → 100755
View file @
46eb9df
445 Bytes
app/src/main/res/mipmap-mdpi/ic_find_replace_white_48dp.png
0 → 100755
View file @
46eb9df
467 Bytes
app/src/main/res/mipmap-mdpi/ic_search_white_48dp.png
0 → 100755
View file @
46eb9df
465 Bytes
Please
register
or
sign in
to post a comment