Skip to content
Snippets Groups Projects
Merged Timothee P requested to merge redmine-issues/12616 into develop
1 file
+ 3
5
Compare changes
  • Side-by-side
  • Inline
@@ -626,15 +626,13 @@ export default {
@@ -626,15 +626,13 @@ export default {
addFeatureToMap() {
addFeatureToMap() {
const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/${this.$route.params.slug}/feature/` +
const url = `${this.$store.state.configuration.VUE_APP_DJANGO_API_BASE}projects/${this.$route.params.slug}/feature/` +
`?feature_type__slug=${this.$store.state.feature_type.feature_types[0].slug}&output=geojson`;
`?feature_id=${this.$route.params.slug_signal}&output=geojson`;
axios
axios
.get(url)
.get(url)
.then((response) => {
.then((response) => {
const feature = response.data.features[0];
if (response.data.features.length > 0) {
if (feature) {
const currentFeature = [feature];
const featureGroup = mapUtil.addFeatures(
const featureGroup = mapUtil.addFeatures(
currentFeature,
response.data.features,
{},
{},
true,
true,
this.$store.state.feature_type.feature_types
this.$store.state.feature_type.feature_types
Loading