我必须对商店和购物中心的概念进行建模。商店可能包含在商场内,也可能不包含在商场内。如果商店包含在商城中,它应该与父商城共享相同的地址/GeoMarket属性。但是,我还需要将商店的“商店编号”保存在Address_Line1中(或其他方式),但其他属性将保持不变。
public class Store
{
public int StoreId { get; set; }
public string Name { get; set; }
public string Address_Line1 { get; set; }
public string Addre
我使用过iphone os sdk中的地图框架和cloudmade中的routemap api,通过使用GPS提供的数据在地图上显示当前位置和其他信息是相当容易的。
我有一个建筑物(机场,商场等)的地图转换成某种瓷砖,我的问题是,什么是最好的方法来获得手机在建筑物内的当前位置?我知道GPS在建筑物内是不准确的,或者可能根本不起作用。
我用这种方式建立了购物中心和城市模型的关系:
商场模式:
public function city() {
return $this->belongsTo('App\City');
}
城市模式:
public function malls() {
return $this->hasMany( 'App\Mall' );
}
我在City类中有一个返回附近所有城市的方法:
public function getNearby($lat, $long, $r) {
// return array of id of cities in