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.
Related
I tried to achieve using google's cloud Anchors, but it has a limitation of 24hrs (after that the cloud anchors become invalid).
And another way is creating the replica of Unity, but that would be too lengthy process.
Any other ways please suggest me or any idea: https://www.insidernavigation.com/#solution - how they achieved it?
And how to save the common coordinate system in cloud or locally?
Current versions of ARCore and ARKit have limited persistence capabilities. So a workaround - which I think is what they use in that site you linked, is to use images/QR codes which they use to localise the device with a real world position and then use the device's SLAM capabilities to determine the device's movement and pose.
So for example, you can have a QR code or image that represents position 1,1 facing north in the real world. Conveniently, you can use ARCore/ARKit's to detect that image. When that specific image is tracked by the device, you can then confidently determine that the device is position 1, 1 (or close to it). You then use that information to plot a dot on a map at 1,1.
As you move, you can track the deltas in the AR camera's pose (position and rotation) to determine if you moved forward, turned etc. You can then use these deltas to update the position of that dot on your map.
There is intrinsic drift in this, as SLAM isn't perfect. But the AR frameworks should have some way to compensate against this using feature detection, or the user can re-localize by looking for another QR/image target.
As far as my knowledge is concern, This Virtual Positioning system has not been introduced yet in Google arcore. The link you provided, these guys are using iBeacon for positioning.
yup I believe it could be possible. Currently most developed ways have its limitation .I am working on to find another way with the fusion of Cloud Anchors with IBeacon.
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?
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.
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
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!