Skip to content

Commit

Permalink
updated mvt examples
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed Nov 21, 2023
1 parent 7567a96 commit 3d8b426
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
8 changes: 4 additions & 4 deletions packages/playground/examples/display/custom_layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ const baseMapLayer = new MVTLayer({
},

assign: (feature, zoom) => {
let props = feature.properties;
let kind = props.kind;
let layer = feature.getMvtLayer();
let geom = feature.geometry.type;
const props = feature.properties;
const kind = props.kind;
const layer = props.$layer; // the name of the layer in the mvt datasource.
const geom = feature.geometry.type;

if (layer == 'landuse') {
switch (kind) {
Expand Down
8 changes: 4 additions & 4 deletions packages/playground/examples/display/pitch_rotate_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ const baseMapLayer = new MVTLayer({
},

assign: (feature, zoom) => {
let props = feature.properties;
let kind = props.kind;
let layer = feature.getMvtLayer();
let geom = feature.geometry.type;
const props = feature.properties;
const kind = props.kind;
const layer = props.$layer; // the name of the layer in the mvt datasource.
const geom = feature.geometry.type;

if (layer == 'landuse') {
switch (kind) {
Expand Down
8 changes: 4 additions & 4 deletions packages/playground/examples/layer/3d_buildings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const display = new Map(document.getElementById('map'), {
},

assign: (feature, level) => {
var props = feature.properties;
var kind = props.kind;
var layer = feature.getMvtLayer(); // the data layer of the feature
var geom = feature.geometry.type;
const props = feature.properties;
const kind = props.kind;
const layer = props.$layer; // the name of the layer in the mvt datasource.
const geom = feature.geometry.type;

if (layer == 'water') {
if (geom == 'LineString' || geom == 'MultiLineString') {
Expand Down
8 changes: 4 additions & 4 deletions packages/playground/examples/layer/3d_lines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ var baseMapLayer = new MVTLayer({
}]
},
assign: function(feature, zoom) {
var props = feature.properties;
var kind = props.kind;
var layer = feature.getMvtLayer();
var geom = feature.geometry.type;
const props = feature.properties;
const kind = props.kind;
const layer = props.$layer; // the name of the layer in the mvt datasource.
const geom = feature.geometry.type;

if (layer == 'landuse') {
switch (kind) {
Expand Down
8 changes: 4 additions & 4 deletions packages/playground/examples/layer/Heatmap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ const display = new Map(document.getElementById('map'), {
'buildings': [{zIndex: 7, type: 'Polygon', fill: '#999999'}]
},
assign: function(feature, level) {
var props = feature.properties;
var kind = props.kind;
var layer = feature.getMvtLayer(); // the data layer of the feature
var geom = feature.geometry.type;
const props = feature.properties;
const kind = props.kind;
const layer = props.$layer; // the name of the layer in the mvt datasource.
const geom = feature.geometry.type;

if (layer == 'water') {
if (geom == 'LineString' || geom == 'MultiLineString') {
Expand Down
8 changes: 4 additions & 4 deletions packages/playground/examples/layer/MVTLayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ const display = new Map(document.getElementById('map'), {
},

assign: function(feature, level) {
var props = feature.properties;
var kind = props.kind;
var layer = feature.getMvtLayer(); // the data layer of the feature
var geom = feature.geometry.type;
const props = feature.properties;
const kind = props.kind;
const layer = props.$layer; // the name of the layer in the mvt datasource.
const geom = feature.geometry.type;

if (layer == 'water') {
if (geom == 'LineString' || geom == 'MultiLineString') {
Expand Down
8 changes: 4 additions & 4 deletions packages/playground/examples/layer/collision_detection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ const display = new Map(document.getElementById('map'), {
},

assign: (feature, level) => {
let props = feature.properties;
let geom = feature.geometry.type;
let kind = props.kind;
let layer = feature.getMvtLayer(); // the data layer of the feature
const props = feature.properties;
const kind = props.kind;
const layer = props.$layer; // the name of the layer in the mvt datasource.
const geom = feature.geometry.type;

if (layer == 'water') {
if (geom == 'LineString' || geom == 'MultiLineString') {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ const display = new Map(document.getElementById('map'), {
},

assign: (feature, zoom) => {
let props = feature.properties;
let kind = props.kind;
let layer = feature.getMvtLayer();
let geom = feature.geometry.type;
const props = feature.properties;
const kind = props.kind;
const layer = props.$layer; // the name of the layer in the mvt datasource.
const geom = feature.geometry.type;

if (layer == 'landuse') {
switch (kind) {
Expand Down

0 comments on commit 3d8b426

Please sign in to comment.