Telerik-Verified-Plugins / Mapbox

Native OpenGL maps for your Cordova app
112 stars 52 forks source link

How to add element over map #96

Closed ansarikhurshid786 closed 5 years ago

ansarikhurshid786 commented 5 years ago

Hi, I want to add current location button and other some user button. How can i add it properly which support android and ios. because i can't see where this map is rendering.

risinghero commented 5 years ago

Hi @ansarikhurshid786. Map is rendered inside ios and android code. You can try to fork plugin and add yourself into ios and android code required button.

ansarikhurshid786 commented 5 years ago

I want to use it because it give best user experience. Presently I am using mailbox-gl-js which is really bad user experience in ionic 3 android and iOS application.

ansarikhurshid786 commented 5 years ago

I don't have that much experience to fork and add my own. can you help me add button over map and how to load map in specific html element id.

risinghero commented 5 years ago

how to load map in specific html element id

I can't since it requires lots of work and time. You can look at @dagatsoin branch. In my experience mapbox-gl-js has some problems with old browsers and it's performance is not that good. Maybe it's better to use just leaflet+mapbox tiles

ansarikhurshid786 commented 5 years ago

Yes, mailbox-gl-js not good performance in mobile application. Should I use this plugin or not

risinghero commented 5 years ago

Should I use this plugin or not

Well it's up to you to decide. But I don't think that adding elements over map will be ready soon. Regarding mapbox-gl-js instead of it just use leaflet+mapbox tiles it won't require many changes in your code and you will get good performance. The only problem-it won't work offline,

ansarikhurshid786 commented 5 years ago

ok thanks. just tell me leaflet + mapbox will support 3d also. if you have link for leaflet + mapbox can you please send me.

risinghero commented 5 years ago

No it won't. Leaflet just for 2D.

ansarikhurshid786 commented 5 years ago

Oh but I want 3d also. Anyway thanks a lot for giving me your valuable time.

ansarikhurshid786 commented 5 years ago

@risinghero how to use leaflet+mapbox? can you give me any reference please

risinghero commented 5 years ago

Hi, @ansarikhurshid786 . Here is example But I think that you can add button into this plugin by yourself - just fork it, add button into android and iOS code and add events

ansarikhurshid786 commented 5 years ago

Ok thanks I will check. You mean leflet right. I think leflet base on mapbox, am I right?

ansarikhurshid786 commented 5 years ago

Yes, Leaflet is much faster than mapbox gl js. Thanks a lot @risinghero