{"action":"created","issue":{"url":"https://api.github.com/repos/bjorn2404/jQuery-Store-Locator-Plugin/issues/105","repository_url":"https://api.github.com/repos/bjorn2404/jQuery-Store-Locator-Plugin","labels_url":"https://api.github.com/repos/bjorn2404/jQuery-Store-Locator-Plugin/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/bjorn2404/jQuery-Store-Locator-Plugin/issues/105/comments","events_url":"https://api.github.com/repos/bjorn2404/jQuery-Store-Locator-Plugin/issues/105/events","html_url":"https://github.com/bjorn2404/jQuery-Store-Locator-Plugin/issues/105","id":144193986,"number":105,"title":"Zoom in on a selected marker","user":{"login":"iljapanic","id":1295321,"avatar_url":"https://avatars.githubusercontent.com/u/1295321?v=3","gravatar_id":"","url":"https://api.github.com/users/iljapanic","html_url":"https://github.com/iljapanic","followers_url":"https://api.github.com/users/iljapanic/followers","following_url":"https://api.github.com/users/iljapanic/following{/other_user}","gists_url":"https://api.github.com/users/iljapanic/gists{/gist_id}","starred_url":"https://api.github.com/users/iljapanic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iljapanic/subscriptions","organizations_url":"https://api.github.com/users/iljapanic/orgs","repos_url":"https://api.github.com/users/iljapanic/repos","events_url":"https://api.github.com/users/iljapanic/events{/privacy}","received_events_url":"https://api.github.com/users/iljapanic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-29T08:32:37Z","updated_at":"2016-04-03T04:40:41Z","closed_at":"2016-04-03T04:40:41Z","body":"I have a feeling this should be super easy but I've been struggling for hours now and I still can't figure it out.\r\n\r\nWhen I press a marker in the list (or in the map), I'd like the map to zoom in to a certain level and center the marker. The centering is on by default but I can't seem to figure out the zoom.\r\n\r\nHere is my code:\r\n\r\n```\r\nfunction zoomIn(){\r\n    $('#bh-sl-map-container').storeLocator({\r\n        mapSettings: {\r\n          zoom : 15\r\n      }\r\n    });\r\n  }\r\n\r\n  $('#bh-sl-map-container').storeLocator({\r\n    dataType: 'json',\r\n    dataRaw: allLocations,\r\n    storeLimit: -1,\r\n    lengthUnit: 'km',\r\n    fullMapStart: true,\r\n    distanceAlert: -1,\r\n    slideMap: false,\r\n    locationsPerPage: 500,\r\n    infowindowTemplatePath: templatePath1,\r\n    listTemplatePath: templatePath2,\r\n    KMLinfowindowTemplatePath: templatePath3,\r\n    KMLlistTemplatePath: templatePath4,\r\n    dragSearch: true,\r\n    mapSettings: {\r\n      zoom : 0,\r\n      mapTypeId: google.maps.MapTypeId.ROADMAP,\r\n      scrollwheel: false,\r\n      styles: styles,\r\n      mapTypeControl: false\r\n    },\r\n    callbackListClick(){\r\n      console.log('location in the list clicked');\r\n      zoomIn();\r\n    }\r\n  });\r\n```\r\n\r\nThe callback function is working fine, but zoom doesn't occur. Actually, the zoom settings don't seem to work for me at all, no matter what I set in the mapSettings array, the zoom level is always the same.\r\n\r\nAny suggestions are much appreciated. "},"comment":{"url":"https://api.github.com/repos/bjorn2404/jQuery-Store-Locator-Plugin/issues/comments/204867617","html_url":"https://github.com/bjorn2404/jQuery-Store-Locator-Plugin/issues/105#issuecomment-204867617","issue_url":"https://api.github.com/repos/bjorn2404/jQuery-Store-Locator-Plugin/issues/105","id":204867617,"user":{"login":"bjorn2404","id":303829,"avatar_url":"https://avatars.githubusercontent.com/u/303829?v=3","gravatar_id":"","url":"https://api.github.com/users/bjorn2404","html_url":"https://github.com/bjorn2404","followers_url":"https://api.github.com/users/bjorn2404/followers","following_url":"https://api.github.com/users/bjorn2404/following{/other_user}","gists_url":"https://api.github.com/users/bjorn2404/gists{/gist_id}","starred_url":"https://api.github.com/users/bjorn2404/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjorn2404/subscriptions","organizations_url":"https://api.github.com/users/bjorn2404/orgs","repos_url":"https://api.github.com/users/bjorn2404/repos","events_url":"https://api.github.com/users/bjorn2404/events{/privacy}","received_events_url":"https://api.github.com/users/bjorn2404/received_events","type":"User","site_admin":false},"created_at":"2016-04-03T04:40:41Z","updated_at":"2016-04-03T04:40:41Z","body":"When using the fullmapstart option the plugin automatically centers and zooms because no origin has been set yet. To programmatically change the zoom level you need the map object, which is not available with the ListClick callback. map.setZoom would need to be used - the mapSettings option is for the default Google Map settings that are used when the map loads."}}