; Default map location is Gaslight Media office
map_default_lat = 45.3749
map_default_lon = -84.9592
+map_default_zoom = 10
; Front-end Member Listing - [glm-members-list]
front-config['list_show_map'] = true
$smarty->templateAssign ( $this->config['term']);
$smarty->templateAssign ( $this->config['phrase']);
$smarty->templateAssign ( 'googleMapsBrowserApiKey', $this->config['googleMapsApiKey']);
+ $smarty->templateAssign ( 'mapDefaultLat', $this->config['map_default_lat']);
+ $smarty->templateAssign ( 'mapDefaultLon', $this->config['map_default_lon']);
+ $smarty->templateAssign ( 'mapDefaultZoom', $this->config['map_default_zoom']);
// Add all terms and phrases from the config/plugin.ini file
// $smarty->templateAssign ( 'terms', $this->config->term);
* API reference: https://developers.google.com/maps/documentation/javascript/reference
*/
- // Set default - Need to make this configurable
- var startLat = 45;
- var startLon = -84;
-
// Create a Google Map object
- var map = new google.maps.Map(document.getElementById('locationMap'), {
+ var map = new google.maps.Map(document.getElementById('locationMap'), {
+ center: new google.maps.LatLng({$mapDefaultLat}, {$mapDefaultLon}),
+ zoom: {$mapDefaultZoom},
disableDefaultUI: false,
mapTypeId: google.maps.MapTypeId.MAP,
});
bounds.extend(marker.position);
{/foreach}
- {/if}
// Fit map to bounds of all markers
map.fitBounds(bounds);
}
google.maps.event.removeListener(mapLoadedListener);
});
+
+ {else}
+
+ {/if}
+
{/if}
});