How to check if position if valid in StreetView in Android

后端 未结 5 1521
执笔经年
执笔经年 2020-12-16 15:22

I have an app that is randomly generating positions in a GoogleMaps based on a defined boundary. So I first generate a random LatLng and then I verify if this point is insid

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-16 15:33

    For my StreetView app I built a scraping app as a companion, this scraping app goes through all the lat/lng locations at a given radius and queries StreetView for a panorama.

    The output of this app is a small text file of lat/lng locations at a resolution suitable for my needs (5 degrees). I then use this data file in my main app as a source for StreetView locations.

    Using the setPostion(LatLng, radius) method I'm guaranteed to get a result every time. The size of this file is also quite small < 500kb.

    I doubt Google will ever release a dataset of where StreetView has been (I run my scraping app just before each update to my main app to make sure I have up to date values). I'm not sure if they'd provide a method that has the following signature either boolean hasStreetView(LatLng, radius).

提交回复
热议问题