GoogleWebComponents / google-map

Google Maps web components

Home Page:https://elements.polymer-project.org/elements/google-map

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Uncaught TypeError: Cannot read property 'PlacesService' of undefined`

pdelanauze opened this issue · comments

Uncaught TypeError: Cannot read property 'PlacesService' of undefined google-map-search:146

Could this commit be related ?
GoogleWebComponents/google-apis@beea350

Adding a libraries="places" attribute fixes this

<google-map-search libraries="places"
                       map="[[map]]" query="Pizza"
                       results="{{results}}"></google-map-search>
    <google-map libraries="places"
                map="{{map}}" latitude="37.779"
                longitude="-122.3892">
      <template is="dom-repeat" items="{{results}}" as="marker">
        <google-map-marker latitude="{{marker.latitude}}"
                           longitude="{{marker.longitude}}">
          <h2>{{marker.name}}</h2>
          <span>{{marker.formatted_address}}</span>
        </google-map-marker>
      </template>
    </google-map>

Yes. You need to add the libraries attr to all elements if you use one of
the companion map elements.

On Sun, Sep 13, 2015, 1:44 AM Patrick de Lanauze notifications@github.com
wrote:

Adding a libraries="places" attribute fixes this





{{marker.name}}


{{marker.formatted_address}}



Reply to this email directly or view it on GitHub
#202 (comment)
.

Closing as it's wia