Commit 2873eac6 authored by Cédric Bonhomme's avatar Cédric Bonhomme
parents 44b38b3a 5998f494
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
......@@ -250,5 +251,4 @@
{ "type": "Feature", "properties": { "fips": "SV", "iso2": "SJ", "iso3": "SJM", "un": 744, "name": "Svalbard", "area": 0, "pop2005": 0, "region": 150, "subregion": 154, "lon": 18.374000, "lat": 78.830000, "cartodb_id": 240, "created_at": "2014\/08\/28 00:00:00.000", "updated_at": "2014\/08\/28 00:00:00.000", "other_name": "Svalbard and Jan Mayen" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -8.290895, 70.974154 ], [ -9.120058, 70.857759 ], [ -7.927002, 71.15082 ], [ -8.290895, 70.974154 ] ] ], [ [ [ 19.18194, 74.359713 ], [ 18.791945, 74.481661 ], [ 19.299723, 74.474993 ], [ 19.18194, 74.359713 ] ] ], [ [ [ 25.016111, 76.466387 ], [ 24.936384, 76.44887 ], [ 25.58222, 76.706652 ], [ 25.016111, 76.466387 ] ] ], [ [ [ 23.285555, 77.264711 ], [ 23.135275, 77.235262 ], [ 23.036386, 77.259996 ], [ 23.285555, 77.264711 ] ] ], [ [ [ 23.336111, 78.197481 ], [ 23.059721, 78.0161 ], [ 24.910276, 77.749712 ], [ 22.641108, 77.253054 ], [ 22.407499, 77.420824 ], [ 22.778334, 77.547762 ], [ 20.858889, 77.462496 ], [ 21.644999, 77.912493 ], [ 20.903051, 78.114992 ], [ 23.336111, 78.197481 ] ] ], [ [ [ 21.501665, 78.565538 ], [ 22.028887, 78.580828 ], [ 22.271944, 78.263613 ], [ 20.67111, 78.187487 ], [ 20.12472, 78.472216 ], [ 21.501665, 78.565538 ] ] ], [ [ [ 26.847498, 78.707491 ], [ 26.396387, 78.77083 ], [ 27.0175, 78.693041 ], [ 26.847498, 78.707491 ] ] ], [ [ [ 11.271944, 78.606936 ], [ 12.16361, 78.199709 ], [ 10.488611, 78.896379 ], [ 11.271944, 78.606936 ] ] ], [ [ [ 29.030554, 78.916094 ], [ 29.708052, 78.896379 ], [ 28.01972, 78.867479 ], [ 29.030554, 78.916094 ] ] ], [ [ [ 30.20944, 78.976381 ], [ 30.066942, 79.001101 ], [ 30.336111, 78.988878 ], [ 30.20944, 78.976381 ] ] ], [ [ [ 21.226107, 79.037493 ], [ 20.982496, 79.014162 ], [ 20.923609, 79.029985 ], [ 21.226107, 79.037493 ] ] ], [ [ [ 20.833055, 79.054155 ], [ 20.04611, 79.037493 ], [ 20.19972, 79.124697 ], [ 20.833055, 79.054155 ] ] ], [ [ [ 20.007502, 79.242205 ], [ 19.954718, 79.226656 ], [ 20.168886, 79.319155 ], [ 20.007502, 79.242205 ] ] ], [ [ [ 20.109442, 79.365816 ], [ 20.180277, 79.338884 ], [ 19.628332, 79.388323 ], [ 20.109442, 79.365816 ] ] ], [ [ [ 10.922777, 79.651094 ], [ 10.712221, 79.71361 ], [ 11.076109, 79.662767 ], [ 10.922777, 79.651094 ] ] ], [ [ [ 11.000555, 79.740267 ], [ 10.639166, 79.750002 ], [ 10.756109, 79.783327 ], [ 11.000555, 79.740267 ] ] ], [ [ [ 16.819166, 79.87221 ], [ 18.098333, 79.720263 ], [ 17.635553, 79.372484 ], [ 18.356943, 79.628313 ], [ 18.920553, 79.164156 ], [ 21.549166, 78.767763 ], [ 18.965551, 78.456102 ], [ 19.092222, 78.095537 ], [ 18.41083, 78.021654 ], [ 18.292776, 77.50638 ], [ 17.738329, 77.471102 ], [ 16.919165, 76.799715 ], [ 17.198332, 76.694704 ], [ 16.612776, 76.570543 ], [ 15.498053, 76.879976 ], [ 16.51972, 76.998598 ], [ 14.467222, 77.171648 ], [ 13.914167, 77.527773 ], [ 16.223051, 77.434984 ], [ 14.739164, 77.658602 ], [ 17.006109, 77.931368 ], [ 13.941942, 77.716661 ], [ 13.588888, 78.049425 ], [ 17.301664, 78.420259 ], [ 16.328886, 78.452211 ], [ 16.83111, 78.671923 ], [ 15.464167, 78.451662 ], [ 15.193331, 78.588045 ], [ 15.379999, 78.844713 ], [ 14.385557, 78.497759 ], [ 14.726389, 78.383883 ], [ 13.006666, 78.197481 ], [ 12.360556, 78.480272 ], [ 13.19861, 78.540819 ], [ 11.333334, 78.960543 ], [ 12.505556, 78.908037 ], [ 11.755278, 79.075823 ], [ 12.113054, 79.295824 ], [ 11.236387, 79.09305 ], [ 10.676943, 79.544985 ], [ 13.82472, 79.875261 ], [ 12.447779, 79.566378 ], [ 13.484442, 79.580828 ], [ 13.257223, 79.471376 ], [ 14.058889, 79.260271 ], [ 13.886946, 79.541368 ], [ 14.584997, 79.804155 ], [ 16.449999, 78.903872 ], [ 15.638056, 79.827211 ], [ 16.307775, 80.062761 ], [ 16.819166, 79.87221 ] ] ], [ [ [ 27.837778, 80.110262 ], [ 27.674166, 80.122759 ], [ 28.074442, 80.144152 ], [ 27.837778, 80.110262 ] ] ], [ [ [ 36.849161, 80.139986 ], [ 36.590548, 80.154985 ], [ 36.760279, 80.160814 ], [ 36.849161, 80.139986 ] ] ], [ [ [ 32.366388, 80.094439 ], [ 31.449442, 80.085817 ], [ 33.637499, 80.21332 ], [ 32.366388, 80.094439 ] ] ], [ [ [ 18.553331, 80.245531 ], [ 18.119444, 80.284716 ], [ 18.758612, 80.301928 ], [ 18.553331, 80.245531 ] ] ], [ [ [ 24.335833, 80.384157 ], [ 24.128611, 80.393053 ], [ 24.196943, 80.454165 ], [ 24.335833, 80.384157 ] ] ], [ [ [ 19.933332, 80.47748 ], [ 21.860556, 80.267763 ], [ 21.598608, 80.118319 ], [ 22.226385, 79.979158 ], [ 22.578611, 80.298601 ], [ 22.361109, 80.410265 ], [ 22.886942, 80.490267 ], [ 23.36083, 80.42943 ], [ 23.101389, 80.120821 ], [ 24.836386, 80.350817 ], [ 27.244997, 79.904985 ], [ 23.511667, 79.178865 ], [ 19.635553, 79.603868 ], [ 22.312498, 79.796938 ], [ 18.771387, 79.717485 ], [ 18.154165, 79.90999 ], [ 18.809443, 79.994707 ], [ 17.783056, 80.127764 ], [ 19.340555, 80.086382 ], [ 19.584166, 80.151384 ], [ 18.979998, 80.336657 ], [ 19.837778, 80.213884 ], [ 19.463331, 80.454714 ], [ 19.933332, 80.47748 ] ] ], [ [ [ 24.265001, 80.471102 ], [ 23.97444, 80.490541 ], [ 24.174997, 80.509157 ], [ 24.265001, 80.471102 ] ] ], [ [ [ 19.933332, 80.47748 ], [ 19.844721, 80.503054 ], [ 20.130278, 80.512774 ], [ 19.933332, 80.47748 ] ] ], [ [ [ 20.753611, 80.62137 ], [ 20.499163, 80.657763 ], [ 20.793333, 80.647493 ], [ 20.753611, 80.62137 ] ] ], [ [ [ 21.330278, 80.700274 ], [ 21.365, 80.678865 ], [ 21.026388, 80.681658 ], [ 21.330278, 80.700274 ] ] ], [ [ [ 20.819166, 80.719149 ], [ 20.518332, 80.759996 ], [ 21.006666, 80.701387 ], [ 20.819166, 80.719149 ] ] ] ] } },
{ "type": "Feature", "properties": { "fips": "SX", "iso2": "GS", "iso3": "SGS", "un": 239, "name": "South Georgia South Sandwich Islands", "area": 0, "pop2005": 0, "region": 0, "subregion": 0, "lon": -36.891000, "lat": -54.209000, "cartodb_id": 245, "created_at": "2014\/08\/28 00:00:00.000", "updated_at": "2014\/08\/28 00:00:00.000", "other_name": "South Georgia and the South Sandwich Islands" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -27.325836, -59.427223 ], [ -27.298058, -59.473061 ], [ -27.412502, -59.434448 ], [ -27.325836, -59.427223 ] ] ], [ [ [ -26.582779, -59.070007 ], [ -26.665001, -59.025841 ], [ -26.501114, -59.036949 ], [ -26.582779, -59.070007 ] ] ], [ [ [ -26.246391, -58.407501 ], [ -26.24889, -58.498611 ], [ -26.459167, -58.427223 ], [ -26.246391, -58.407501 ] ] ], [ [ [ -26.412781, -57.80806 ], [ -26.512222, -57.771118 ], [ -26.443336, -57.743896 ], [ -26.412781, -57.80806 ] ] ], [ [ [ -26.660835, -57.086395 ], [ -26.728889, -57.062782 ], [ -26.675835, -57.056396 ], [ -26.660835, -57.086395 ] ] ], [ [ [ -27.108612, -56.717506 ], [ -27.209724, -56.693611 ], [ -27.129448, -56.682228 ], [ -27.108612, -56.717506 ] ] ], [ [ [ -27.563892, -56.320557 ], [ -27.600002, -56.281113 ], [ -27.549446, -56.27417 ], [ -27.563892, -56.320557 ] ] ], [ [ [ -37.038612, -54.511673 ], [ -37.083618, -54.512779 ], [ -37.105835, -54.471115 ], [ -37.038612, -54.511673 ] ] ], [ [ [ -37.495003, -54.010559 ], [ -36.288063, -54.266396 ], [ -35.782501, -54.765556 ], [ -36.115837, -54.887222 ], [ -37.411392, -54.268333 ], [ -37.239449, -54.147781 ], [ -38.033058, -54.048889 ], [ -37.495003, -54.010559 ] ] ] ] } }
]
}
}
\ No newline at end of file
function create_shelter (name_of_shelter, country_value_id, country_name) {
function create_shelter (name_of_shelter, country_value_id, country_name, callback) {
new_shelter_dict = {} // the id of the shelter's owner is controlled by a POST preprocessor function
$.ajax({
type: 'POST',
......@@ -99,12 +99,16 @@ function create_shelter (name_of_shelter, country_value_id, country_name) {
dataType: "json",
data: JSON.stringify(new_property),
success: function (result) {
console.log(result);
window.location = '/shelter/' + new_shelter.id + '/general-Information';
if(callback != null) {
callback(true, new_shelter.id);
}
//window.location = '/shelter/' + new_shelter.id + '/general-Information';
},
error: function(XMLHttpRequest, textStatus, errorThrown){
console.log(errorThrown);
// invoke the callback function here
if(callback != null) {
callback(false, errorThrown);
}
}
});
},
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment