public function addLatLng($latLng, $ringIndex = 0)
    {
        if (is_scalar($latLng)) {
            $latLng = LatLng::fromNative($latLng);
        }

        Assertion::isInstanceOf($latLng, 'Netzmacht\LeafletPHP\Value\LatLng');

        $ringIndex                   = (int) $ringIndex;
        $this->latLngs[$ringIndex][] = $latLng;

        return $this;
    }
public function addLatLng($latLng, $ringIndex = 0)
    {
        if (is_scalar($latLng)) {
            $latLng = LatLng::fromNative($latLng);
        }

        Assertion::isInstanceOf($latLng, 'Netzmacht\LeafletPHP\Value\LatLng');

        $ringIndex                   = (int) $ringIndex;
        $this->latLngs[$ringIndex][] = $latLng;

        return $this;
    }
public function addLatLng ( $ latLng , $ ringIndex = 0 ) { if ( is_scalar ( $ latLng ) ) { $ latLng = LatLng :: fromNative ( $ latLng ) ; } Assertion :: isInstanceOf ( $ latLng , 'Netzmacht\LeafletPHP\Value\LatLng' ) ; $ ringIndex = ( int ) $ ringIndex ; $ this -> latLngs [ $ ringIndex ] [ ] = $ latLng ; return $ this ; }
Add a latitude longitude position.

This method differs from the Leaflet JS API! Instead of passing the shape as second argument you can define
the index of the ring.

@param LatLng|array|string $latLng    LatLng coordinate.
@param int                 $ringIndex The index of the ring.

@return $this
Add a latitude longitude position .