Skip to content

Add Android poiEnabled support#81

Closed
dacoto wants to merge 1 commit into
lugg:mainfrom
dacoto:android-poi-enabled
Closed

Add Android poiEnabled support#81
dacoto wants to merge 1 commit into
lugg:mainfrom
dacoto:android-poi-enabled

Conversation

@dacoto

@dacoto dacoto commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Implement poiEnabled handling for Android: add state and setter, call applyPoiEnabled during map setup, and apply a MapStyleOptions that hides POI and transit when poiEnabled is false. Import MapStyleOptions and keep default=true. Update MAPVIEW.md to clarify that poiEnabled on Android hides POIs and transit stops via map styling.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Test Plan

Screenshots / Videos

Checklist

  • I tested on iOS
  • I tested on Android
  • I tested on Web
  • I updated the documentation (if needed)

Implement poiEnabled handling for Android: add state and setter, call applyPoiEnabled during map setup, and apply a MapStyleOptions that hides POI and transit when poiEnabled is false. Import MapStyleOptions and keep default=true. Update MAPVIEW.md to clarify that poiEnabled on Android hides POIs and transit stops via map styling.
@lodev09

lodev09 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

setMapStyle() is likely a silent no-op here — the map is always created with a map ID

GoogleMapProvider always creates the map with GoogleMapOptions().mapId(mapId) (defaults to DEMO_MAP_ID). Per Google's docs, cloud-based (map ID) styling and programmatic JSON styling are mutually exclusive — JSON passed to setMapStyle() is ignored when a map ID is present, so the POI-hiding style added here may never render:

Options:

  1. Only pass mapId to GoogleMapOptions when the user explicitly set one, and document that poiEnabled is ignored on Android when a custom mapId is used (we use classic MarkerOptions, so nothing should require the map ID).
  2. Keep the map ID always-on and document that POI visibility must be configured in the cloud style instead.

Either way, please verify on a device before merge — setMapStyle() returns true even when the style is ignored.

Separate note: the call sites reference applyPoiStyle() but the function added is applyPoiEnabled(), so this won't compile as-is.

@lodev09

lodev09 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Closing this

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