dekkard's solution to "URGENT: Help needed getting large GeoJSON file to render using Mapbox "

Hello,
\nplease try this:<\/p>\n

    <!DOCTYPE html><\/span>\n    <html><\/span>\n    <head><\/span>\n        <meta<\/span> charset=<\/span>'utf-8'<\/span> /><\/span>\n        <title><\/span>Add a GeoJSON polygon</title><\/span>\n        <meta<\/span> name=<\/span>'viewport'<\/span> content=<\/span>'initial-scale=1,maximum-scale=1,user-scalable=no'<\/span> /><\/span>\n        <script<\/span> src=<\/span>'https://api.tiles.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.js'<\/span>></script><\/span>\n        <link<\/span> href=<\/span>'https://api.tiles.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.css'<\/span> rel=<\/span>'stylesheet'<\/span> /><\/span>\n        <style><\/span>\n            body { margin:0; padding:0; }\n            #map { position:absolute; top:0; bottom:0; width:100%; }\n        </style><\/span>\n    </head><\/span>\n    <body><\/span>\n\n    <div<\/span> id=<\/span>'map'<\/span>></div><\/span>\n    <script><\/span>\n    mapboxgl.accessToken = 'pk.eyJ1IjoidW5jb25kaXRpb25hbCIsImEiOiJjamg2cWJsaTgwMDE4MnFvbnB5ZXhxYmJoIn0.hCYaOn9247F8KRmmLrs_4Q';\n    var map = new mapboxgl.Map({\n        container: 'map',\n        style: 'mapbox://styles/mapbox/streets-v9',\n        center: [-68.13734351262877, 45.137451890638886],\n        zoom: 5\n    });\n\n\n\n    map.on('load', function () {\n\n        map.addSource('scmpd-precinct-polygons', {\n          type: 'geojson',\n          data: 'https://cdn.rawgit.com/carlvlewis/02631ee66f172936c454a4a1e12c5eff/raw/7c3c1a15645b0d5ac7f65216ee61c896b872179f/scmpd-precinct-polygons.geojson'\n        });\n\n        map.addLayer({\n            'id': 'precinct-layer',\n            'type': 'fill',\n            'source': 'scmpd-precinct-polygons',\n            'layout': {},\n            'paint': {\n                'fill-color': '#088',\n                'fill-opacity': 0.8\n            }\n        });\n    });\n    </script><\/span>\n\n    </body><\/span>\n    </html><\/span>\n<\/pre><\/div>\n

Worked for me.<\/p>\n

Hello, please try this: Add a GeoJSON polygon
Worked for me. Here's a [JSFiddle](https://jsfiddle.net/365tz5t8/) for your convenience. Scroll all the way to Savannah/Georgia to see your data drawn.

User: dekkard

Question: URGENT: Help needed getting large GeoJSON file to render using Mapbox

Back to question