Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulanik boundingbox verisi #4

Open
edigu opened this issue Aug 25, 2018 · 1 comment
Open

Bulanik boundingbox verisi #4

edigu opened this issue Aug 25, 2018 · 1 comment

Comments

@edigu
Copy link

edigu commented Aug 25, 2018

Merhaba, servisinizi bugun kisisel hobi projemde kullanmak istedim ancak geolocation.boundinbox verisi bulanik oldugu icin koordinatlardan emin olamadim. Su an asagidaki gibi bir veri donuyor:

"geolocation": {
    "lat": "41.0734206",
    "lon": "28.9015561330191",
    "boundingbox": [
        "41.0518916",
        "41.0946066",
        "28.874044",
        "28.9390572"
      ]
}

bu verinin asagidaki gibi daha explicit anahtarlarla donmesi diger gelistiricilerin tahmin veya varsayimla ilerleme problemini ortadan kaldiracaktir:

"geolocation": {
    "lat": "41.0734206",
    "lon": "28.9015561330191",
    "boundingbox": [
        "south": "41.0518916",
        "north": "41.0946066",
        "east": "28.874044",
        "west": "28.9390572"
      ]
}

Tesekkurler.

@ardabeyazoglu
Copy link

Benim denemelerime göre;

Kuzey-Doğu Lat/Lon => boundingbox[0], boundingbox[2]
Güney-Batı Lat/Lon => boundingbox[0], boundingbox[2]

Örneğin bir şehrin dikdörtgen çevresi, google mapste şu şekilde alınabilir buradaki bilgilerle:

var bb = city.boundingbox;
var cityBounds = new google.maps.LatLngBounds(new google.maps.LatLng(bb[0], bb[2]), new google.maps.LatLng(bb[1], bb[3]));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants