mapbox / mapbox/mapbox-maps-flutter
map style is showing wrong tileset points due to caching, how to solve this?
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 380
- Forks
- 204
- PR merge metrics
- No merged PRs in 30d
Description
Hello everyone,
I'm currently trying to implement my usecase in mapbox, and I'm using this package in my app.
I have a problem, after I update my tileset source and publish my tileset using mapbox raw API requests (using postman), I still see old points on the map. When I open a webpreview on the browser I get the same problem unless I open it in private mode. It seems the points are being cached somewhere. how can I ask the app to ignore cached data?
to reproduce:
in Postman or alternative:
-
Create a tileset source using
POST https://api.mapbox.com/tilesets/v1/sources/hka14/{new-source-id}?access_token={access-token}
header:
Content-Type: multipart/form-data
body: multi-form
populate file field: file: GeoJson.txt -
Create a Tileset using
POST https://api.mapbox.com/tilesets/v1/{username}.{new-tile-id}?access_token={access-token}
header:
Content-Type: application/json
body: raw json
{
"recipe": {
"version": 1,
"layers": {
"newLayer": {
"source": "mapbox://tileset-source/{username}/{created-source-id}",
"minzoom": 0,
"maxzoom": 16
}
}
},
"name": "new tile",
"description": "description",
"attribution": [
{ "text": "© no idea legal", "link": "" }
]
}
- publish the tileset (maybe this step is not needed)
POST https://api.mapbox.com/tilesets/v1/{username}.{created-tileset-id}/publish?access_token={access-token}
(no body, no headers)
(wait until the proccessing is done)
in mapbox UI platform:
4. Create a Style (standard map)
5. add the newly created tileset to the newly created style.
6. validated the points are visible on the mobile app or on the UI.
in postman:
7. update the tileset source
PUT https://api.mapbox.com/tilesets/v1/sources/{username}/{created-source-id}?access_token={access-token}
header:
Content-Type: multipart/form-data
body: multi-form
(remove/add coordinates on the json file GeoJson.txt)
populate file field with the new json: file: GeoJson.txt
in mobile app or UI platform:
8. Validate that old points are still there and new point aren't properly created (created only on some zoom levels)
9. Open the map on the browser in private mode, and see the difference
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction steps and attached GeoJson.txt, then compare tileset behavior in normal and private browser sessions after the PUT and publish requests. Done means the caching cause and a documented, reproducible resolution for the Flutter app or a confirmed package limitation are established.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100