How can I use native iOS/Android maps in Ionic Application? - android

I'm developing an Ionic app that allows the user to select a point of interest and edit the data. To do so, I need to display a map. I've tried using Google Maps, Leaflet, Bing Maps and they work fine (some are a little bit laggy) but a co-worker warned me that the performance would get worse if I started showing all the markers. (I know that I can use plugins to cluster, but thats not the point).
My supervisor said that it would be better if I used native mobile maps. When the app is launched in Android, the map shown to the user would be the android native map and the same thing for iOS.
Can someone explain if this is even possible? I googled it already but I couldn't find any good alternatives.
Thanks!

I think a way to achieve this is to detect the platform and use specific code for each :
PhoneGap - Detect device type in phonegap
(Ionic is based on phonegap/cordova)
You can also develop a cordova plugin who use differents API from each platform. There is already a cordova plugin for maps, but who only works on ios and android, and only with google map :
https://github.com/mapsplugin/cordova-plugin-googlemaps
Hope this help

Related

Can I use react-native for developing maps app

I have a question regarding possibility to uses react-native library for developing the app (ios/android) which will able to support to works with google/apple maps [put points, measure distance, etc]
So, the main question is react-native good choice for developing the app with this functionality or instead of this I should use native lang such as (swift/java) ? :)
Yes, you can use react-native for developing maps app. I am currently developing a service provider app that uses google maps and I am using all features that you have mentioned above and many more i-e direction api, calculating EAT, drawing routes etc. Every thing works fine with react-native. You can follow this article Integrating Google Maps into React Native App on Android to integrate maps feature in you app.
I am using the following libraries:
react-native-google-places
react-native-maps
react-native-maps-directions

Cordova plugin for google map distance matrix service

I am trying to develop an android application in cordova. It have to implement some google map functionalities like distance matrix service and direction service. But I haven't find any plugin for these functions. I'm using cordova-plugin-googlemaps for initializing google map.
I tried to do this in javascript itself but it have ReferenceError: google is not defined and I have pushed the specific file to github
Is there any other plugins have these supports ??
Or is it possible to write native android code to do this functionality that works in cordova application (like bridging kind of things) ??
p.s: I have no previous experience in mobile app development and Java related things
As the folks from these multiple issues state, this plugin does not have support for the Directions and Distance Matrix services at this time, but you can implement them through the JavaScript API or through HTTP Web Services.
Hope this helps point you in the right direction!

Does a WebView app have access to Android features?

I am sorry if this is not the correct place to ask these questions but I cannot find the answer anywhere. I have built/building an app that basically displays a leaflet map and tracks users in real time with node and socket.io It has various functions but everything is contained either on or over the map. What I need to know is.
Will this run properly in a WebView app?
Can it run when the app is on but in the background (This has to run to keep the connection open and update location with the watch.position function)?
Can it access the HTML5 location features?
Can I access things like if I want to send a SMS from it via a button on the webapp?
Can I access the camera?
Whats the quickest software to use to develop this and could a similar app be made for iOS?
Sorry if a lot of questions but from what I have read WebView should be good enough as most of the work is back-end and map/browser based anyway. Or should I go down the native route?
I have done a couple of cross platform apps for iOS and Android with Cordova. To answer your questions: In a nutshell, I think you can do most of what you are trying to do with a framework like Cordova.
No.
Not with the webview, but maybe with Cordova (there is a plugin for background services).
Not with the webview, but yes with Cordova.
Not with the webview, but yes with Cordova.
Not with the webview, but yes with Cordova.
I am now a native developer for both iOS and Android. I would probably not do an app cross platform again unless it was really simple. I was always able to make things work in Cordova, but with a lot of hacking involved. Since you are familiar with javascript/html Corodova or Phonegap would probably be fastest in terms of development time for you.

Can you use Apple's mapkit for a hybrid application?

This web application is for Web and Android. I looked into others like Google, but they have limits.
If you can use it can anyone point me to the documentation for it.
Thanks.
2019 Update:
Apple now has a first-party JavaScript framework for using Apple Maps on the web: MapKit JS documentation.
Original Answer:
There is no officially supported way to use Apple Maps or MapKit on any platform but except iOS and macOS.
That said, here is the JS source for implementing Apple Maps on the web. Some people have been able to create working map views using it (see fruitymaps.com)
If you with a hybrid app means one that is built with a html/js-based framework like Ionic or a hybrid framework like Xamarin or React Native, which will all run in a native app and note solely in a browser, you could absolutely create a plugin that lets you use native map views in the hybrid view.
However, you'd probably have to do some heavy work to get the plugin to cover a basic set of features that it would then translate into equivalent MKMapView and Google Maps operations. Also, if you use a html/js-based framework like Ionic, you would have to present the map in a native view.
If you are just out for something better looking than the Google Maps web map, you could have a look at MapBox (https://www.mapbox.com/). They have a bunch of different styles and ways to incorporate their maps into apps of various types.

Moving from android to sencha-touch

I am creating an app on android but after hearing about sencha that it supports multiple platforms, so before choosing that i have some confusions about this framework. Please answer few questions
Will sencha apps will work only in web browsers? i.e. launching an app will open web browser first?
Android has built in database i.e. SQLite? does sancha supports it or has its own built in DBMS?
Can i use hardware features like camera(for barcode scanning)?
Does it support google maps
Is it possible to create homescreen widgets that runs on iphone,blackberry and android?
any help in this regard will be highly appreciated
Not too much information is available on the internet about Sencha Touch. Their latest version is Sencha Touch 2. I did explore that alternative a few months back (back then, they were still on version 1).
That being said, let me answer as many of your queries as I can.
Sencha Touch driven applications don't run in your web browser. They
run natively on each platform you design for. However, they make use
of the webkit engine integrated in you App. Therefore, launching you
App will not open a browser page but will run your application
(HTML5 by the way) within your App.
A preliminary search on their website has SQL Database mentioned. http://docs.sencha.com/touch/2-0/#!/api/Ext.feature.has-property-SqlDatabase. Not sure about how they integrate it. Perhaps a look into their SDK/ API and a few samples should clear that up. Alternatively, an I am just guessing here at this point, it might connect your website database, if one exists.
Harware features don't seem to be avialble at the moment. A quick look at their kitchnsink example should give you an idea of the components available for integration. http://dev.sencha.com/deploy/touch/examples/production/kitchensink/index.html
It does support Google Maps.
They do list an extension called WIDGET but the documnetation seems rather silent about functionality. Again, as mentioned earlier, a dive in to the SDK / API and a few examples might clear that up.
This here is their online Guide: http://docs.sencha.com/touch/2-0/#!/guide
And this is a page to their Examples: http://docs.sencha.com/touch/2-0/#!/example
I would still go ahead with Native App development as it gives you more flexibility over something like Sencha Touch.
Alternatively, if you would still like the one effort, multiple platform thingy, there are a few alternatives available.
http://www.phonegap.com/
http://www.appcelerator.com/
http://www.rhomobile.com/
Good luck with your app development. And I hope the info provided helps.... :-)

Categories

Resources