Skip to content

Commit

Permalink
Correct featureFormats properties assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
RobAndrewHurst committed Oct 28, 2024
1 parent 33a46c1 commit a86974e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/layer/featureFormats.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ export function wkt(layer, features) {
// Populate featureFields values array with feature property values.
layer.params.fields?.forEach((field, i) => {

layer.featureFields[field].values.push(feature[i + 2]);
layer.featureFields[field].values.push(feature[i]);

properties[field] = feature[i + 2]
properties[field] = feature[i]
})

// Return feature from geometry with properties.
Expand Down
22 changes: 11 additions & 11 deletions lib/location/nnearest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ export default async function nnearest(params) {
const list = response.map(
li => mapp.utils.html.node`<li
onclick=${e => {
params.mapview.popup(null)
mapp.location.get({
layer: params.layer,
table: params.table,
id: li.id,
marker: ol.proj.transform(
li.coords,
'EPSG:' + params.layer.srid,
'EPSG:' + params.mapview.srid),
})
}}>${li.label || '"' + params.layer.cluster?.label + '"'}`)
params.mapview.popup(null)
mapp.location.get({
layer: params.layer,
table: params.table,
id: li.id,
marker: ol.proj.transform(
li.coords,
'EPSG:' + params.layer.srid,
'EPSG:' + params.mapview.srid),
})
}}>${li.label || '"' + params.layer.cluster?.label + '"'}`)

const content = mapp.utils.html.node`<ul class="list">${list}`;

Expand Down

0 comments on commit a86974e

Please sign in to comment.