How to get current location in Xamarin.Forms.Maps? - xamarin

I need to get the current location map and need to pin the current coordinates. Users will pin the coordinates. When the users pin the coordinates, the data is stored in the database.
I am using VS 2015 /.Net 4.5 Framework - I have to get this application on cross platform - Android / iOS / Windows. Samples which I can refer online such as MKMapView aren't supported on .Net 4.5 Framework.
How to get the current location map and how to pin the current coordinates.

Refer
How to get current location or move to current location in Xamarin.Forms.Map
OR
http://www.informit.com/articles/article.aspx?p=2422805

Related

Geolocator.RequestAccessAsync() taking too much time for returning its value in UWP with xamarin.forms

Initially Allow Apps to access location and my app's access precise location is off in my windows machine. I opened my app and GPS is unavailable. I enabled both Allow Apps to access location and my app's access precise location. after that, I tap the location icon and it will trigger Geolocator.RequestAccessAsync() to check GPS-enabled via dependency service. Geolocator.RequestAccessAsync() taking too much time for returning its value in UWP with Xamarin.Forms. Need to reduce the time or better alternatives with lesser timing in UWP for Xamarin.Forms.
var accessStatus = await Geolocator.RequestAccessAsync();

Genymotion GPS is not getting my current position

As the title says, my genymotion is getting the static position declared in the gps options. Theres another option that I could get my current position? Im using cordova application testing with genymotion.
Genymotion does not plug the GPS position to your computer's position.
If you want to customize your position you can do it on several ways:
Use the GPS Widget (free feature) located on the right bar of the device. You can either set manually GPS data or use the Map view to do it easily
Use the Genyshell (free feature) to script the positions injection.
Use the Java API (paid feature). By including the JAR of this feature you can control the GPS and other device sensors. This feature is very useful to improve code coverage, for unit testing for example.
I was using cordova geolocation plugin.
navigator.geolocation.getCurrentPosition(onSuccess,onError,options);
And I was also facing the same problem, It wasn't working in genymotion. Setting enableHighAccuracy to true worked for me like below.
var options = {
enableHighAccuracy: true,
maximumAge: 0
};
For programming, you could give fake position by using any app. For instance you might use Fake GPS location to give static GPS position.

Current location in codenameone is null

I use the following code to take current location of mobile in codename
Location location = LocationManager.getLocationManager()
.getCurrentLocationSync(60000);
And i test it on Android mobile it always show location is null
Also in simulator it gives
latitude 40.715353
longitude -74.00497299999999
How to solve this problem and get current gps position of mobile?
The simulator has the ability to simulate locations in the latest version you can point at the location you want to simulate.
Null will be returned if a location isn't available, you can query the status of the GPS based on that. Make sure your GPS is turned on.

How to get current location of the user on Google maps in Windows Phone

When the user opens my Windows Phone app, he should be shown his current position - either using Google maps or Bing maps.
I tried to integrate Bing maps in my app, but the question is:
How do I locate the exact or nearby location of the user?
The map is just a control, on which you can show your position if you got it from the GeoCoordinateWatcher. You can look for good examples (e.g. http://blogs.msdn.com/b/dragoman/archive/2010/09/21/wp7-code-using-the-geolocation-api.aspx ) on the web but if you need I can help to implement it too.

Is it possible to create an Geotracking app in WP7 using Bing Maps?

Is it possible to create an app like Runtastic, RunKeeper or SportsTracker (all of them Android apps) in WP7 using Bing Maps? Or maybe there is an app with that functionality already out?
These apps basically trace the route you run/cycle/jogg/etc in Google maps, displaying your current speed, altitude, cal lost, direction, etc. Then they have an option for storing the tracks and displaying their related information later. They can display charts as well.
Also, what sensors does WP7 devices have?
The image below is runtastic, tracing the path as you go
Thanks
Yes it's possible. But you should get past the idea stage and into the development before posting questions here.
As for what sensors are available, you can find more information about the minimum hardware specifications here
A WP7 device must, at a minimum have the following:
Accelerometer with Compass
Assisted GPS
Ambient light Sensor
Proximity Sensor
Camera with LED flash
FM radio tuner
It is possible since you can translate existing GPS coordinates to the Bing Maps control. Must of the features Chris mentioned are not required for a geotracking application (those are general device requirements). All that's needed is basically the GPS sensor.
Note one important element - you will not be able to run the application as a background process. Although you can keep it under the lock screen, you will not be able to switch to other processes (only to a very limited extent and under specific conditions).

Resources