0

My code is something like this (simplified for the sake of example):

var geography = {
    vocab: {
        domains: {
            isoType: {
                "1" : "Isobars Feet",
                "2" : "Isobars Fathoms",
                "3" : "Isobars Meters",
                "4" : "Contours Feet",
                "5" : "Contours Meters",
                "6" : "Multiple Isobar Types",
                "7" : "No Isobar Indicated"
            } // end isoType
        }, // end domains
        attributes: {
            "ISO_TYPE" : ["Isobar Type", geography.vocab.domains.isoType],
        } // end attributes
    } // end vocab
}  // end geography

When the page loads, I get "Uncaught TypeError: Cannot read property 'vocab' of undefined(…)" on this line:

"ISO_TYPE" : ["Isobar Type", geography.vocab.domains.isoType],

I can't figure out why this would happen. Does it have something to do with the relative placement of the objects?

Live example, if it helps:

http://webgis.uwm.edu/agsl/geodex-web-map/index-new.html

http://webgis.uwm.edu/agsl/geodex-web-map/geodex-web-map-new.js

0 Answers0