lds maps api - LDSorg/lds.org GitHub Wiki
Ideally you'd be able to put in your address and get back which YSA ward you belong to and which other wards / meetinghouses are nearby.
Instead you get back a kinda random smattering of Tongan and Chinese wards (at least if you're in Provo or San Francisco). Unless you know the name of your ward, it's kinda difficult to find. The meeting times seem to be incorrect more often than not (based on times I've tried to find a ward to visit when I'm not going to my own) and the phone numbers provided may or may not be valid.
If you're looking for a family ward I think the data is much more accurate, but for the YSA wards it's really bad.
Nevertheless, it's all we have.
-
search: http://www.lds.org/maps/services/search?query=provo%20192&lang=eng
-
ward details: http://www.lds.org/maps/services/layers/details?id=199141&layer=ward.ysa&lang=eng
-
assigned: http://www.lds.org/maps/services/layers/assigned?lang=eng&id=199141&layer=ward.ysa
-
meetinghouse details: http://www.lds.org/maps/services/layers/details?id=5185939-01-01&layer=meetinghouse&lang=eng
http://www.lds.org/maps/services/search?query=provo%20192&lang=eng
[
{
"id": "268097",
"type": "ward.ysa",
"name": "Provo YSA 192nd Ward",
"address": {
"street": "Byu Campus",
"city": "PROVO",
"county": "UTAH",
"state": "UTAH",
"zip": "84602",
"country": "UNITED STATES"
},
"phone": null,
"coordinates": [
-111.6545302,
40.2473687
]
},
{
"id": null,
"type": "location",
"name": null,
"address": {
"street": null,
"city": "Provo",
"county": "Utah County",
"state": "Utah",
"zip": null,
"country": "United States"
},
"phone": null,
"coordinates": [
-111.6437029,
40.2281635
]
}
]
http://www.lds.org/maps/services/layers/details?id=199141&layer=ward.ysa&lang=eng
{
"id": "199141",
"type": "ward.ysa",
"name": "Provo YSA 190th Ward",
"address": {
"street": "Byu Campus",
"city": "PROVO",
"county": "UTAH",
"state": "UTAH",
"zip": "84602",
"country": "UNITED STATES"
},
"phone": null,
"coordinates": [
-111.6535435,
40.2489353
],
"structure": {
"id": "9000151-01-01",
"type": "meetinghouse",
"name": null
},
"hours": "8:30 AM",
"url": null,
"notes": null,
"assigned": [
{
"id": "519251",
"type": "stake.ysa",
"name": "Provo Utah YSA 13th Stake"
},
{
"id": "790818",
"type": "temple",
"name": "Provo Utah Temple"
}
],
"bounds": null,
"events": null,
"permissions": {
"limited": "none"
},
"contacts": [
{
"id": null,
"type": "individual",
"name": "Winget",
"phone": "1 801-794-1245",
"email": null,
"title": "Bishop"
}
],
"worshipTime": "10:30 AM"
}
http://www.lds.org/maps/services/layers/assigned?lang=eng&id=199141&layer=ward.ysa
[
{
"id": "519251",
"type": "stake.ysa",
"name": "Provo Utah YSA 13th Stake",
"address": {
"street": "Byu Campus",
"city": "PROVO",
"county": "UTAH",
"state": "UTAH",
"zip": "84602",
"country": "UNITED STATES"
},
"phone": null,
"coordinates": [
-111.6535435,
40.2489353
]
},
{
"id": "790818",
"type": "temple",
"name": "Provo Utah Temple",
"address": {
"street": "2200 Temple Hill Drive",
"city": "PROVO",
"county": "UTAH",
"state": "UTAH",
"zip": "84604-1775",
"country": "UNITED STATES"
},
"phone": "+1 801-375-5775",
"coordinates": [
-111.639781,
40.263675
]
}
]
[
{
"id": "492876",
"type": "seminary",
"name": "Adapted Riverton UT Kauri Sue Hamilton Seminary--Released Time",
"address": {
"street": "2700 West 13400 South",
"city": "RIVERTON",
"county": "SALT LAKE",
"state": "UTAH",
"zip": "84065-5804",
"country": "UNITED STATES"
},
"phone": "+1 801-253-7724",
"coordinates": [
-111.573613,
40.30229
]
},
{
"id": "790729",
"type": "temple.renovated",
"name": "Ogden Utah Temple",
"address": {
"street": "350 22nd Street",
"city": "OGDEN",
"county": "WEBER",
"state": "UTAH",
"zip": "84401-1415",
"country": "UNITED STATES"
},
"phone": "1 801-621-6880",
"coordinates": [
-111.971424,
41.227526
]
}
]
[
{
"coordinates": [
-111.6915633,
40.3402502
],
"layers": {
"meetinghouse": {
"id": "5403308-01-01",
"count": 1
}
},
"dispersed": false
},
{
"coordinates": [
-111.693179,
40.324878
],
"layers": {
"meetinghouse": {
"id": "5512115-02-01",
"count": 1
}
},
"dispersed": false
}
]
http://www.lds.org/maps/services/layers/details?id=5185939-01-01&layer=meetinghouse&lang=eng
{
"id": "5185939-01-01",
"type": "meetinghouse",
"name": null,
"address": {
"street": "762 East 1200 North",
"city": "OREM",
"county": "UTAH",
"state": "UTAH",
"zip": "84057",
"country": "UNITED STATES"
},
"phone": null,
"coordinates": [
-111.6777976,
40.3190789
],
"url": null,
"assigned": null,
"permissions": {
"view": "none"
},
"wards": [
{
"id": "258849",
"type": "ward",
"name": "Canyon View 10th Ward",
"worshipTime": "9:00 AM"
},
{
"id": "159409",
"type": "ward",
"name": "Canyon View 4th Ward",
"worshipTime": "11:00 AM"
},
{
"id": "555711",
"type": "ward",
"name": "Canyon View 3rd Ward",
"worshipTime": "1:00 PM"
}
]
}
var ldsOrg = 'http://www.lds.org'
, things = []
, lastWard = 263
, lastStudentWard = 5 // married wards
, terms = ['ysa%20stake', 'ysa%20branch', 'student%20stake', 'student%20branch']
, term
, i
;
function findYsa(search, cb) {
$.ajax({
type: 'GET'
, url: ldsOrg + "/maps/services/search?query=" + search + "&lang=eng"
}).success(function (data) {
things = things.concat(data);
cb();
});
}
for (i = 0; i < lastWard; i += 1) {
terms.push("YSA%20" + (i + 1));
}
for (i = 0; i < lastStudentWard; i += 1) {
terms.push("Student%20" + (i + 1));
}
function done() {
console.log('Done');
var ysaMap = {}
;
things.forEach(function (unit) {
if ('ward.ysa' === unit.type || 'stake.ysa' === unit.type || 'ward.student' === unit.type || 'stake.student' === unit.type) {
ysaMap[unit.id] = unit;
}
});
//document.body.innerHTML = '<pre>' + JSON.stringify(things, null, ' ').replace(/</g, '<') + '</pre>';
document.body.innerHTML = '<pre>' + JSON.stringify(ysaMap, null, ' ').replace(/</g, '<') + '</pre>';
}
function getOne() {
term = terms.pop();
if (term) {
console.log(term);
findYsa(term, getOne);
} else {
done();
}
}
getOne();