Skip to content

Instantly share code, notes, and snippets.

View DanielJDufour's full-sized avatar

Daniel J. Dufour DanielJDufour

View GitHub Profile

Alternative to bundle with full projection support

Some people prefers using a full bundle Proj4js (https://github.com/DanielJDufour/proj4-fully-loaded). For server side, I like the approach but for client side, it bothers me to get the full bundle as I prefer loading on the fly the projection(s)

I made a short sample with two approaches (see comments in index.js). Code depends from availability from http://epsg.io and related APIs

Recipe to try the sample

git clone https://gist.github.com/f5a6a1b8d5a2b7c3f6c8f8d3745c535c load-proj4js-on-the-fly

@jeremypage
jeremypage / web.config
Created April 10, 2015 10:59
IIS: Enable json/geojson MIME types
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".json" mimeType="application/json" />
<mimeMap fileExtension=".geojson" mimeType="application/json" />
</staticContent>
<handlers>
<add name="geoJSON" path=".geojson" verb="*" modules="IsapiModule" scriptProcessor="C:\WINDOWS\system32\inetsrv\asp.dll" resourceType="Unspecified" />
<add name="JSON" path=".json" verb="*" modules="IsapiModule" scriptProcessor="C:\WINDOWS\system32\inetsrv\asp.dll" resourceType="Unspecified" />