StreetView gyroscope functionality - android

In the official Google Maps application when a user rotates the device, StreetView is rotated. I made a research and didn't find how to enable gyroscope functionality in Google Maps v2 API for StreetView. I can implement this by myself, but maybe there IS such functionality and I just haven't find it?

There isn't any built-in features in StreetView to enable this functionality. If you would like to do it by yourself you can check following links:
Set the camera orientation point of view
Animate the camera movements

It looks like Google recently updated their API to include accelerometer-based tracking in the street view point of view. Try this example on your phone.
From the documentation on Motion tracking on mobile devices:
On devices that support device orientation events, the API offers users the ability to change the Street View point of view based on the movement of the device. Users can look around by moving their devices. This is called motion tracking or device rotation tracking.
More information (like how to disable it) is in that link.

Related

Android markers without using Google maps

I am very new to android, and I basically have almost no experience. Recently my client got an idea where he wants to have a custom map (in .png/.jpg/.jpeg format) on which, using GPS only, will be displayed his location using a marker, and location where he is supposed to get. Those two markers have to be connected with a "path", that will be like some sort of navigation from one marker to another. One of the requests is that it must be done without any usage of Google maps. My question here is - is that even possible to be done like this?
The only idea that I got is to get coordinate from GPS, make a proportion pixels on the image to coordinates and put a marker on where the user is supposed to be. Is there a better option than this?
I think you can try out this method in the below link.
Which can turn your images into interactive map layers that can be displayed in websites, used in mobile phones, tablets, GPS devices, map mashups or opened in the desktop GIS software, Google Maps or Google Earth.
http://www.maptiler.com/

Integrating HERE sdk into android app

I started developing an app using HERE api. Basically I have to navigate from one point to another using HERE sdk offline as well as online. Also I have to be able to rotate the map according to orientation of the mobile as we navigate, while showing the remaining distance to be covered in real-time. Next, I have to integrate a compass with the HERE map so compass tells the direction in which user is moving.
Here are full working Android projects for all of your tasks using the HERE MobileSDK for Android:
Basic Map application: https://tcs.ext.here.com/sdk_examples/BasicMapSolutionGradle.zip
Positioning, Routing and turn by turn voice guidance:
https://tcs.ext.here.com/sdk_examples/TtsAndNavigation.zip
Compass and custom position marker rotating to compass north:
https://tcs.ext.here.com/sdk_examples/CustomPositionMarker.zip
What you want to achieve is possible with the Premium SDK variant of the HERE Mobile SDK as offline support is not available in the Starter SDK.
However, integrating a compass is possible using the Starter edition: You can use the CustomPositionMarker example (https://tcs.ext.here.com/sdk_examples/CustomPositionMarker.zip) with a few modifications since it was build for Premium SDK:
Remove LocalMesh, MapLocalModel, MapOverlayType since these are suitable only for 3D Vector Maps which are not available in starter edition.
Rotate the map according to current yaw like shown here. Place this code inside the onSensorChanged()-callback of Android's SensorEventListener (as shown by the example). This will rotate the map according to the sensor's azimuth.
To render a compass needle or just a map center circle use for example HERE's
MapCircle (double radius, GeoCoordinate center). Note that the constructor takes different arguments in the starter edition of the SDK.

Google Maps VR in Android Application

I have an Android application with a map at the moment.
The native Google Maps application has a button that appears in street view, and when double tapped, it converts street view to VR mode. More specifically, it splits the street view in two for a separate image for each eye, to be used with Google cardboard. It then also tracks device movements and adjusts the FOV accordingly.
I'm building my own app, and would like to use this VR feature of maps in my own application.
One thought I have is to load two street view images immediately adjacent to each other, and then update the FOV by reading the device sensors.
I can see this being slow as my implementation is not likely to be as snappy as Googles.
Is there a way to use Google's own VR mode in a native app?
If not, what would you suggest doing to achieve the same effect?

Map rotation on smartphone

We are developing an indoor application on iOS and Android using MapKit and Cloudmade for the mapping.
The mapping we have should be able to work both online and offline. My mapping expect is having troubles on how to make the map rotate to face the same way the user is facing.
So we are able to do real-time tracking and display it on a pre-plotted route on the map, but we need to have the direction the person is walking as displayed on the map to face the same direction the user is facing.
How can we do this ?
The technique and Android SDK sample for Google maps described below also works for osmdroid.
Rotate MapView in Android

How to implement 3D / tilt mode in mapview?

If you check the Google Maps application for Android, there are 3 modes available to display the listview. One of the modes available in Google Maps is the tilt mode wherein the map is displayed in 3D. The map also rotates when the user changes his direction.
How can I achieve this functionality?
If you're referring to an Android MapView allowing you to do that, you currently do not have those capabilities available via the SDK.
You should use accelerometer/gyroscope to achieve that.
please check out Sensor Manager and its examples!

Categories

Resources