Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

in my Openlayers app, since the base map projection is not epsg900913 or 4326, I need to include proj4js in order to use geolocation feature. but i got such a error notice:

 GET 404 (Not Found)

i am wondering how come this null.js is needed here. the funny thing is i can't find this file from proj4js lib files..

anybody can help me out?



<!DOCTYPE html> 
<link rel="stylesheet" href="theme/default/style.css" type="text/css"> 
<link rel="stylesheet" href="style.css" type="text/css"> 
<script type="text/javascript" src=""></script>
<script src=""></script> 

    <div id="map" class="smallmap"></div> 
<script  type="text/javascript">
    var map = new OpenLayers.Map({
    div: "map",
    projection: new OpenLayers.Projection("EPSG:26912"),
    layers: [
        new OpenLayers.Layer("",{isBaseLayer: true}),
        new OpenLayers.Layer.Vector("KML", {
            strategies: [new OpenLayers.Strategy.Fixed()],
            protocol: new OpenLayers.Protocol.HTTP({
                url: "test.kml",
                format: new OpenLayers.Format.KML({
                    extractStyles: true, 
                    extractAttributes: true,
                    maxDepth: 2

share|improve this question
Try to reformulate the title to a question, for example "How do I include proj4js in openlayers?" – MathiasWestin Aug 12 '11 at 6:44
up vote 3 down vote accepted

After looking at your code it seems the error is in the definition of EPSG26912 where a colon is missing. Try the changes on local copy and then report them to the developers. You should never link to code from SVN trunk, anyway because of both performance and stability issues. Instead use a stable version of proj4js or a local checkout.

share|improve this answer
Hi thanks for your reply. i attached the code, i don't know why i got that null.js 404-not-found error after including proj4js.js header file. – Simon Aug 13 '11 at 3:54
cool.. forgive my carelessness.. – Simon Aug 13 '11 at 17:23

should be

projection: new OpenLayers.Projection("EPSG:26912");

Add this before:

Proj4js.defs["EPSG:26912"] = "+proj=utm +zone=12 +ellps=GRS80 +datum=NAD83 +units=m +no_defs";
share|improve this answer
thanks for this notice. however, it doesn't work. – Simon Aug 13 '11 at 17:15

This isn't an answer yet, but hopefully we'll be able to work it to there. I've got a pretty simple projection up here which should allow us to test the answer proposed by @ilia and figure out something which we can all get to work.

I've put essentially the complex example of Proj4JS from here:

What's the simplest that we can make this? I've tried to do one up here with a basic projection:

It doesn't work, but much of the interesting stuff is in the Manage resources section in the sidebar.

The defaults I'm pulling in from:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.