Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bozdoz

    (@bozdoz)

    looks like it might be a problem with the web server serving the file, or the file itself; if you visit the geojson page in the browser you can see this in the developer tools console:

    The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature.

    Also, from the page you’re testing you can see that it’s interpreting the geojson file as xml. Not sure what the solution might be, but I would check nginx/apache, and maybe rename it from .geojson to .json. Good luck!

    Thread Starter mike

    (@michaelranderson)

    Uncaught SyntaxError: Unexpected token h in JSON at position 4616
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.request.t.onreadystatechange (leaflet-ajax-geojson.min.js:1)

    I get this error.

    • This reply was modified 5 years, 10 months ago by mike.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘GeoJson Not Displaying’ is closed to new replies.