/** * Create lat lngs for the definition. * * @param Polyline $definition The multi polyline. * @param \Model $model The definition model. * * @return void */ protected function createLatLngs(Polyline $definition, \Model $model) { foreach (deserialize($model->multiData, true) as $ring => $data) { $latLngs = array_map(function ($row) { return LatLng::fromString($row); }, explode("\n", $data)); $definition->addLatLngs($latLngs, $ring); } }
/** * Construct. * * @param string $identifier The identifier. * @param LatLngBounds $latLngBounds The bounds which defines the rectangle. */ public function __construct($identifier, LatLngBounds $latLngBounds) { parent::__construct($identifier); $this->bounds = $latLngBounds; }