Web
Analytics
Google maps API 'Permanently closed' | Computers, Websites and Technology | 28DaysLater.co.uk

Google maps API 'Permanently closed'


wicksy101

28DL Full Member
28DL Full Member
Hi Guys,

I have done some Coding in the past and work with API's at work but i'm struggling with something that could benefit urbex.

Google maps tags some locations as 'permanently closed.' I'm trying to work out how to do an API call to return all 'permanently closed' places on a map.

Going through the api documentation i can see that the attribute is simply 'permanently_closed'

Has anybody tried anything similar? Running out of ideas here!
TIA
 

The Explorer Returns

28DL Full Member
28DL Full Member
Normally I only use that is to confirm if the place has closed, if I know it’s location ect, using google maps is a good way to speak out on if it’s closed or not, however, if you just type in “school or hospital” into it (red writing) it will show a list of schools or hospitals in the list, including permanently closed one!
 

wicksy101

28DL Full Member
28DL Full Member
Hi mate, where are you typing it? Just in the normal watch bar?

mom hoping to bring back a list of all places, even if it’s not in the area I’m searching.

I currently use it the same way as you but I feel having them all there would be a better way as you can see if the buildings are still there.
 

The Explorer Returns

28DL Full Member
28DL Full Member
Yes, literally just type hospital into the search bar, don’t click any hospital names, just click the word hospital highlighted in red, then it will zoom out and pin all hospitals in that area including derelict ones. That’s a little trick for all you guys out there too, it works, trust me ;)
 

wicksy101

28DL Full Member
28DL Full Member
I have had that before when searching in the rough area for something when I knew what I was looking for as I recall. Would be nice to see everywhere though lol.
 

Shaun

28DL Regular User
Regular User
Good idea, but you probably won't find anything more than a few pubs or factories doing that, the older obscure stuff is not on the Web
 

AndyK

Behind Closed Doors
Staff member
Moderator
I wrote a PHP script to do this exact thing. It's tricky, because the permanently closed flag cannot be returned as a parameter in a list of locations, it can only be queried for a specific location (one at a time). This means you first have to load a list of all the locations within a certain area (you can specify a co-ordinates range to search within, for example) then loop through the results to individually query every one of those locations, returning the permanently closed flag. It's not a great way to do something like that, but in theory it works. In practice, you soon hit the API's limits on the number of requests you can send - you can't send more than 500 requests in a 100 second period. This means if your location search returns more than 500 results (which it will for town/city centres etc) it will stop at that limit. It works well for small areas, but it's not feasible to use it for large densely populates areas.
 

wicksy101

28DL Full Member
28DL Full Member
I wrote a PHP script to do this exact thing. It's tricky, because the permanently closed flag cannot be returned as a parameter in a list of locations, it can only be queried for a specific location (one at a time). This means you first have to load a list of all the locations within a certain area (you can specify a co-ordinates range to search within, for example) then loop through the results to individually query every one of those locations, returning the permanently closed flag. It's not a great way to do something like that, but in theory it works. In practice, you soon hit the API's limits on the number of requests you can send - you can't send more than 500 requests in a 100 second period. This means if your location search returns more than 500 results (which it will for town/city centres etc) it will stop at that limit. It works well for small areas, but it's not feasible to use it for large densely populates areas.
PHP sounds a bit out of my league then unfortunately as much as i would have no issue spending hours doing tiny bits at a time! If you would be interested in sharing the code please let me know. Don't mind putting in some hard work to give back to the community :)
 

DrGonzo

28DL Full Member
28DL Full Member
I wrote a PHP script to do this exact thing. It's tricky, because the permanently closed flag cannot be returned as a parameter in a list of locations, it can only be queried for a specific location (one at a time). This means you first have to load a list of all the locations within a certain area (you can specify a co-ordinates range to search within, for example) then loop through the results to individually query every one of those locations, returning the permanently closed flag. It's not a great way to do something like that, but in theory it works. In practice, you soon hit the API's limits on the number of requests you can send - you can't send more than 500 requests in a 100 second period. This means if your location search returns more than 500 results (which it will for town/city centres etc) it will stop at that limit. It works well for small areas, but it's not feasible to use it for large densely populates areas.
I was thinking of doing the exact same thing - but my PHP is really bad. Any chance of sharing the script? Also can you not add a short delay between requests to avoid the limit and just let it run and come back to a nice long list?
 

