-
Notifications
You must be signed in to change notification settings - Fork 319
Update Maps SDK with MAS 3.0 #697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@tobrun any ideas here? |
|
Found the issue: Needed to be added to the test app. |
5cae2e8 to
5b0e5ed
Compare
| PropertyFactory.iconImage(match( | ||
| get("waypoint"), | ||
| literal("originMarker"), literal("stop"), literal("originMarker"), | ||
| literal("destination"), literal("destinationMarker") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This conversion doesn't seem correct:
match(
get("waypoint"),
literal("origin"), literal("originMarker"),
literal("destination"), literal("destinationMarker"),
literal("defaultOutputIfAboveDoesntMatch")
)
29de7cc to
c26a82c
Compare
danesfeder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far - after talking with @Guardiola31337, we need to keep this PR up to date with master, while we wait for the libraries that libandroid-navigation-ui depend on to be released. Currently, this PR is using specific SNAPSHOTS in order to build correctly. Biggest piece left here, imo, is removing all of the telem hardcoded values with the proper methods from the telem library.
| public class MainActivity extends AppCompatActivity implements PermissionsListener { | ||
|
|
||
| // TODO Check and remove if not necessary | ||
| private static final String[] PERMISSIONS = {Manifest.permission.ACCESS_FINE_LOCATION, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed: can be removed 👍
| mapboxMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latLng, 12)); | ||
| mapboxMap.setMyLocationEnabled(true); | ||
| mapboxMap.getTrackingSettings().setMyLocationTrackingMode(MyLocationTracking.TRACKING_FOLLOW); | ||
| // TODO Check and remove if not necessary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed deprecated code: can be removed 👍
| private void calculateRoute() { | ||
| Location userLocation = mapboxMap.getMyLocation(); | ||
| // TODO Check | ||
| Location userLocation = locationEngine.getLastLocation(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed this is good to replace 👍
| navigationEventListeners = new ArrayList<>(); | ||
| milestoneEventListeners = new ArrayList<>(); | ||
| progressChangeListeners = new ArrayList<>(); | ||
| progressChangeListeners = new CopyOnWriteArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do the same for the rest of the lists, great catch here 💯
| package com.mapbox.services.android.navigation.v5.utils; | ||
|
|
||
|
|
||
| // TODO Check and remove if not necessary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are using these methods in the nav SDK and they are no longer provided by the libraries we are using, let's add them to our utils
a656430 to
282bd1a
Compare
|
@Guardiola31337 taking a look at the map route changes and found that the start/end points are missing now in this branch: |
| stop("destination", PropertyFactory.iconImage("destinationMarker")) | ||
| PropertyFactory.iconImage(match( | ||
| get("waypoint"), | ||
| literal("originMarker"), literal("originMarker"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first originMarker should be "origin"
| get("waypoint"), | ||
| literal("originMarker"), literal("originMarker"), | ||
| literal("destination"), literal("destinationMarker"), | ||
| literal("defaultOutputIfAboveDoesntMatch") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to actually assign a real icon id value for above, eg. originMarker
61f8251 to
2572841
Compare
477baaa to
882c4ca
Compare
c1ca5f2 to
55139e0
Compare
|
While testing the integration noticed that routes are not drawn properly 👇 This is the Comparing with it seems that we're messing up with Expressions related code. Going to dig deeper. BTW, it'd be great @tobrun if you could take a look at it as well and let us know if you 👀 something missing or wrong. Thanks 🙏 |
A quick glance over the code found here didn't flag anything to me. |
55139e0 to
334f60a
Compare
We're adding the route layer to the map either using the custom style values or the default in Lines 423 to 429 in 55139e0
We don't draw black on the route line at any time. Leading me to believe this is an issue with the Maps SDK or how we are using it. Route using Maps SDK Any hints? Couldn't find anything wrong either 😞 |
334f60a to
a19952e
Compare
|
Noting here that when testing mapbox/mapbox-plugins-android#424 (comment) noticed some building conflicts 👀 We aren't using |
|
Note that with final release of LLP this shouldn't be an issue anymore, with mapbox/mapbox-plugins-android#419 we limited the scope of the included dependency. |
What do you mean with I think this will be an issue in the Nav side (when including LLP final release dependency) until #864 gets addressed. |
|
@Guardiola31337 I'd look at |
a19952e to
b6ca9ff
Compare
b6ca9ff to
baecdd1
Compare
baecdd1 to
0b2d256
Compare
17242ce to
418b401
Compare
|
Green 👉 New implementation In terms of numbers we're getting 99 events with the old implementation whereas 95 events with the new implementation. Above the green points can't be seen because they're right under the yellow ones (i.e. same exact location). As you can see below the differences only happened at the beginning right before starting the navigation session. Here we're only 🕵️ the location events, it'd be great to do the same with the Nav-related events. BTW, based on what we're 👀 with the location events seems legit to go ahead and merge the PR. We can revisit/continue analyzing the navigation events later. |
418b401 to
251ea82
Compare







Closes #891 Closes #880 Closes #837 Closes #746
Currently not compiling due to a dex error with something related to offline
cc @osana @cammace (for 👀 on the
NavigationMapRoutecode)