Giter VIP home page Giter VIP logo

flutter_map_vector_tiles's Introduction

flutter_map_vector_tile

Vector tiles for flutter_map

SEE examples/main.dart for example of how to run it...
Main code is in lib/vector_tile_plugin.dart
The lib/vector_tile_pb.. files were generated using the vector_tile.proto file

This is a proof of concept of using Vector Tiles (currently just Mapbox). It's not ready yet, but it's a base to be explored from.

Features that "should" work.

Mapbox Vector tile processing with a default optimised for Flutter styling.

Flexible UnderZoom tile loading (loading tile levels from a lower zoom, in order to reduce the amount of tiles to download).

Collision detection on labels. There's a LOT of potential overlapping text. So this reduces it.

Labels kept upright during rotation.

Road labels that are angled to a road contour (not curved along it though, possible future enhancement, but will be some performance issues likely).

You can use png images instead of vector tiles, it will simply paint them on the Canvas. To use set useImages: true and make sure you set the correct tile url for pngs, rather than Vector tiles.

Example in action

There are quite a few caveats:

It currently is just mapbox (but I think won't be tooooo tricky to extend)

Drawing many thick lines is slow on the Canvas, so mileage may very. I'm currently getting around this by converting to hairline widths on pinchzoom only. This is an option and can be turned off.

There's a default styling I've set. This needs coding to support proper styles probably through a constructor or similar, and is a future addition (anyone welcome to have a bash!)

Also needs a styling option to be passed to the layer.

It needs alternate tiles working, like geojson tiles, and other providers.

flutter_map_vector_tiles's People

Contributors

ibrierley avatar mootw avatar

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.