Skip to content
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

Nearby plases tmp #21980

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open

Nearby plases tmp #21980

wants to merge 19 commits into from

Conversation

Corwin-Kh
Copy link
Contributor

No description provided.

val app = requireActivity().application as OsmandApplication
app.locationProvider.addLocationListener(this)
app.locationProvider.addCompassListener(this)
mapActivity?.dashboard?.setDashboardVisibility(true, DashboardType.EXPLORE_NEARBY_PLACES)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to attach this fragment to dashboard?

@@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/activity_background_color"
android:background="@null"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this @null necessary?

@@ -68,7 +68,7 @@ public static List<OsmandApiFeatureData> getExploreImageList(KQuadRect mapRect,
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
LOG.debug("Download images " + url.toString());
LOG.debug("Download images " + url + " {" + Thread.currentThread().getName() + "}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have thread name in PlatformUtil, is it necessary?

Comment on lines +186 to +197
override fun updateLocation(location: Location?) {
this.location = location
verticalNearbyAdapter.updateLocation(location)
}

override fun updateCompassValue(value: Float) {
val now = System.currentTimeMillis()
if (now - lastCompassUpdate > COMPASS_UPDATE_PERIOD) {
lastCompassUpdate = now
updateLocation(location)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to add checks for changes to reduce unnecessary list updates, example


import org.apache.commons.logging.Log;

public class ExplorePlacesMenuBuilder extends MenuBuilder {
Copy link
Member

@Chumva Chumva Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to show info from amenity here? or only from image data?

If needed, we could acquire amenity & show it`s info via AmenityUIHelper or similar to TransportStopMenuBuilder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants