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

fitToMarker attribute doesn't work [2.0-preview]

jonadeline opened this issue · comments

Hi there,

The fit-to-markerattribute doesn't have any effect on map scaling.
Here is a JSBin demonstrating the issue : https://jsbin.com/qiboluq/edit?html,console,output

+1, having the same issue here.

Ok as mentioned in nidelson PR, the attribute has been changed to fit-to-markers(plural)

commented

Can't seem to get this working in my build I have the plural version of the attribute on my map tag.

I am on v2.0.2

    <script src="/bower_components/webcomponentsjs/webcomponents-lite.js"></script>
    <link rel="import" href="/bower_components/google-map/google-map.html">
    <google-map api-key="{{craft.simpleMap.apiKey}}" fit-to-markers>
        {% for business in allBusinesses %}
            {% for location in business.location %}
                <google-map-marker latitude="{{location.location.lat}}" longitude="{{location.location.lng}}" title="Test" draggable="false"></google-map-marker>
            {% endfor %}
        {% endfor %}
    </google-map>

Let me know if anything further is needed to debug this. Thank you!

Hi @mcclaskiem,

You forget to add slot="markers" in your google-map-marker tag.