How to send latitude and longtitude to Googlemap App?


Tinn Aphopchung

Hi,David
I try GoogleMap sample.It just a iframe with googlemap.That can only mark a point on map.
But It cannot navigate us to that point.
I try OpenWindow too.It's the same."Cannot Navigate"
I think.If I want to navigate to that point,I need to sent latitude and lontitude to googlemapApp.
But I don't know how.
Can you advice me?


DecSoft

Hello,

Honestly I am not an expert in the Google Maps Embed API, which is used in the "GoogleMaps" app sample. I don't know if such API allow us something like you wanted in the first time. In fact I can't understand very well what you wanted (for sure due to my bad english) since the maps show to us a "point", not based in the longitude and latitude, but in the place (point) name. If Google allow us to use longitude and latitude then we can use the Location control to get that information, and then update or set the IFrame URL to the appropiate one.



Tinn Aphopchung

After seaching,I found it

first I use this code.
MapX = latitude MapY = longitude


It open googleMap but cannot send location.I don't know why.(this code can only use with android.)

So I change to this It work. for IOS and Android

seaching again I found this topic thanks from stackoverflow

and find Launch Navigator Cordova/Phonegap Plugin

So.I find a wayout. :)
And next question.How to use that plugin? :D
If you add it as default function in App builder.Will be great!!


DecSoft

Hello,

Take a look at the Launcher control and the LauncherCheck, LauncherStart and LauncherAction. Also take a look at the "Launcher" app sample and the "CordovaPlugins" app sample too. This second one show us how to use custom Cordova's plugins if needed.



Tinn Aphopchung

Ok.I will use that plugin later with your advice.thanks.


Tinn Aphopchung

I already use that cordova prugin now.And will upload as sample project to every one.To add in sample project,David.


DecSoft

Hello,

Thanks tin. Apparently you are using a different plugin than the used by the Launcher control. But are you tried with the Launcher control? On the other hand, when you deal before with the "OpenWindow", are you checking the "Browser" Cordova's plugin in the app's options?

Anyway thanks for your offer. Feel free to use the Upload section of this forum or contact me in info (AT) davidesperalta (DOT) com.



Tinn Aphopchung
Hello,

Thanks tin. Apparently you are using a different plugin than the used by the Launcher control. But are you tried with the Launcher control? On the other hand, when you deal before with the "OpenWindow", are you checking the "Browser" Cordova's plugin in the app's options?

Anyway thanks for your offer. Feel free to use the Upload section of this forum or contact me in info (AT) davidesperalta (DOT) com.

I already try it,David.My Goal is to use App in Android and IOS.Then I choose to use plugin that will complete my goal.It make a choice that user can choose whatever they use android or IOS,David.Use that WindowOpen that code will work only android.(For IOS code need to change :D )

PS.Project will upload tomorrow.Need to rewrite for easy to other.


DecSoft

Hello,

Ok tin. Thanks for the explanation! :)



Tinn Aphopchung

Sorry for late,David.I have a lot of work to do.So I create this sample for everyone like I promise :D
Download
MapsNavigate.rar

Ps.I use your Googlemaps as template :D too. :P :P


DecSoft

Hello,

Thanks tin. I try the app and works like expected here in my Android 4.4.2 device. Thanks for sharing it!



DecSoft

Hello to all,

Just to inform that App Builder already includes various "Google Maps" samples, and, one of them, at least, shown how we can use the Location control in order to set the latitude and longitude in the map.

Remember than the Location control runs in all the platforms and browsers. Just look at the "GoogleMaps", "GoogleMaps2" and "GoogleMaps3" app samples and play a bit with them.



Ade Wale

Hi David,

Thanks for the good news.


DecSoft

Hello to all,

Hi David,

Thanks for the good news.

I hope can be useful! :)


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.