/** * Renders a point. * * @param \Ivory\GoogleMap\Base\Point $point The point. * * @return string The JS output. */ public function render(Point $point) { return sprintf('%s = new google.maps.Point(%s, %s);' . PHP_EOL, $point->getJavascriptVariable(), $point->getX(), $point->getY()); }
public function testDefaultState() { $this->assertSame('point_', substr($this->point->getJavascriptVariable(), 0, 6)); $this->assertSame(0, $this->point->getX()); $this->assertSame(0, $this->point->getY()); }