Tagged: google map
Hi there,
Is it possible to pan lock the map?
I have the map set on full screen now with some other content beneath it and so when you visit the site on an iPhone it’s nearly impossible to get past the map without scrolling its content.
Hope you got some code to solve this :)
With kind regards,
Jeroen Mulder
Hi MulderMind!
As a temporary solution, please add following code to Quick CSS
@media only screen and (max-width: 480px) {
div#av_gmap_1 {
height: 200px!important;
}}
It will make the width of maps 200px on screens smaller than 480px
Regards,
Yigit
Hi Jeroen,
I had the same problem and solved it by editing the shortcode.js file (its in the js folder of the theme)
You have to look for the this.mapVars Variable and add a “draggable: false” somewhere inbetween.
Should look like this:
this.mapVars = {
mapMaker: false, //mapmaker tiles are user generated content maps. might hold more info but also be inaccurate
mapTypeControl: false,
draggable: false,
backgroundColor:'transparent',
streetViewControl: false,
panControl: this.$data.pan_control,
zoomControl: this.$data.zoom_control,
scrollwheel: false,
zoom: this.$data.zoom,
mapTypeId:google.maps.MapTypeId.ROADMAP,
center: new google.maps.LatLng(this.$data.marker[0].lat, this.$data.marker[0].long)
};
This does the job for me, but you loose the Pan-Option everywhere
Best regards,
Marcus
Hi Marcus & Yigit,
Thanks allot for your replies- great help.
I’ll go with Marcus’ option.
All the best!
Jeroen