currentlocation

Get current location Android Kotlin

戏子无情 提交于 2020-05-30 08:41:08
问题 I try to get the current Location with GM API in my application (using Android Studio). But if i click the button which triggers the getLocation() funktion, i always end up in the catch{} block and i dont know why. My mobile device is connected for testing. Here is the getLocation() Funktion: fun getLocation() { var locationManager = getSystemService(LOCATION_SERVICE) as LocationManager? var locationListener = object : LocationListener{ override fun onLocationChanged(location: Location?) {

Mobile web driving directions from current location

自作多情 提交于 2020-01-13 08:55:30
问题 I'm building a mobile-version of a website, trying to have one-click link to launch Google Maps with driving directions to the business, from the user's current location. I have it working fine for the iPhone, but when testing on Android, it views 'Current%20Location' and tries to find a business called 'Current Location'. Here is my current code: <a href="http://maps.google.com/maps?saddr=Current%20Location&daddr=123 Street Rd,Cityville,MD,21098">Get Directions</a> I need a universal string

how to get precise current location in a building map [closed]

核能气质少年 提交于 2020-01-03 06:38:11
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . i have one building map and it have so many rooms on it. Now i want to drop the pin in that building map, where the user is being in that building and also i want to draw the direction if user want to navigate to

Google Maps API v2 Custom MapFragment + SimpleFragment

我的未来我决定 提交于 2019-12-24 08:22:13
问题 I need to create a simple application which contain 1. Custom MapFragment which can display current location (LocationListener?), two markers, etc. 2. Simple empty Fragments. The application must not use support v4 (sdk 11+) / FragmentActivity. Empty fragment. XML: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@android:color/black" >

How to change location of my location button in google maps using swift

一世执手 提交于 2019-12-20 17:38:04
问题 I am using google maps in my project i want to show my location button a bit up how should i do that using swift 回答1: You can change the position of the MapControls by set the padding for your map view . let mapView = GMSMapView() mapView.isMyLocationEnabled = true mapView.settings.myLocationButton = true mapView.padding = UIEdgeInsets(top: 0, left: 0, bottom: 50, right: 50) It will change the padding of the my location control. From bottom 50px and from right 50px Refer the below screenshot

How to get the user's current location by code in iphone app?

☆樱花仙子☆ 提交于 2019-12-19 04:52:48
问题 I want to get the user's current location from my iPhone app. I want to show the user's current location like country name, latitude, longitude information in my app. And also i want to show the location in Google map also. I have tried Google search also, but can't get the exact answer. I have get the info that was to use CLLocationManager in my app to track the location. How do i use this? I have download one sample app from Apple Documents. Here is the link: https://developer.apple.com

How to get current location latitude and longitude in IOS SDK 8.0

丶灬走出姿态 提交于 2019-12-18 15:54:36
问题 how to get current location latitude and longitude. I have try this. Using Xcode 6.01 and IOS SDK 8.0 -(CLLocationCoordinate2D) getLocation{ locationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; locationManager.desiredAccuracy = kCLLocationAccuracyBest; locationManager.distanceFilter = kCLDistanceFilterNone; [locationManager startUpdatingLocation]; CLLocation *location = [locationManager location]; CLLocationCoordinate2D coordinate = [location coordinate];

How get location by COARSE location

旧巷老猫 提交于 2019-12-12 05:27:58
问题 I'm trying to develo an app that get location by COARSE location. This app must run on Android 6 too than i've implemented permission request on run time, start the map but i can't get my current location... any tips? This is my main activity: package com.luca.fontanelle; import com.google.android.gms.appindexing.AppIndex; import com.google.android.gms.location.LocationListener; import android.Manifest; import android.content.Intent; import android.content.IntentSender; import android.content

current location update on Google Maps SDK for Xcode not working

痴心易碎 提交于 2019-12-12 03:46:18
问题 I have been trying to implement google maps in my application. The first step what I want to do is to simply get is: 1. Get the app to ask permission to use current location 2. Find the users current location and have a blue dot marker to mark it. 3. Update and centre the map around the users current location. I have tried various methods to get this working but always end up with an error or doesn't work. Initially when I simulated the code below, it did come up with the dialog about

Need Current Location of User in Android , Not Last known location

孤街浪徒 提交于 2019-12-11 08:24:48
问题 I am developing an android application in which i want to get users current location when application start, But when i start my application it gives the last known location when it start first time, But i want the updated current location of the user as soon as possible on application start. Please guide me about this. Thanks 回答1: Use LocationServices. It containes all location strategies described here 回答2: Is not there any way to get current location when application start 1st time OR