Git Product home page Git Product logo

Comments (7)

greensopinion avatar greensopinion commented on September 26, 2024

I've had a look at your example and there are a couple of issues here: https://github.com/alkaitagi/vector_map_test/blob/master/lib/mapbox.dart#L22-L27

  1. This library only supports web URL schemes, i.e. https and http - it looks like you're using mapbox:
  2. This library expects an URL template to point to tiles directly

For example if you go to https://www.mapbox.com/maps/streets and tap on "Preview", you'll see a map come up. If you check how the map was loaded, you'll find that it loads a URI that looks like this: https://api.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2.json?secure&access_token=
Looking at the response, you can find how the tiles are loaded, in this case https://a.tiles.mapbox.com/v4/mapbox.mapbox-streets-v8,mapbox.mapbox-terrain-v2/{z}/{x}/{y}.vector.pbf?access_token=...
It's this last URL that you want to use with this library.

from flutter-vector-map-tiles.

alkaitagi avatar alkaitagi commented on September 26, 2024

Thanks for the quick response. I've tried with this link, but nothing have changed.

from flutter-vector-map-tiles.

greensopinion avatar greensopinion commented on September 26, 2024

There was a bug introduced a few days ago, since fixed, that prevented some themes from working. You may want to try the latest version 2.1.2 to see if that resolves the issue for you.

from flutter-vector-map-tiles.

alkaitagi avatar alkaitagi commented on September 26, 2024

I have updated the package and once again checked the URL. I see only see default style without my customization. No errors shows up on the console. I think you were too early to close this issue since the problem is not resolved.

from flutter-vector-map-tiles.

greensopinion avatar greensopinion commented on September 26, 2024

@alkaitagi I've created an example that uses mapbox. Let me know if that makes a difference for you.

https://github.com/greensopinion/flutter-vector-map-tiles/tree/mapbox-example

This is the commit with the relevant changes: 00cdb61

This is what it looks like:

Screen Shot 2022-07-08 at 7 39 34 AM

from flutter-vector-map-tiles.

alkaitagi avatar alkaitagi commented on September 26, 2024

No, this still doesn't work for custom styles created with Mapbox Studio. It only applies the default theme (dark) instead of my own theme based off it, like it is described in the original post on this issue. No errors are present in the console. I suggest you create your own theme (e.g. change country borders from solid to dashed) and try making that work.

Also, believe me I appreciate your communication and intention to help, but why is this issue still being held as closed while clearly the problem is not resolved.

from flutter-vector-map-tiles.

greensopinion avatar greensopinion commented on September 26, 2024

@alkaitagi I've had a go with a custom theme, I made the streets red. Here's the result:

Screen Shot 2022-07-16 at 3 51 07 PM

To get that to work you will need to get the style using an URL that looks something like this: https://api.mapbox.com/styles/v1/greensopinion/cl5oh4q3t000216o0tc9cngxh?access_token=$mapboxApiKey
You'll also need to publish your custom theme (so that it's available in production on mapbox)

See 5161457 which demonstrates how to use a custom theme.

why is this issue still being held as closed while clearly the problem is not resolved

The issue is still closed because it looks like there isn't a problem with this library. I'm happy to reopen it if there's clearly a problem, but in this case there has been a lack of data pointing to a problem.

from flutter-vector-map-tiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.