Cordova-plugin-googlemaps: Implementing browser support

Created on 16 Jul 2016  Â·  6Comments  Â·  Source: mapsplugin/cordova-plugin-googlemaps

Hey there,

Thanks for the awesome plugin.

I was wondering, how hard would it be to add browser support?

Did you guys try anything yet and had problems? or just not focusing on that for now?

I was thinking we could add a new file /www/browser/googlemaps-cdv-plugin.js and route all method calls to the javascript library (should be loaded by the user manually).

This can help people debug in the browser in real time, as well as use this plugin for any other platform supported by Cordova, or even the web.

If you think this is doable and will solve a problem, then let's create a new branch for people to contribute to over time.

All 6 comments

This plugin focuses on the native sdks, and no plan to support for browser.

I understand.

My question is: do you think it's doable?

I think it's easier if you answer the question rather than me going through
the code to figure it out.

I'm not asking you guys to write any code, I just need to know if it's
possible and if you are willing merge it with your plugin if someone sends
you a PR.

The goal of adding it isn't to fully support browser, but to ease the
development process for people who are using this plugin.

On Jul 16, 2016 1:36 AM, "Masashi Katsumata" [email protected]
wrote:

This plugin focuses on the native sdks, and no plan to support for browser.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1029#issuecomment-233109600,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANJ8dOypSc9qdSIbsVm_mJrB3TAFACMmks5qWG3egaJpZM4JN6aK
.

Hi Ibrahim, I'm not a dev here but maybe I can help with this.

What this plugin offers is a cordova wrapper around the android and iOS
native google maps SDKs.
https://developers.google.com/maps/documentation/android-api/ for example.
It is java and objective-c code and it is not code intended to run o
browsers.

If you need a map on the browser, you should use the gmaps javascript API
directly, leaflet or other similar things. (
https://developers.google.com/maps/documentation/javascript/ )

My personal view is that it is up to the programmer (and not to this
plugin) to take care of this use case.
Trust me, the more focused this project is, the better it is for all of us.

When you say you want to " ease the development process for people who are
using this plugin", I guess you want to be able to test your app using
"ionic serve".
Did you have any problems debugging on emulators or native devices? "ionic
run platform -c -l" should get the job done!

Hope this helps!

2016-07-16 17:20 GMT+08:00 Ibrahim Hadeed [email protected]:

I understand.

My question is: do you think it's doable?

I think it's easier if you answer the question rather than me going through
the code to figure it out.

I'm not asking you guys to write any code, I just need to know if it's
possible and if you are willing merge it with your plugin if someone sends
you a PR.

The goal of adding it isn't to fully support browser, but to ease the
development process for people who are using this plugin.

On Jul 16, 2016 1:36 AM, "Masashi Katsumata" [email protected]
wrote:

This plugin focuses on the native sdks, and no plan to support for
browser.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1029#issuecomment-233109600
,
or mute the thread
<
https://github.com/notifications/unsubscribe-auth/ANJ8dOypSc9qdSIbsVm_mJrB3TAFACMmks5qWG3egaJpZM4JN6aK

.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1029#issuecomment-233121764,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA4X7nYncPeB7eSKpMAxCE6ndlwsI5QLks5qWKJggaJpZM4JN6aK
.

@ihadeed it would be very useful to have it on run on the browser too - I agree. And yes exactly @quiuquio I would use it for ionic serve. But looks like a no go.
Thanks all.

I agree with @quiuquio, this plugin is primarily focused on the native SDKs. The less extended this plugin is and the more focused it is will always be better. Besides, there will always be plenty more plugins available is someone wants to run the Javascript SDK on the normal browser.

This plugin is fully open source. And you know JavaScript at least. It means you can implement JavaScript version, and you are able to send it as a pull request.
That's the open source culture.

Improvement ideas or contributions are welcome. Just requesting is not welcome.

Was this page helpful?
0 / 5 - 0 ratings