Mapbox markers from geoJSON not appearing in IE9

isabisa

I have a map that is loading markers from a local geoJSON file. This works fine in all browsers I have tested (FF, Chrome, Safari, Opera, IE10, IE11) but not in IE9.

I added a marker to the map without geoJSON (the yellow bus marker) which does show up fine in IE9.

Here is the relevant code:

    // set up mapbox
    var map = new L.mapbox.map('map', '########', {
        tileLayer: {
            detectRetina: true,
            minZoom: 2
        },
        zoomControl: false
    });

    // marker without geoJSON
    L.marker([-37.9, -77], {
        icon: L.mapbox.marker.icon({
            'marker-size': 'large',
            'marker-symbol': 'bus',
            'marker-color': '#fa0'
        })
    }).addTo(map);

    // markers with geoJSON
    var geoJsonData = L.mapbox.featureLayer().loadURL('http://nomacorc.cuberishosting.com/wp-content/themes/nomacorc/map-lib/sellers-locations.php').addTo(map);

You can see a working example at: http://nomacorc.cuberishosting.com/purchase-test/.

Here is a link to the geoJSON file: http://nomacorc.cuberishosting.com/wp-content/themes/nomacorc/map-lib/sellers-locations.php

The geoJSON itself appeared to validate for me at http://geojsonlint.com/

isabisa

Looks like it was something with the way the JSON was being called in the loadURL function. I pulled the JSON with AJAX to fix it like so:

    // url to file with geojson data
    var url = 'http://nomacorc.cuberishosting.com/wp-content/themes/nomacorc/map-lib/sellers-locations.php';

    // load geojson file
    $.getJSON(url, function(data) {

        var featureMarkers = L.mapbox.featureLayer(data, {sanitizer: function(string) {return string;}});

        // The rest of my code here...
    });

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Clustering markers from geojson using google maps

From Dev

How to add Markers on Map from geoJson with many points (Leaflet)

From Dev

Is it possible to drag markers that gets it coordinates from geojson file?

From Dev

Custom markers for points from a geoJson file with Google Maps

From Dev

Mapbox markers disappearing when too far away from map center

From Dev

mapbox with markers and checkboxes - disable all from showing on initial load?

From Dev

Mapbox markers disappearing when too far away from map center

From Dev

charting markers not appearing on line

From Java

Adding and displaying data from a locally stored GeoJSON file using MapBox

From Dev

Editing/Removing GeoJSON layers from a featureGroup in Mapbox using Leaflet

From Dev

Drawing Polygons From GeoJSON in react-mapbox-gl

From Dev

Adding and displaying data from a locally stored GeoJSON file using MapBox

From Dev

Colorize polygons shapes from geoJSON in MapBox Android SDK

From Dev

How to draw a double line from GeoJson source in MapBox GL JS?

From Dev

My mapbox markers not displaying

From Dev

Error with geoJSON file for Mapbox

From Dev

mapbox gl geojson style

From Dev

Ionic 2: Map markers not appearing

From Dev

Mapbox Markers - Dynamic markers on one layer

From Dev

Mapbox Markers - Dynamic markers on one layer

From Dev

popups for mapbox markers on hover not working

From Dev

Mapbox-gl animate markers

From Dev

Markers from one Angular ng-map re-appearing in the wrong view

From Dev

layers control and geojson on mapbox/leaflet

From Dev

Styling a geoJSON Feature Layer in MapBox

From Dev

Style geojson line in mapbox/leaflet

From Dev

Style geojson line in mapbox/leaflet

From Dev

mapbox geojson properties not available on hover

From Dev

mapbox set clickable to false in geoJSON

Related Related

  1. 1

    Clustering markers from geojson using google maps

  2. 2

    How to add Markers on Map from geoJson with many points (Leaflet)

  3. 3

    Is it possible to drag markers that gets it coordinates from geojson file?

  4. 4

    Custom markers for points from a geoJson file with Google Maps

  5. 5

    Mapbox markers disappearing when too far away from map center

  6. 6

    mapbox with markers and checkboxes - disable all from showing on initial load?

  7. 7

    Mapbox markers disappearing when too far away from map center

  8. 8

    charting markers not appearing on line

  9. 9

    Adding and displaying data from a locally stored GeoJSON file using MapBox

  10. 10

    Editing/Removing GeoJSON layers from a featureGroup in Mapbox using Leaflet

  11. 11

    Drawing Polygons From GeoJSON in react-mapbox-gl

  12. 12

    Adding and displaying data from a locally stored GeoJSON file using MapBox

  13. 13

    Colorize polygons shapes from geoJSON in MapBox Android SDK

  14. 14

    How to draw a double line from GeoJson source in MapBox GL JS?

  15. 15

    My mapbox markers not displaying

  16. 16

    Error with geoJSON file for Mapbox

  17. 17

    mapbox gl geojson style

  18. 18

    Ionic 2: Map markers not appearing

  19. 19

    Mapbox Markers - Dynamic markers on one layer

  20. 20

    Mapbox Markers - Dynamic markers on one layer

  21. 21

    popups for mapbox markers on hover not working

  22. 22

    Mapbox-gl animate markers

  23. 23

    Markers from one Angular ng-map re-appearing in the wrong view

  24. 24

    layers control and geojson on mapbox/leaflet

  25. 25

    Styling a geoJSON Feature Layer in MapBox

  26. 26

    Style geojson line in mapbox/leaflet

  27. 27

    Style geojson line in mapbox/leaflet

  28. 28

    mapbox geojson properties not available on hover

  29. 29

    mapbox set clickable to false in geoJSON

HotTag

Archive