Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fitToMarker attribute doesn't work [2.0-preview] #374

Closed
jonadeline opened this issue Jun 22, 2017 · 4 comments
Closed

fitToMarker attribute doesn't work [2.0-preview] #374

jonadeline opened this issue Jun 22, 2017 · 4 comments

Comments

@jonadeline
Copy link

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

@kelvinwatson
Copy link

+1, having the same issue here.

nidelson added a commit to nidelson/google-map that referenced this issue Aug 5, 2017
The `fitToMarkers` property is in the plural.
Fix GoogleWebComponents#374
@jonadeline
Copy link
Author

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

@mcclaskiem
Copy link

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!

@jonadeline
Copy link
Author

jonadeline commented Nov 12, 2017

Hi @mcclaskiem,

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

e111077 pushed a commit that referenced this issue Nov 15, 2017
The `fitToMarkers` property is in the plural.
Fix #374
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants