Adding Google Web Component support to the Polymer library in the website.

114 views
Skip to first unread message

sfmi...@gmail.com

unread,
Feb 23, 2015, 10:05:33 PM2/23/15
to polym...@googlegroups.com
Hi, thanks for the great work. 

I am trying to implement the google-maps and google-drive web components from http://googlewebcomponents.github.io/
But I am having a hard time understanding how to add the support for these web components. I have Polymer installed in my PHP website and both core-elements & paper-elements work great (using regular zip file not bower). 

When <google-map> is added, nothing shows up on the page (no errors are thrown).

Should I download the files from https://github.com/GoogleWebComponents/google-map and use <link rel="import" ...> to add "google-map.html" to the webpage ? or does it come pre-supported with Polymer ?

The website: Dentrist.com

Eric Bidelman

unread,
Feb 24, 2015, 1:17:49 AM2/24/15
to sfmi...@gmail.com, polym...@googlegroups.com
The Google Web Components set is a collection of elements outside of Polymer's core offerings. You'll want to install them locally using bower or check them out via git. We don't have a .zip offered for those elements. After you install, import the element in your app using `<link rel="import" ...>` and declare the tag.  I'd start with the demo.html for example usage and to make sure you have everything installed properly.

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/b410d196-a3e8-4e4d-a186-a95b213e8aed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sfmi...@gmail.com

unread,
Feb 24, 2015, 5:57:12 AM2/24/15
to polym...@googlegroups.com
Thank you Eric for the response and the lectures.

- Maybe I should've asked "How to manually install Google Web Componemts ? Without using json & bower as that option is not available for my case using a shared hosting server."
I understand that its still new and underdevelopment. But guides to implementing the installation are not clear for me.

- After downloading the github of google-maps https://github.com/GoogleWebComponents/google-map
And extracting the files to the website server, which file should be added to the webpage using '<import rel'? Is it 'google-maps.html' ?

- Other than the specific google web component (like google-maps) and Polymer installed, should there be any other script added to the page ?

sfmi...@gmail.com

unread,
Feb 24, 2015, 7:05:57 AM2/24/15
to polym...@googlegroups.com
And what does it mean you 'don't have zip' offered for these components ? Does that mean I cannot use the google web components without json and bower ?

Eric Bidelman

unread,
Feb 24, 2015, 7:56:34 PM2/24/15
to sfmi...@gmail.com, polym...@googlegroups.com
The zip tool used by the Polymer site is up at http://bowerarchiver.appspot.com/

To get a .zip of the google-map element and all of its dependences, you can hit a URL like:
http://bowerarchiver.appspot.com/archive?google-map=GoogleWebComponents/google-map

The value of that URL param is just the shorthand to the full Github URL (e.g. https://github.com/GoogleWebComponents/google-map in this case).


On Tue Feb 24 2015 at 4:06:00 AM <sfmi...@gmail.com> wrote:
And what does it mean you 'don't have zip' offered for these components ? Does that mean I cannot use the google web components without json and bower ?

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/85598c6c-5da2-4eed-910e-dffb8c68cccd%40googlegroups.com.

Eric Bidelman

unread,
Feb 24, 2015, 7:57:33 PM2/24/15
to sfmi...@gmail.com, polym...@googlegroups.com
The demo.html should show you everything you need to use the element:
https://github.com/GoogleWebComponents/google-map/blob/master/demo.html

sfmi...@gmail.com

unread,
Feb 24, 2015, 8:59:16 PM2/24/15
to polym...@googlegroups.com, sfmi...@gmail.com
Fantastic now it works perfectly !

The parts which weren't clear for me are:
  • What files should be downloaded, in order to make 'google web components' work. I didn't install 'google-apis' at first, this is why it didn't work for me. 
  • I thought JSON & Bower needed different files than manual installation.
  • What files should be added to '<import link=' in the page to get the component to work. 
I think all element dependencies should be explained and described, like google-map element and its dependency folders (as google-apis).

Thank you Eric for the clear & fast responses.



On Wednesday, February 25, 2015 at 2:57:33 AM UTC+2, Eric Bidelman wrote:
The demo.html should show you everything you need to use the element:
https://github.com/GoogleWebComponents/google-map/blob/master/demo.html

On Tue Feb 24 2015 at 4:56:30 PM Eric Bidelman <ebi...@gmail.com> wrote:
The zip tool used by the Polymer site is up at http://bowerarchiver.appspot.com/

To get a .zip of the google-map element and all of its dependences, you can hit a URL like:
http://bowerarchiver.appspot.com/archive?google-map=GoogleWebComponents/google-map

The value of that URL param is just the shorthand to the full Github URL (e.g. https://github.com/GoogleWebComponents/google-map in this case).
On Tue Feb 24 2015 at 4:06:00 AM <sfmi...@gmail.com> wrote:
And what does it mean you 'don't have zip' offered for these components ? Does that mean I cannot use the google web components without json and bower ?

Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups "Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to polymer-dev...@googlegroups.com.

Eric Bidelman

unread,
Feb 24, 2015, 10:59:02 PM2/24/15
to sfmi...@gmail.com, polym...@googlegroups.com
In the world of components, it becomes a nightmare to download individual files. Especially when elements depend on other elements. This is typically why we recommend a package manager like Bower. It does the heavily lifting for you. You say what element you want to install:

    bower install GoogleWebComponents/google-map --save

and it fetches the dependency graph for you!

Reply all
Reply to author
Forward
0 new messages