Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 1063 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1063 Rev 1064
Line 125... Line 125...
125
		return $osmIdsInClause;
125
		return $osmIdsInClause;
126
	}
126
	}
Line 127... Line 127...
127
 
127
 
128
	private function construireRequeteUnion() {
128
	private function construireRequeteUnion() {
129
		$requeteTpl = 'SELECT osm_id, '.
129
		$requeteTpl = 'SELECT osm_id, '.
130
			"(($this->lon - X(centre)) * ($this->lon -X(centre)) + ($this->lat - Y(centre)) * ($this->lat - Y(centre))) AS distance ".
130
			"(($this->lon - centre_lng) * ($this->lon -centre_lng) + ($this->lat - centre_lat) * ($this->lat - centre_lat)) AS distance ".
131
			'FROM osm_zones_admin '.
131
			'FROM osm_zones_admin '.
132
			'WHERE niveau = %s '.
132
			'WHERE niveau = %s '.
133
			'ORDER BY distance ASC '.
133
			'ORDER BY distance ASC '.
134
			"LIMIT %s ";
134
			"LIMIT %s ";