greensopinion / dart-vector-tile-renderer

A vector tile renderer for use in creating map tile images or writing to a canvas. Written in Dart to enable use of vector tiles with Flutter.
BSD 3-Clause "New" or "Revised" License
42 stars 24 forks source link

hybrid maps? #87

Closed sqcsabbey closed 12 months ago

sqcsabbey commented 1 year ago

Are hybrid maps supported? I'm trying to switch between a few styles, including mapbox/satellite-streets-v12; that one has both a raster layer and a vector layer, from the stylesheet:

"sources": {
  "mapbox-satellite": {
    "url": "mapbox://mapbox.satellite",
    "type": "raster",
    "tileSize": 256
  },
  "composite": {
    "url": "mapbox://mapbox.mapbox-streets-v8",
    "type": "vector"
  }
},

If not directly supported, any suggestions about how to implement this? We're switching between vector tilesets and this, so I think I could add a separate layer to the map when this style is active, but I thought there might be a more consolidated solution.

Edit: is this more of a question for the vector_map_tiles project?

Edit 2: Is showing a raster base layer a possibility? In the changelog, v. 1.1.25 says:

support multiple tile sources so that data such as hillshade can be rendered on a map

... can we do transparent backgrounds with this package? From that changelog comment, and a couple issues, I wasn't so sure.

greensopinion commented 1 year ago

This library doesn't support raster layers. You may find flutter-vector-map-tiles-examples useful, since it includes an example of switching layers (though it doesn't support raster layers in a vector style either.)

is this more of a question for the vector_map_tiles project?

yes

Is showing a raster base layer a possibility?

not yet, per above

can we do transparent backgrounds with this package?

It should be possible, though I haven't tried it recently and some people report errors as you've noted. There may be a defect. Feel free to look into it!

greensopinion commented 12 months ago

I've provided a multi-layer example: https://github.com/greensopinion/flutter-vector-map-tiles-examples See https://github.com/greensopinion/flutter-vector-map-tiles-examples/blob/main/lib/examples/multi_layer.dart for details.