# Package com.codename1.maps.vector

package com.codename1.maps.vector

The pure-vector map rendering engine that backs `MapView`.

The engine decodes Mapbox Vector Tiles (MVT) with the framework protobuf reader and draws them entirely through the Codename One `Graphics` API -- there is no native peer, so a `MapView` composes with regular lightweight UI on every platform including the simulator and the browser. Tiles are supplied by a pluggable `TileSource` (network MVT or raster, bundled fixtures, or the keyless OpenFreeMap basemap) and styled with a `MapStyle` (a subset of the MapLibre GL style specification). The classes in this package are internal building blocks of the engine; application code targets `MapView` and the public tile-source and style types.

- Related Packages
  Package
  Description
  com.codename1.maps
  The mapping API allows developers to use maps in their applications, add layers on top of the map and to enhance the API with additional Layers, Providers and functionality.
  com.codename1.maps.layers
  The Layers are elements that are displayed on the map.
  com.codename1.maps.providers
  These are the map providers, currently http://www.openstreetmap.org/ is supported.
  com.codename1.maps.spi
  The maps service-provider interface (SPI).
- Class
  Description
  BundledTileSource
  A `TileSource` that loads tiles from application resources bundled into the app (the classpath), with no network access.
  DemoTileSource
  A self-contained `TileSource` that synthesizes a deterministic Mapbox Vector Tile in memory for every address, with no network or bundled assets.
  HttpTileSource
  A `TileSource` that fetches tiles over HTTPS from a slippy-map URL template.
  MapStyle
  An ordered list of `StyleLayer` rules plus a background color, describing how a vector tile is painted.
  MvtDecoder
  Decodes a Mapbox Vector Tile (MVT 2.1, `application/x-protobuf`) into the in-memory `VectorTile` model using the framework's protobuf reader (`ProtoReader`).
  MvtTileSource
  A networked MVT (Mapbox Vector Tile) source.
  RasterTileSource
  A networked raster (image) XYZ tile source.
  StyleLayer
  One rule of a `MapStyle`: it selects features from a named vector-tile source layer (optionally narrowed by a single attribute equality filter) within a zoom range, and describes how to paint them.
  TileCallback
  Asynchronous result callback for `TileSource.fetchTile(int, int, int, TileCallback)`.
  TileSource
  Supplies tile payloads to the `VectorMapEngine` given a slippy-map `z/x/y` address.
  VectorFeature
  A single decoded feature of a Mapbox Vector Tile: its geometry type, its attribute map, and its geometry as one or more parts in tile-local coordinates (0..`VectorLayer.getExtent()`, origin top-left).
  VectorLayer
  A named layer of a decoded vector tile (for example `water`, `road`, `building`, `place`) holding its features and the integer extent of its local coordinate grid (4096 by default).
  VectorMapEngine
  The pure-Codename One map renderer behind `MapView` (and the `NativeMap` fallback).
  VectorTile
  A decoded Mapbox Vector Tile: an ordered collection of named `VectorLayer`s.
  WebMercator
  Spherical Web Mercator (EPSG:3857) helpers expressed in "world pixels" -- the slippy-map coordinate space where the whole world spans `tileSize * 2^zoom` pixels.