Skip to content

How to load VectorTilesSource according to the slicing rules provided by postgres #2454

Closed
@liangyuan1

Description

We use PostGIS to provide real-time vector slice data for MapBox rules, with interface addresses of http//: ip: rot/${z}/${x}/${y} for discarding request data, and use style for style rendering work

Your Environment

  • Version used:2.44.2
  • Browser Name and version:
  • Operating System and version (desktop or mobile):
  • Link to your project:

##code
` var mvtSource = new itowns.VectorTilesSource({
url: 'http://ip:prot/api-server/gis-server/swgBPipeLine/tile/zxyByLevel/${z}/${x}/${y}?levels=4'
})

  var mvtLayer = new itowns.ColorLayer('MVT', {
    source: mvtSource,
    addLabelLayer: { performance: true }
  })
  view.addLayer(mvtLayer)

`

openlayer demo

The example of Openlayer below can render normally when used in 2D
https://openlayers.org/en/latest/examples/vector-tile-info.html
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions