Ejemplo n.º 1
0
    public function testRenderJsContainerMarkerCluster()
    {
        $map = new Map();
        $map->setJavascriptVariable('map');
        $map->addMarker($marker = new Marker());
        $marker->setJavascriptVariable('marker');
        $marker->getPosition()->setJavascriptVariable('marker_position');
        $expected = <<<EOF
map_container.markers.marker = marker = new google.maps.Marker({"position":marker_position,"map":map});

EOF;
        $this->assertSame($expected, $this->mapHelper->renderJsContainerMarkerCluster($map));
    }