lkching7 Member Licensed User Longtime User Jan 11, 2015 #1 I Try To Get Gooele Map MyLocation Latitude & Longitude. But Occur Error Initialized, I Already Make Sure MyLocationEnabled is True. The Google Map Library Run Properly Except This Function. I Just Try The Simple Call : gmap = mFragment.GetMap gmap.MyLocationEnabled = True gmap.GetUiSettings .MyLocationButtonEnabled =True msgbox(gmap.MyLocation.Latitude,"TEST")
I Try To Get Gooele Map MyLocation Latitude & Longitude. But Occur Error Initialized, I Already Make Sure MyLocationEnabled is True. The Google Map Library Run Properly Except This Function. I Just Try The Simple Call : gmap = mFragment.GetMap gmap.MyLocationEnabled = True gmap.GetUiSettings .MyLocationButtonEnabled =True msgbox(gmap.MyLocation.Latitude,"TEST")
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2015 #2 You need to check whether MyLocation.IsInitialized before using it. It will not be initialized until the location is known. Upvote 0
You need to check whether MyLocation.IsInitialized before using it. It will not be initialized until the location is known.
lkching7 Member Licensed User Longtime User Jan 12, 2015 #3 Erel said: You need to check whether MyLocation.IsInitialized before using it. It will not be initialized until the location is known. Click to expand... I Have Check The MyLocation.IsInitialized, But It Always Return False. Actually What Mean By "location is known" Upvote 0
Erel said: You need to check whether MyLocation.IsInitialized before using it. It will not be initialized until the location is known. Click to expand... I Have Check The MyLocation.IsInitialized, But It Always Return False. Actually What Mean By "location is known"
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2015 #4 It means that Google Maps doesn't yet know the device location. Upvote 0
lkching7 Member Licensed User Longtime User Jan 12, 2015 #5 Erel said: It means that Google Maps doesn't yet know the device location. Click to expand... Thank For Reply, Is That Google Map Will Automatic Know The Device Location ? Or I Have To "Call" The Google Map Do Something To Check My Device Location. By The Way, If I Click The Right Top Corner Button In Google Map. She Will Know My Location. Upvote 0
Erel said: It means that Google Maps doesn't yet know the device location. Click to expand... Thank For Reply, Is That Google Map Will Automatic Know The Device Location ? Or I Have To "Call" The Google Map Do Something To Check My Device Location. By The Way, If I Click The Right Top Corner Button In Google Map. She Will Know My Location.
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2015 #6 Test it outside. After a minute or two you will see a symbol that marks the current location. When this symbol is visible you will be able to get the current location. Upvote 0
Test it outside. After a minute or two you will see a symbol that marks the current location. When this symbol is visible you will be able to get the current location.
lkching7 Member Licensed User Longtime User Jan 12, 2015 #7 Erel said: Test it outside. After a minute or two you will see a symbol that marks the current location. When this symbol is visible you will be able to get the current location. Click to expand... Yes ! You're Correct. When I Go Outside, Problem Solved. I Can Get The My Location Already. Many Thank Erel. Can I Ask One More Question, It That Suitable To Create a Timer To Check Whether "MyLocation.IsInitialized = True" Upvote 0
Erel said: Test it outside. After a minute or two you will see a symbol that marks the current location. When this symbol is visible you will be able to get the current location. Click to expand... Yes ! You're Correct. When I Go Outside, Problem Solved. I Can Get The My Location Already. Many Thank Erel. Can I Ask One More Question, It That Suitable To Create a Timer To Check Whether "MyLocation.IsInitialized = True"
Erel B4X founder Staff member Licensed User Longtime User Jan 12, 2015 #8 lkching7 said: It That Suitable To Create a Timer To Check Whether Click to expand... Yes. Upvote 0
K klarsys Active Member Licensed User Longtime User Apr 26, 2015 #9 Rather than a timer, is there any event / call back I can use to update my marker every time my location is updated? Upvote 0
Rather than a timer, is there any event / call back I can use to update my marker every time my location is updated?
warwound Expert Licensed User Longtime User Apr 26, 2015 #10 klarsys said: Rather than a timer, is there any event / call back I can use to update my marker every time my location is updated? Click to expand... Look here: https://www.b4x.com/android/forum/t...ld-in-locationchange-event.30234/#post-175563 With GoogleMapsExtras you can add a listener for the MyLocationChange event. Upvote 0
klarsys said: Rather than a timer, is there any event / call back I can use to update my marker every time my location is updated? Click to expand... Look here: https://www.b4x.com/android/forum/t...ld-in-locationchange-event.30234/#post-175563 With GoogleMapsExtras you can add a listener for the MyLocationChange event.