Skip to content

Commit

Permalink
Merge pull request #7 from WoodlandsCoUk/fix-android-map-loading
Browse files Browse the repository at this point in the history
fix: move marker image loading earlier in process
  • Loading branch information
madwort authored Feb 26, 2021
2 parents fe325e6 + f71aae2 commit 7d8744a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/utilities/map/js/dynamic.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ maps.forEach(container => {
accessToken: process.env.MAPBOX_KEY
})

mapElement.loadImage('/images/marker.png', (error, image) => {
if (!error) {
mapElement.addImage('marker', image)
}
})

mapElement.addControl(new System.NavigationControl())

mapElement.on('load', () => {
mapElement.loadImage('/images/marker.png', (error, image) => {
if (!error) {
mapElement.addImage('marker', image)
}
})

mapElement.addSource('woodlands', {
type: 'geojson',
data: {
Expand Down

0 comments on commit 7d8744a

Please sign in to comment.