CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Google mapping - Initial Zoom
Pages: [1]

Author Topic: Google mapping - Initial Zoom  (Read 1122 times)

geeffland

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Google mapping - Initial Zoom
June 08, 2010, 09:49:44 am
Is there anyplace to adjust in civiCRM the initial Zoom setting for the Google Maps API (map shown on Event Info Page)

Greg

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Google mapping - Initial Zoom
June 08, 2010, 10:16:45 am

No, but would be nice to expose more of the mapping parameters to the admin, so folks can customize it on a per map basis

currently, your best bet is to customize the mapping template:

templates/CRM/Contact/Form/Task/Map/Google.tpl

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mikeydiamonds

  • I’m new here
  • *
  • Posts: 2
  • Karma: 1
    • Liquid Tree
Re: Google mapping - Initial Zoom
July 23, 2010, 03:00:40 pm
edit line 42 in templates/CRM/Contact/Form/Task/Map/Google.tpl

Code: [Select]
map.setCenter(new GLatLng( 0, 0 ), 0 );
To whatever you want the zoom to be. I like 13.

Code: [Select]
map.setCenter(new GLatLng( 0, 0 ), 13 );

herongrace

  • I’m new here
  • *
  • Posts: 27
  • Karma: 1
Re: Google mapping - Initial Zoom
November 14, 2010, 07:21:02 am
Hi,
I tried your suggestion to edit the google.tpl file, but it has no effect on my map, which is still zoomed in to the maximum.
Any other ideas?

Thanks,
HeronGrace
« Last Edit: November 14, 2010, 08:34:11 am by herongrace »

herongrace

  • I’m new here
  • *
  • Posts: 27
  • Karma: 1
Re: Google mapping - Initial Zoom
November 14, 2010, 08:37:25 am
What worked for me was to modify the following in Google.tpl:

Find and comment out the first line, below, and then add the second line, with whatever zoom number you want. I used 15:

        //map.setZoom(map.getBoundsZoomLevel(bounds));
        map.setZoom(15);

Got this from this thread...

Best,
HeronGrace

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Google mapping - Initial Zoom

This forum was archived on 2017-11-26.