/** * among the other variables we need to have the column names for longitude and latitude added in here * * @param array $options */ public function __construct($options) { Ch::ek($options, $this->requiredFields); $this->latitudeColumn = $options['latitudeColumn']; $this->longitudeColumn = $options['longitudeColumn']; parent::__construct($options); }
/** * @expectedException \RuntimeException */ public function testCanSetListData() { $lat = 34.1777347; $lon = -118.4893159; $point = new PointField([]); $point->setData(['latitude' => $lat, 'longitude' => $lon]); $this->assertTrue(is_array($point->getData())); $this->assertCount(2, $point->getData()); $this->assertEquals($point->getData()['latitude'], $lat); $point->setData('nothing'); }