Skip to content

Commit 2623c50

Browse files
committed
retrieve farm image to static folder
1 parent eb25718 commit 2623c50

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed
58.4 KB
Loading

spp_base_gis/static/src/js/widgets/gis_edit_map/field_gis_edit_map.esm.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -204,21 +204,14 @@ export class FieldGisEditMap extends Component {
204204
this.map.on("draw.create", updateArea);
205205
this.map.on("draw.update", updateArea);
206206

207-
const model = this.props.record._config.resModel;
208-
const url = `${this.webBaseUrl}/web/image?model=${model}&id=${this.props.record._config.resId}&field=geo_img_file`;
207+
const url = `/spp_base_gis/static/src/images/laos_farm.png`;
209208

210209
this.map.on("click", `${this.sourceId}-polygon-layerid`, (e) => {
211210
new maptilersdk.Popup()
212211
.setLngLat(e.lngLat)
213212
.setHTML(`<img src="${url}" height="200" width="300" alt="Placeholder Image">`)
214213
.addTo(this.map);
215214
});
216-
this.map.on("click", `${this.sourceId}-point-layerid`, (e) => {
217-
new maptilersdk.Popup()
218-
.setLngLat(e.lngLat)
219-
.setHTML(`<img src="${url}" height="200" width="300" alt="Placeholder Image">`)
220-
.addTo(this.map);
221-
});
222215
}
223216

224217
addDrawInteractionStyle() {

0 commit comments

Comments
 (0)