Cordova-plugin-googlemaps: Google Maps for Browser!

Created on 16 Jan 2017  路  12Comments  路  Source: mapsplugin/cordova-plugin-googlemaps

Hi!
As far as I can tell, this plugin does not work within the browser. However, I am building a hybrid app for both mobile and browser, and need to address both. Therefore, I have two questions:

  1. What do you recommend developers like me do? Is there an alternative plugin which works alongside this one?
  2. If there is currently no solution, then: What would I have to do in order to add the functionality for this to work within the browser? I am willing to put in some effort to make this work and publish it if you can tell me what needs to be done to get started. I've been trying around unsuccessfully as I haven't worked on cordova plugins before, but I should be able to pick it up quickly.

Thanks,
Micha

All 12 comments

This plugin uses native SDKs (java and Objective-c) internally. That's why this plugin does not work on browser.
You have to use Google Maps JavaScript API v3 if you want to cover all environments.

Thanks, I am aware of that. What are the first steps to do that?

Thanks, but I am also aware of that and have no problem using the Google maps API in a browser. My question is how to use it to make the Cordova maps plugin work in a browser, as in how to combine the two and make them work through the plugin's API. Do I create a new plugin? Do I extend this existing plugin? How?

Cordova maps plugin work in a browser

This plugin does not work in browser.

Do I create a new plugin? Do I extend this existing plugin? How?

You should choose & think by yourself. It's depends on your skill.

Your request is out of support of this plugin.

Cordova maps plugin work in a browser

This plugin does not work in browser.

You misrepresented what I said by quoting wrong. I said MAKE the plugin work, and I stated earlier that I am aware it does not already work in the browser. Get your quotes right.

You should choose & think by yourself. It's depends on your skill.
Your request is out of support of this plugin.

You seem to be trying really hard to be as useless as possible as you have not answered a single question I asked. This question is highly connected to this plugin since I want to make this plugin's API work with the browser, and just want to know how I can add the browser proxy to implement the functions that are already there for iOS and Android. Please at least try to be helpful if you choose to answer again.

Love the plugin -- thanks for all your work and sacrifice in building this FREE plugin

You have to

1) Fork this plugin
2) Dig into the Cordova documentation how to build plugins (in your case: browser plugins)
3) Make all the modifications you need (you have to include the JS V3 API and write your own wrapper for it)

I don't want to be harsh, but this is not a support forum for general "how to build cordova browser plugins" questions. There is stackoverflow and the official cordova community.

I did not have a general "how to build Cordova browser plugin's" question. I am baffled that you guys don't seem to realize how much this project could benefit from someone like me extending it, but to each their own. I will simply build a service in my project that either uses the browser API or this plugin then, but that means that others can't use it.

@michaschwab we would love to see a PR which could be integrated to make this plugin work for browsers, too. (based on the JS V3 API)

Talking for myself, I don't have any experience using Cordova for browser.

Since I've been getting multiple e-mails from people that also want to use native and web google API for hybrid applications asking me if I have a solution:

No, I don't have one. For a while I wrote code that either called the cordova plugin or the Javascript API based on the platform. But since the admins of this plugin have no desire to make it easier to integrate, I do not see the value of maintaining that code base. If you want to use google maps in a hybrid app, I recommend that you do not use this plugin, and just use the javascript API.

@michaschwab I would recommend you to fix your website first, not breaking users back-button. Have a nice day!

Was this page helpful?
0 / 5 - 0 ratings