Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(feature): possibility to generate mvt data source as regular features or as renderFeatures. #527

Merged
merged 16 commits into from
Dec 17, 2019

Conversation

drekss
Copy link
Contributor

@drekss drekss commented Dec 5, 2019

feat(feature): possibility to generate mvt data source as regular features or as renderFeatures.

renderFeature is optimized for rendering and hit detection.

@drekss
Copy link
Contributor Author

drekss commented Dec 5, 2019

{
  "title": "tenure-elcano-server",
  "declutter": true,
  "visible": false,
  "opacity" : 0.5,
  "styleByAttribute": {
    "type": "regular",
    "attribute": "TYPE",
    "data": [ "Priv"],
    "fill": ["red"],
    "stroke": ["rgba(255,255,0,0)"],
    "width" : [5],
    "label": "TYPE",
    "baseStyle": {
    "stroke": {
      "color": "rgba(255,255,0,0)"
    },
    "fill": {
      "color": "rgba(255,255,0,0)"
    }
  }},
  "sourceOptions": {
    "queryable": true,
    "url": "http://elcano:8080/geoserver/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=TuilageSmartFaune:Tenures&STYLE=&TILEMATRIX=EPSG:900913:{z}&TILEMATRIXSET=EPSG:900913&FORMAT=application/x-protobuf;type=mapbox-vector&TILECOL={x}&TILEROW={y}",
    "pathOffline": "https://io.ion.igo2/_app_file_/storage/emulated/0/Android/data/io.ionic.igo2/files/tiles/pbf/aireprotegee/{z}/{x}/{y}.mvt",
    "attributions": "<a href='https://www.quebec.ca/'><br><a href='http://www.droitauteur.gouv.qc.ca/copyright.php'>© Gouvernement du Québec</a><br> <br> Fondé sur<a href='https://github.com/infra-geo-ouverte/igo2'> IGO2</a>",
    "type": "mvt",
    "excludeAttribute": ["layer", "CODE"],
    "featureClass": "feature"
  }
},

this json generate feature

@drekss
Copy link
Contributor Author

drekss commented Dec 5, 2019

{
  "title": "tenure-elcano-server",
  "declutter": true,
  "visible": false,
  "opacity" : 0.5,
  "styleByAttribute": {
    "type": "regular",
    "attribute": "TYPE",
    "data": [ "Priv"],
    "fill": ["red"],
    "stroke": ["rgba(255,255,0,0)"],
    "width" : [5],
    "label": "TYPE",
    "baseStyle": {
    "stroke": {
      "color": "rgba(255,255,0,0)"
    },
    "fill": {
      "color": "rgba(255,255,0,0)"
    }
  }},
  "sourceOptions": {
    "queryable": true,
    "url": "http://elcano:8080/geoserver/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=TuilageSmartFaune:Tenures&STYLE=&TILEMATRIX=EPSG:900913:{z}&TILEMATRIXSET=EPSG:900913&FORMAT=application/x-protobuf;type=mapbox-vector&TILECOL={x}&TILEROW={y}",
    "pathOffline": "https://io.ion.igo2/_app_file_/storage/emulated/0/Android/data/io.ionic.igo2/files/tiles/pbf/aireprotegee/{z}/{x}/{y}.mvt",
    "attributions": "<a href='https://www.quebec.ca/'><br><a href='http://www.droitauteur.gouv.qc.ca/copyright.php'>© Gouvernement du Québec</a><br> <br> Fondé sur<a href='https://github.com/infra-geo-ouverte/igo2'> IGO2</a>",
    "type": "mvt",
    "excludeAttribute": ["layer", "CODE"],
  }
},

this json genrate renderFeature. renderFeature are generated by default. featureClass: source options is not necessary

@gignacnic
Copy link
Contributor

Related to: #514

@mbarbeau mbarbeau merged commit a157337 into infra-geo-ouverte:master Dec 17, 2019
@drekss drekss deleted the mvt-style-push branch May 4, 2020 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants