dynamic / silverstripe-locator

SilverStripe Locator Module. Show locations on a map. Search by geoposition.
http://www.dynamicagency.com/labs/silverstripe-locator-module/
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

Default installation map is empty (white screen) #196

Closed rjframe closed 5 years ago

rjframe commented 5 years ago

After the initial/default setup the $markerImage in LocatorController.php is empty, so the generated function call is a syntax error due to the extra comma so the map does not load.

$(function(){
    $('#map-container').storeLocator({
        fullMapStart: true, storeLimit: -1, maxDistance: true,
        dataLocation: '/project-k55/xml.xml?Address=47327&action_doFilterLocations=Search',
        listTemplatePath: '/resources/vendor/dynamic/silverstripe-locator/client/location-list-description.html?m=1534181382',
        infowindowTemplatePath: '/resources/vendor/dynamic/silverstripe-locator/client/infowindow-description.html?m=1534181382',
        ,                // <--- This is {$markerImage} -----
        originMarker: true,
        featuredLocations: false,
        slideMap: false,
        distanceAlert: -1,
        lengthUnit: 'm',
        defaultLat: 39.8192672,
        defaultLng: -85.1686743,
        mapID: 'map',
        locationList: 'loc-list',
        mapSettings: {
            zoom: 12,
            mapTypeId: google.maps.MapTypeId.ROADMAP,
            disableDoubleClickZoom: true,
            scrollwheel: false,
            navigationControl: false,
            draggable: false,
        }
    });
});