コード例 #1
0
    public function testRenderJsContainerGroundOverlays()
    {
        $map = new Map();
        $map->setJavascriptVariable('map');
        $map->addGroundOverlay($groundOverlay = new GroundOverlay('url'));
        $groundOverlay->setJavascriptVariable('ground_overlay');
        $groundOverlay->getBound()->setJavascriptVariable('ground_overlay_bound');
        $expected = <<<EOF
map_container.ground_overlays.ground_overlay = ground_overlay = new google.maps.GroundOverlay("url", ground_overlay_bound, {"map":map});

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