-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for ionic-native #70
Comments
Good idea. But I wonder why they write directly in .ts instead of a .dt? |
Well, because .d.ts contains only interface\class descriptions. They allow you to use javascrpt code as is from Typescript. While ionic-native is wrapper. It wrapps functionality and uses angular Promises for plugin interface to look native in ionic apps. |
Ho, make senses. Should we plan this for the 2.0 or 2.0.x? This would force to maintain 2 js API. Do you think we are enough or it could be a job for another collaborator? |
I think version 2.1 with ionic example)
Another collaborator will be nice) |
Ok sound like a plan! |
Hello, does this plugin support ionic 1? |
Hi, @hamzahppa , this plugin definitely supports Ionic 1 as well as Ionic 2 or Ionic any)) |
@Anothar Thank you, but I have a little problem here. I'm really new at using this plugin and also new at Ionic. I got an error when I try to use this plugin and have spent my time looking for the solution at Google but it won't help. I just learn to use this plugin at Ionic 1, and here are my code:
And it give me error Mapbox is not defined. Thank you very much |
It looks like you haven't installed plugin. Look at plugins folder is there folder "cordova-plugin-mapbox"? Also look at config.xml there should be line starting with: '<plugin name="cordova-plugin-mapbox" '. |
Indeed, and wait for |
@Anothar I check
And I also add |
Hello @EddyVerbruggen thank you, I used lots of your plugin, great job. But I have difficult on using this plugin, can you explain how to wait for deviceready? do I need to put this code inside .run on my app.js? |
Thx. Say you have a function called |
@EddyVerbruggen thank you it works, it looks like that I didn't place the code after deviceready. And also, I did not run the code on real mobile device, after I run it on real device, it works. |
I have been struggling to get this plugin to work in Ionic2 .. seems to be a scoping issue with Mapbox variable. I came to IonicNative (http://ionicframework.com/docs/v2/native/) which advises that resolved I had to simply declare the variable |
I don't know if it will interest anyone. But I been reviewing map plugins for different hybrid frameworks for a future project. Just to get Mapbox to work with Ionic 2 I forked the ionic-native library and added a coarse wrapper for cordova-plugin-mapbox. All you have to do is to build my forked ionic-native and replace your local projects node_modules/ionic-native/dist (or install it directly from github). And then just install the cordova-plugin-mapbox:
Where XXX is your Mapbox access token. All I tested so far is to initiate a map, add a marker, zoom and pan. It all works as expected on my iPhone 6 device and on android in the emulator. |
can I use this plugin with ionic 3? |
@risinghero I am using ionic 3. I have installed plugin and try to use this plugin but i m getting error cannot find name Mapbox. Can you help me how to use this plugin with ionic 2 or ionic 3? |
@ansarikhurshid786 Hi. Please, reread this thread from the beginning and try all solutions - one of them will work for you. |
Thanks, I read this thread but I can't find solution for ionic 2 or any |
@ansarikhurshid786 Lets start from basics. Cordova is the technology that allows you to write application using js and html. Internally it's webbrowser (chromium) + plugins that allow you to use phone specific functionality which you can't use from normal browser.
|
Thanks a lot for your valuable time. I am using ionic 2 where I can't use cordova plugin directly. cordova plugin work with ionic native. That is why i am asking you how to use it with ionic 2 or any. |
I am using plugin by declaring variable out side class as below : declare var Mabbox. Now I can access it's property and method. |
Hi @risinghero It is working like native map but i can't find basic methods of mapbox can you help ? |
Hi @ansarikhurshid786 . Unfortunately, only a little amount of native methods is implemented in this cordova plugin( |
ok thanks for your response. so i can't use this plugin for my application |
@ansarikhurshid786 maybe. You haven't told what you want to do with user location. |
Ionic 2.0 has repo for typescript 2.0 wrappers around cordova plugins. I think it will be nice to write one for our plugin.
The text was updated successfully, but these errors were encountered: