Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Native Mobile Apps 2020 Fall
Course Materials
Commits
0b1150a0
Commit
0b1150a0
authored
Oct 09, 2020
by
Andres Käver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
location line
parent
cf6a36b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
android/GPSMapDemo/app/src/main/java/ee/taltech/mobile2020/gpsmapdemo/MapsActivity.kt
...ain/java/ee/taltech/mobile2020/gpsmapdemo/MapsActivity.kt
+3
-3
No files found.
android/GPSMapDemo/app/src/main/java/ee/taltech/mobile2020/gpsmapdemo/MapsActivity.kt
View file @
0b1150a0
...
...
@@ -29,9 +29,9 @@ class MapsActivity : AppCompatActivity(), OnMapReadyCallback, LocationListener {
private
lateinit
var
locationManager
:
LocationManager
;
private
var
provider
:
String
?
=
""
private
var
location
:
Location
?
=
null
private
val
polylineOptions
=
PolylineOptions
().
width
(
5
f
)
private
val
polylineOptions
=
PolylineOptions
().
width
(
10
f
)
.
color
(
Color
.
RED
)
private
lateinit
var
polyLine
:
Polyline
private
var
polyLine
:
Polyline
?
=
null
;
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
super
.
onCreate
(
savedInstanceState
)
...
...
@@ -116,7 +116,7 @@ class MapsActivity : AppCompatActivity(), OnMapReadyCallback, LocationListener {
// remove the old polyline from map
// or you will just add lines on top of each other and run out of memory
if
(
polyLine
!=
null
)
{
polyLine
.
remove
()
;
polyLine
!!
.
remove
()
}
polylineOptions
.
add
(
markerLatLng
)
polyLine
=
mMap
.
addPolyline
(
polylineOptions
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment