We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

How to set the center of map? - Google Maps Location | Forum

Daniele
Daniele Feb 12 '13
Hi, I want to set the center of Map in a defined latitude and longitude to show a little part of map (ex. Rome).

Can you help me?


Thanks

jk
jk Feb 14 '13
Hi Daniele

You need to open file "{site_root_dir}/ow_plugins/google_map_location/controllers/user_map.php" and find code on line 31 :

$map = new GOOGLELOCATION_CMP_Map();
$map->setHeight('600px');
$map->setZoom(2); //  zoom of map  ( possible values from 0 to 17 )
$map->setCenter(30,10); // latitude and longitude of map center
$map->setMapOption('scrollwheel', 'false');
Daniele
Daniele Feb 15 '13

Thank you JK!

 

Bye

Daniele 

Tak
Tak May 19 '14
this doesnt work on the newest version. Is there a way to change the center of map with the new version?
jk
jk Nov 17 '14
Hi Zoli

It is not possible to set map center in new versions of location plugin.
Now  map center selection  depends of users which shown on the map.

Best Wishes,
JK
Fabrice
Fabrice Nov 28 '17
some news about it? it's possible now? thank you!
You do not have permission to reply this topic