Zoom don't work for google map visualization

mattsh

Member
Hi!

Start zoom level for google map visualization don't work for me. Have tested with values from 0 to 21, but always the same map. If I change the size of the map the zoom level changes, strange..

Have tested via a Joomla menu link and in a J article. always the same behavior.

And have tested with my own template and J templates, no difference.

See this old thread with the same problem http://fabrikar.com/forums/index.php?threads/problem-with-zoom-visualization.39558/#post-199014

The only strange thing I see on my is the to google maps varnings, tested with some api keys but no difference.
Code:
Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
util.js:211 Google Maps API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required

Regards
Matt

Fabrik 3.4.3 (latest from Github)
Joomla 3.5.1
 
It should do.
The API warnings are shown always, this shouldn't hurt.
Do you have cookies enabled in the map settings? or a kml-overlay? In both cases it will use it's own zoom settings.

In any case after any modification in the map settings you have to clear your browser cache to get it shown.
 
I'm pretty sure this is because we store the zoom in session data, so once you've displayed the map, changing the default won't have any effect on any open sessions. Try logging out and back in on the front end, which should clear session data.
 
Thanks!

Sorry for the late answer...

I think the problem is the kml overlay. Without it the zoom works fine. I have to look at the kml-file and figure out the problem.

Regards
Matt
 
You don't need to "figure out".
http://fabrikar.com/forums/index.php?threads/googlemap-viz-and-kml-kmz-overlays.43751/#post-226579
At the moment the google map is always centered/zoomed on the last overlay, ignoring the maps center and zoom setting (which may or may not be the desired behaviour).

I assume this is because Fabrik doesn't set any options and the default seems to be
preserveViewport:false
I think even without new kml options Fabrik should set "preserveViewport:true" (so the Fabrik zoom/center settings are not ignored)

If you want to zoom on one of your overlays you can always set the Fabrik options to the values you need but at the moment you don't have any choice.

As a workaround you can create a 2nd kml file (added as the last one in your Google map viz) which contains just 3 or 4 invisible markers at the bounderies you want to display.

Edit: Is there any option inside the kml file which can modify this default "center-zoom-on-me" behaviour?
 
Last edited:
As a workaround you can create a 2nd kml file (added as the last one in your Google map viz) which contains just 3 or 4 invisible markers at the bounderies you want to display.
Don't seem to work for me, the "zoom" uses both ocerlay's so no difference.

Edit: Is there any option inside the kml file which can modify this default "center-zoom-on-me" behaviour?
Have not that option and haven't found a way to set that option.

Regards
Matt
 
Is there any option inside the kml file which can modify this default "center-zoom-on-me" behaviour?
This is a question;) I don't know such an option, too.
 
I don't have a KML test case handy atm, but if you want to test ...

Edit ./plugins/fabrik_visualization/googlemap/googlemap.js, line 454 ...

Code:
                this.options.overlays[k] = new google.maps.KmlLayer(overlay_url);

... and change it to ...

Code:
                this.options.overlays[k] = new google.maps.KmlLayer({
                    url: overlay_url,
                    preserveViewport: true
                });

Then enable "Debug JS" (main Fabrik global options, Debug tab) so the page loads the uncompressed JS.

Let me know. If it works, I'll add YAFO (Yet Another Freakin' Option) to the map viz settings to dictate that behavior, as I'm 100% positive that if we just default it to that, somebody will come back saying "why does my KML layer not zoom".

-- hugh
 
PS, when I said we saved the zoom and position in the session, i was wrong, we store it in a cookie, and there is already a setting for whether to use that feature or not, "Use Cookies", under "Advanced".

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top