Skip to content

Commit

Permalink
Merge pull request #993 from geoadmin/fix-PB-753-kml-no-labels
Browse files Browse the repository at this point in the history
PB-753 : fix an issue in OL with KML placemark with an icon scale of 0 - #patch
  • Loading branch information
pakb authored Jul 5, 2024
2 parents 81b3127 + be91e06 commit bf0a386
Show file tree
Hide file tree
Showing 3 changed files with 3,282 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/modules/drawing/lib/export-utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Feature from 'ol/Feature'
import { GPX, KML } from 'ol/format'
import { GPX } from 'ol/format'
import { LineString, Polygon } from 'ol/geom'
import { Circle, Icon } from 'ol/style'
import Style from 'ol/style/Style'
Expand All @@ -9,6 +9,8 @@ import { WGS84 } from '@/utils/coordinates/coordinateSystems'
import { featureStyleFunction } from '@/utils/featureStyleUtils'
import { EMPTY_KML_DATA } from '@/utils/kmlUtils'
import log from '@/utils/logging'
// FIXME: as soon as https://github.com/openlayers/openlayers/pull/15964 is merged and released, go back to using OL files
import KML from '@/utils/ol/format/KML'

const kmlFormat = new KML()
const gpxFormat = new GPX()
Expand Down
6 changes: 3 additions & 3 deletions src/utils/kmlUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import {
} from 'ol/extent'
import Feature from 'ol/Feature'
import GeoJSON from 'ol/format/GeoJSON'
import KML, { getDefaultStyle } from 'ol/format/KML'
import IconStyle from 'ol/style/Icon'
import Style from 'ol/style/Style'

import EditableFeature, { EditableFeatureTypes } from '@/api/features/EditableFeature.class'
import { extractOlFeatureCoordinates } from '@/api/features/features.api'
import { DEFAULT_TITLE_OFFSET } from '@/api/icon.api'
import { DrawingIcon } from '@/api/icon.api'
import { DEFAULT_TITLE_OFFSET, DrawingIcon } from '@/api/icon.api'
import { WGS84 } from '@/utils/coordinates/coordinateSystems'
import {
allStylingSizes,
Expand All @@ -26,6 +24,8 @@ import {
} from '@/utils/featureStyleUtils'
import { GeodesicGeometries } from '@/utils/geodesicManager'
import log from '@/utils/logging'
// FIXME: as soon as https://github.com/openlayers/openlayers/pull/15964 is merged and released, go back to using OL files
import KML, { getDefaultStyle } from '@/utils/ol/format/KML'
import { parseRGBColor } from '@/utils/utils'

export const EMPTY_KML_DATA = '<kml></kml>'
Expand Down
Loading

0 comments on commit bf0a386

Please sign in to comment.