Why isn't my geoJSON showing in my leaflet map?

المشرف العام

Administrator
طاقم الإدارة
I'm trying to load a geojson file in to my leaflet map and can't see what's going wrong. From looking at other questions i've used Jquery Ajax to call the geojson. The geojson is in the same directory as the html.

This is the ajax query i'm using

var geojsonLayer = new L.GeoJSON.AJAX("gtd.geojson"); These are the error messages i'm getting from google chrome:

Uncaught ReferenceError: polygon is not definedleaflet.ajax.min.js:1 XMLHttpRequest cannot load file:///E:/Pure%20Test/gtd. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.(anonymous function) @ leaflet.ajax.min.js:

Global Terrorism Attacks
This is the first map I've made with Leaflet








Any help would be greatly appreciated :)



أكثر...
 
أعلى