compass-geolocation

Google Map API get address information by postal code, but it response result by street number

大憨熊 提交于 2021-02-17 07:15:08
问题 I am using google map api to get address information by Postal code around the world [ not specific country]. https://maps.googleapis.com/maps/api/geocode/json?address=610&key=[apiKey] I expected zip code is 610, but google response result for street number 610. Is there any ways to get address by zip code only? Thank you guys in advance for supporting. 回答1: How about something along with this query https://maps.googleapis.com/maps/api/geocode/json?components=postal_code:1441|country:PH&key

Google Map API get address information by postal code, but it response result by street number

☆樱花仙子☆ 提交于 2021-02-17 07:15:05
问题 I am using google map api to get address information by Postal code around the world [ not specific country]. https://maps.googleapis.com/maps/api/geocode/json?address=610&key=[apiKey] I expected zip code is 610, but google response result for street number 610. Is there any ways to get address by zip code only? Thank you guys in advance for supporting. 回答1: How about something along with this query https://maps.googleapis.com/maps/api/geocode/json?components=postal_code:1441|country:PH&key

How to show direction on map based on calculated angle in degrees

ぃ、小莉子 提交于 2020-01-13 06:08:50
问题 I have calculated angle between two Latitude and Longitude coordinates as below code.It returns angle as 3 in radians, and 193 in degrees. I want to show arrow marker on map based on this angle.How to display object direction moved,based on this angle? public static double getAngle(double lat1, double lon1, double lat2, double lon2) { //Formulas //θ = atan2( sin(Δlong).cos(lat2),cos(lat1).sin(lat2) − sin(lat1).cos(lat2).cos(Δlong) ) // Δlong = long2 - long1 Log.i("angle", "Inside getAngle");

How to show direction on map based on calculated angle in degrees

女生的网名这么多〃 提交于 2020-01-13 06:08:13
问题 I have calculated angle between two Latitude and Longitude coordinates as below code.It returns angle as 3 in radians, and 193 in degrees. I want to show arrow marker on map based on this angle.How to display object direction moved,based on this angle? public static double getAngle(double lat1, double lon1, double lat2, double lon2) { //Formulas //θ = atan2( sin(Δlong).cos(lat2),cos(lat1).sin(lat2) − sin(lat1).cos(lat2).cos(Δlong) ) // Δlong = long2 - long1 Log.i("angle", "Inside getAngle");

How to retrieve high quality compass orientation (as in Google Maps)?

妖精的绣舞 提交于 2020-01-12 18:57:23
问题 All of the guides to getting compass orientation in Android I've found have a bug: when you hold the phone in portrait mode and "look" above the horizon, the compass arrow turns 180 degrees from the correct direction. Google Maps orientation indicator doesn't have this problem. Another nice thing that Google Maps have is that they somehow estimate compass accuracy. Any idea how they do this? 回答1: Error you ask is caused because of Euler angles or called Gimbal Lock. To solve very high angle

Filtering compass readings

随声附和 提交于 2020-01-01 05:40:12
问题 I'm using compass heading to rotate an MKMapView. The rotation was a bit jerky so I'm trying to filter it like Google Maps on the iphone does (or appears to do some trickery). I'm trying to filter the reading from the iphone compass using a moving average formula but it fails on the crossover between 359 adn 0 becuase it starts to average backwards from 35x to 0 and causes the map to rotate backwards as it approaches north from the west. Any ideas what the best way is to filter this data so

Can I emulate a compass on Android

杀马特。学长 韩版系。学妹 提交于 2019-12-30 05:05:47
问题 I want to test a compass app on the emulator. Is this possible or do I have to use a real device. Also I do not want to use gps. 回答1: It's possible to install sensorsimulator from openintents but you can only use this as an app on the emulator and send commands from the pc. The weird thing is once you quit the app on the emulator then it stops receiving sensor simulation data. So it's useless for testing your own app! Is it possible to simulate sensor commands on the emulator to actually send

how to add compass to mapview

强颜欢笑 提交于 2019-12-24 15:34:54
问题 How do I get the compass to be shown on the screen when my mapview is created. What is wrong with this code? any suggestions? protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map); mapView = (MapView) findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true); mc = mapView.getController(); myLoc = new MyLocationOverlay(this, mapView); myLoc.enableCompass(); mapView.getOverlays().add(myLoc); mapView.postInvalidate();