Mapbox Markers From Geojson Not Appearing In Ie9
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 mark
Solution 1:
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 datavar 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) {returnstring;}});
// The rest of my code here...
});
Solution 2:
I did get an error when pasting the geoJSON to http://geojsonlint.com/: "Invalid GeoJSON, Data was not JSON serializeable."
My guess as to why this error occurs is that you have double quotes in the description fields which are also wrapped with double quotes. If you wrap the description in single quotes, that may fix it (it will also require you to replace the other single quotes within this field with double quotes).
Post a Comment for "Mapbox Markers From Geojson Not Appearing In Ie9"