Hello,
First location you assigned to the map is center location for the map.
Thanks
Is there a way to avoid it and use a custom map center?
I use map woth more markers and I need center the map on center of these markers.
Is there a solution?
Hello,
Little code on line 152 in class-google-map.php will be enough to do this.
Before : $this->code.=’var latlng = new google.maps.LatLng(‘.$this->center_lat.’,’.$this->center_lng.’);’;
After : $this->code.=’var latlng = new google.maps.LatLng(“your latitude here”,”your longitude here”);’;
I hope it helps you.
Thanks
In this way all maps will be center with the same coordinates. I use more that one map and I need differrent center.
Can you add map center option on your plugin: if the user et latitude and longitude the plugin use it as center, in alternative use the first location.
Is it possible?
Hello,
I see. In this case you can pass center_latitude and center_longitude to the shortcode.
[put_wpgmp id=1 center_latitude=123456789 center_longitude=123456789]
I think i should advice you this solution at the first 🙂
Thanks
I hope issue is resolved. Please don’t hesitate to ask more if any issue.