src/Helper/MapHelper.php
public function renderJsContainerInit(Map $map)
    {
        $this->jsonBuilder
            ->reset()
            ->setJsonEncodeOptions(JSON_FORCE_OBJECT)
            // Map
            ->setValue('[map]', null)
            // Base
            ->setValue('[coordinates]', array())
            ->setValue('[bounds]', array())
            ->setValue('[points]', array())
            ->setValue('[sizes]', array())
            // Overlays
            ->setValue('[circles]', array())
            ->setValue('[encoded_polylines]', array())
            ->setValue('[ground_overlays]', array())
            ->setValue('[polygons]', array())
            ->setValue('[polylines]', array())
            ->setValue('[rectangles]', array())
            ->setValue('[info_windows]', array())
            ->setValue('[marker_images]', array())
            ->setValue('[marker_shapes]', array())
            ->setValue('[markers]', array())
            ->setValue('[marker_cluster]', null)
            // Layers
            ->setValue('[kml_layers]', array())
            // Event Manager
            ->setValue('[event_manager][dom_events]', array())
            ->setValue('[event_manager][dom_events_once]', array())
            ->setValue('[event_manager][events]', array())
            ->setValue('[event_manager][events_once]', array())
            // Internal
            ->setValue('[closable_info_windows]', array())
            ->setValue(
                '[functions][to_array]',
                'function (object) { var array = []; for (var key in object) { array.push(object[key]); } return array; }',
                false
            );

        return sprintf('%s = %s;'.PHP_EOL, $this->getJsContainerName($map), $this->jsonBuilder->build());
    }
public function renderJsContainerInit(Map $map)
    {
        $this->jsonBuilder
            ->reset()
            ->setJsonEncodeOptions(JSON_FORCE_OBJECT)
            // Map
            ->setValue('[map]', null)
            // Base
            ->setValue('[coordinates]', array())
            ->setValue('[bounds]', array())
            ->setValue('[points]', array())
            ->setValue('[sizes]', array())
            // Overlays
            ->setValue('[circles]', array())
            ->setValue('[encoded_polylines]', array())
            ->setValue('[ground_overlays]', array())
            ->setValue('[polygons]', array())
            ->setValue('[polylines]', array())
            ->setValue('[rectangles]', array())
            ->setValue('[info_windows]', array())
            ->setValue('[marker_images]', array())
            ->setValue('[marker_shapes]', array())
            ->setValue('[markers]', array())
            ->setValue('[marker_cluster]', null)
            // Layers
            ->setValue('[kml_layers]', array())
            // Event Manager
            ->setValue('[event_manager][dom_events]', array())
            ->setValue('[event_manager][dom_events_once]', array())
            ->setValue('[event_manager][events]', array())
            ->setValue('[event_manager][events_once]', array())
            // Internal
            ->setValue('[closable_info_windows]', array())
            ->setValue(
                '[functions][to_array]',
                'function (object) { var array = []; for (var key in object) { array.push(object[key]); } return array; }',
                false
            );

        return sprintf('%s = %s;'.PHP_EOL, $this->getJsContainerName($map), $this->jsonBuilder->build());
    }
Renders the javascript container initialization (empty container).

@param \Ivory\GoogleMap\Map $map The map.

@return string The JS output.