-
Notifications
You must be signed in to change notification settings - Fork 10
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
If only one marker is present the map doesnt render properly #126
Comments
Thanks. Would you mind sharing the Twig snippet which is rendering the map? It looks like the map's |
Sure. Here is the Twig snippet for the map rendering: {% do googleMaps.loadAssets({'libraries': 'places'}) %}
{% set map = googleMaps.map(partnerEntries, {
'id': 'partner-locator-page-map',
'cluster': {
'renderer': 'CustomRenderer'
},
'styles': googleMapsStyle,
'mapOptions': {
'streetViewControl': false,
'fullscreenControl': false,
'mapTypeControl': false,
'maxZoom': '15',
},
'callback': 'mapReady',
'markerClick': 'function (event) {
showPartnerInfo({id});
}'
}) %}
{% set partnersQuery = craft.entries.section('partnerPages').orderBy('title ASC') %}
{% set partnerEntries = partnersQuery.all() %}
{{ map.tag({'assets': false}) }} It also happens on another project with a simpler setup: {% set dentistDentalPractices = entry.dentistDentalPractices.eagerly().all() %}
{% set map = googleMaps.map(dentistDentalPractices, {
'id': 'dentist-page-maps',
'mapOptions': {
'streetViewControl': false,
'fullscreenControl': false,
'mapTypeControl': false,
'maxZoom': '15',
}
}) %}
{{ map.tag() }} |
@lindseydiloreto just checking in if you had any luck with recreating the issue :) |
There is this weird issue that when there is only 1 marker on the map the map doesn't render properly.
Here is an example query with multiple marker results: https://orbotglobal.com/partners?category=&query=Eindhoven%2C+Netherlands
Here is an example query with a single marker result: https://orbotglobal.com/partners?category=&query=Johannesburg%2C+South+Africa
Here is a screenshot of the local debug log:
My best guess it has to do with the boundaries since the zoom level is set to
11
.Version info:
The text was updated successfully, but these errors were encountered: