Jquery在一个页面中调用多个映射

时间:2017-12-12 19:03:37

标签: javascript jquery function object maps

如何在没有错误的情况下在手风琴上显示多个地图,出现错误,我点击了手风琴:

未注册的过滤回调已经注册

  <script src="https://xxxxxxx/api/js/?languageTranslation={{ languageGoogleMaps }}_{{ country }}&languageGoogleMaps={{ languageGoogleMaps }}&callback=initializeMap"></script>

    <script>

        var options = {
                brands: 'xxx',
                country: '{{ country }}',
                enableScrollwheel: true,
                filters: '{{ product.ripCode }}',
                channel: 'CSO_Vista_{{ country }}_{{ languageGoogleMaps }}_Lub',
                poiTypes: $('#map-canvas.active').attr('name'),
                rendererBreakScale: 12,
                simpleRendererPointSize: 12,
                simpleRendererMinPointSize: 7
                };

        function initializeMap() {
             var map = new api.maps.Map('map-canvas', options);
        }
    </script>
(function (actions) {
       actions.switchMapscript = function () {

        $(this).find('li').on('click', function () {

            $('#map-canvas.active').removeClass('active');
            $("#map-canvas_T019").addClass('active');
            initializeMap();

        });
     };
    })(actions);

0 个答案:

没有答案