Giter Site home page Giter Site logo

Global architecture about mapsui.vectortiles HOT 5 OPEN

charlenni avatar charlenni commented on September 27, 2024
Global architecture

from mapsui.vectortiles.

Comments (5)

charlenni avatar charlenni commented on September 27, 2024

Thank you, coming back to this.

Most of the libraries call their file format same as the UI. Mapbox is a vector file format and a UI library. The same is Mapsforge. It is an often used file format on Android, because the UI library, using the files is free and good. So to answer your question: yes, both are similar. Both contain data organized in tiles of different layers with features in it. Each feature has one or more geometries and key-value-pairs (tags) with informations of types of the feature. So it should be possible, to use both for this. The differences are the file format: Mapbox uses SQLite, Mapsforge is a binary format.

If you want to handle more than one file format (there are even more file format out there), than you have to use a common representation for the data. And this is Mapsui.VectorTiles.

The question is, how to do this all. You should have a method, that returns for a given tile alle features on all layers with the corresponding tags. This informations should than converted by a styler (could be MapCSS or any other style format out there) to the correct information for Mapsui. So the styler should know the VectorTile Feature format and the Mapsui Feature format. So created Mapsui Features than could be drawn on the device.

from mapsui.vectortiles.

charlenni avatar charlenni commented on September 27, 2024

@pauldendulk I added today a first sample to show data from a mapsforge map file on a map. It uses data from Andorra and draws only geometries of features on the map. There isn't any styling.

I think, we should talk about some parts of the vector tlies code. I changed the code a bit, to make clearer, for what it is used. At the end, there should be

  • VectorTileSource: Provides a list of VectorTileLayers for a tile, while each VectorTileLayer contains one or more VectorTileFeatures. In the moment you could use Mapbox and Mapsforge files.
  • VectorTileStyler: Provides a Mapsui.Style for a list of tags. Up to now I haven't implemented one :(
  • VectorTileProvider: Implements a Mapsui.IProvider for features with style. This VectorTileProvider could than be used in Mapsui to display vector maps (online and offline, depending of the VectorTileSource).

There are some parts from BruTile (tile handling) and from Mapsui.Geometries.

I would be happy, if you could think about the concept and if you want to have something else. Perhaps Mark could think about this too. @radderz, are you interessted in adding an online/offline vector map to Mapsui?

from mapsui.vectortiles.

pauldendulk avatar pauldendulk commented on September 27, 2024

Sorry, I missed your earlier reply from august, and have done some work myself in the vector-tile branch of Mapsui in a period that you were not active in the project. We should have had more contact about this.

The vector-tile branch is actually quite far. It basically 'works'. The reason that it is not in master is that it needs .NET Standard. Not really blocking but would like to merge it once Mapsui is .NET Standard. Also performance is bad for pure vectors (but can be improved). The rasterized vector tile solution is acceptable.

Mapsforge is not supported in the vector-tile branch.

I'll get back with more specific replies later.

from mapsui.vectortiles.

charlenni avatar charlenni commented on September 27, 2024

That's really bad. The good thing is, that we did it on different ways. You convert the vector data to an image, I convert the vector data to features depending on zoom level and draw them each time on screen.

from mapsui.vectortiles.

vherbst avatar vherbst commented on September 27, 2024

Hi, I'm using Mapsui for some time and have written an own postgis provider for it which does work quite well but is of course dependent on a database connection. As postgis can serv vector tiles (there are quite a few vector tile server out there as well) I would prefer this path as I could be independent from the direct database connection. I cant see any samples for the moment in Mapsui how to consume mvt files or services. Is there a path forward and which version of your different implementations is the preferred one? May be I could also get involved a bit if necessary.

from mapsui.vectortiles.

Related Issues (3)

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.