Fext

28DL Full Member
28DL Full Member
Try playing around with Google dorks, if you're not familiar just Google

Code:
site:https://www.google.com/maps "Permanently Closed"
Add some keywords like town, city or postcode at the end for more specific locations.
 

Robvox

28DL Full Member
28DL Full Member
Don’t know wether these can be added via google search ..but the
Government buildings for sale on gov.co.uk is handy to use
 

maxpayne94

28DL Member
28DL Member
Well, hey guys.

I actually made the PHP script you're talking about here. I made it since one of the guys I know asked for it, but seems like he's not interested in it already lol. I've done some research, paid some devs to do it and now I have it online, but don't know if someone would use it.

So, I actually thought, why not share it here. It shows the "Permanently Closed" object on Google Maps. Basically you type an address and it requests all the objects within the 50km area and shows only those which have "Permanently Closed" status. The script would require an active Google Maps API key with enabled billing in the account (but it seems like it can work pretty fine with free limits and free trial they'll give after the billing is activated).

I played with this thing a while, it works, but the amount of locations isn't quite big. I did found a significant amount of "Permanently Closed" objects in the London area, lots in the US and few other countries, but most European / Russian cities don't show a lot.

If anyone here got some ideas, where we could put this thing or anything interesting (maybe we can push it further), please let me know, cause I don't want this thing to disappear in the oblivion.
 

wicksy101

28DL Full Member
28DL Full Member
Well, hey guys.

I actually made the PHP script you're talking about here. I made it since one of the guys I know asked for it, but seems like he's not interested in it already lol. I've done some research, paid some devs to do it and now I have it online, but don't know if someone would use it.

So, I actually thought, why not share it here. It shows the "Permanently Closed" object on Google Maps. Basically you type an address and it requests all the objects within the 50km area and shows only those which have "Permanently Closed" status. The script would require an active Google Maps API key with enabled billing in the account (but it seems like it can work pretty fine with free limits and free trial they'll give after the billing is activated).

I played with this thing a while, it works, but the amount of locations isn't quite big. I did found a significant amount of "Permanently Closed" objects in the London area, lots in the US and few other countries, but most European / Russian cities don't show a lot.

If anyone here got some ideas, where we could put this thing or anything interesting (maybe we can push it further), please let me know, cause I don't want this thing to disappear in the oblivion.
Hero! PM me if you want!
 

Lord Oort

Fear is the little death
Regular User
Well, hey guys.

I actually made the PHP script you're talking about here. I made it since one of the guys I know asked for it, but seems like he's not interested in it already lol. I've done some research, paid some devs to do it and now I have it online, but don't know if someone would use it.

So, I actually thought, why not share it here. It shows the "Permanently Closed" object on Google Maps. Basically you type an address and it requests all the objects within the 50km area and shows only those which have "Permanently Closed" status. The script would require an active Google Maps API key with enabled billing in the account (but it seems like it can work pretty fine with free limits and free trial they'll give after the billing is activated).

I played with this thing a while, it works, but the amount of locations isn't quite big. I did found a significant amount of "Permanently Closed" objects in the London area, lots in the US and few other countries, but most European / Russian cities don't show a lot.

If anyone here got some ideas, where we could put this thing or anything interesting (maybe we can push it further), please let me know, cause I don't want this thing to disappear in the oblivion.
Yes, yes yes. Maybe have a word with a mod or Admin and they can find a permanent place for it here. Excellent work mate!
 

Fluffy

28DL Full Member
28DL Full Member
100% YES! Amazing, fair play. I've been wondering about this off and on for ages; there MUST be a way to filter everything with that status through on the maps. Top work. Very interested to see how this develops.
 

Similar threads


Top