Qt 5.2 Or 5.3rc Android App Development And Google Maps Usage
I'm using Qt Quick (QML) for android (and hopefully iOs) app development and got stuck with google maps embeding. I believe the easiest and most reasonable way to do that is to use
Solution 1:
ِYou can use QDesktopServices to open a google map url :
QString link = "http://maps.google.com/maps?&daddr="+location;
QDesktopServices::openUrl(link);
Or use the Qt Android Extras module to launch a Google Map Intent :
Stringuri="http://maps.google.com/maps?&daddr="+location;
Intentintent=newIntent(Intent.ACTION_VIEW, Uri.parse(uri));
intent.setClassName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity");
if (intent.resolveActivity(m_context.getPackageManager()) != null) {
m_context.startActivity(intent);
}
Post a Comment for "Qt 5.2 Or 5.3rc Android App Development And Google Maps Usage"