Last active
August 29, 2015 14:08
-
-
Save davestacey/5397dc43a173b2a92db4 to your computer and use it in GitHub Desktop.
getJSON
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(settings.leaflet).each(function() { | |
var geoJsonFile = 'http://' + window.location.hostname + '/geoJSON'; | |
//var geoJsonFile = basePath + '/data/newjson.geojson'; | |
console.log('geoJsonFile PATH', geoJsonFile); | |
// Load the overlay Data - FeatureCollection | |
$.getJSON(geoJsonFile, function(data) { | |
console.log( "getJSON success, data=", data ); | |
weHaveJSONData(data); | |
})//function(data) | |
.done(function(data) { | |
//console.log( "second success-done", data ); | |
}) | |
.fail(function() { | |
console.log( "getJSON error!" ); | |
}) | |
.always(function() { | |
//console.log( "complete" ); | |
});//$.getJSON | |
// Process the overlay data - Controller | |
function weHaveJSONData(featureData){ | |
console.log('we Have Overlay Features', featureData); | |
featureCollection = featureData; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment