Map bounds

Want to post something that doesn't quite fit into the other forums? This is the place for that.
Post Reply
kiwikieran
Posts: 69
Joined: Sat Jan 20, 2018 8:50 pm

Map bounds

Post by kiwikieran » Sun May 20, 2018 10:20 pm

Hello,
Is it possible to query the JSON with the map bounds, I have attempted the NESW as per the documentation but it will return no aircraft in the JSON.

agw
Posts: 2241
Joined: Fri Feb 17, 2012 3:20 am

Re: Map bounds

Post by agw » Sat Jun 09, 2018 1:14 pm

The documentation is, as far as I'm aware, correct. What was the query string that you tried?

kiwikieran
Posts: 69
Joined: Sat Jan 20, 2018 8:50 pm

Re: Map bounds

Post by kiwikieran » Tue Jun 12, 2018 6:22 am

Thanks agw,
On the documentation fEBnd is susposed to be a Lat not a long how I can not find a way to get East lng from google map bounds but can get Lat.
Have now got it working.

var mylat = Map.getCenter().lat();
var mylng = Map.getCenter().lng();
aNorth = Map.getBounds().getNorthEast().lat();
aEast = Map.getBounds().getNorthEast().lng();
aSouth = Map.getBounds().getSouthWest().lat();
aWest = Map.getBounds().getSouthWest().lng();
if (NumPlanes > 200) {
if (alerted === true){

} else if (alerted === false) {
alert("There are to any planes, this will cause lag please zoom in more");
alerted = true;
}

}
$.getJSON('http://radar1.ddns.net:8090/VirtualRada ... a'+filters, function(data) {

Post Reply