Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1339 Rev 1341
Line 171... Line 171...
171
	private static function estSensible(&$point) {
171
	private static function estSensible(&$point) {
172
		$sensible = isset($point['mots_cles_texte']) && substr_count($point['mots_cles_texte'], 'sensible') != 0;
172
		$sensible = isset($point['mots_cles_texte']) && substr_count($point['mots_cles_texte'], 'sensible') != 0;
173
		return $sensible;
173
		return $sensible;
174
	}
174
	}
Line 175... Line 175...
175
	
175
	
176
	private static function formaterNomStation(&$point) {
176
	private static function formaterNomStation(&$point, $type_emplacement) {
177
		$station = '';
177
		$station = '';
178
		if($point['station'] != '' && $point['station'] != '000null') {
178
		if($type_emplacement == 'stations' && $point['station'] != '' && $point['station'] != '000null') {
179
			$station = $point['station'];
179
			$station = $point['station'];
180
		} else {
180
		} else {
181
			$station = $point['zone_geo'].(($point['id_zone_geo'] != '' && $point['id_zone_geo'] != '000null') ? ' ('.self::formaterNomZoneGeo($point['id_zone_geo']).')' : '');
181
			$station = $point['zone_geo'].(($point['id_zone_geo'] != '' && $point['id_zone_geo'] != '000null') ? ' ('.self::formaterNomZoneGeo($point['id_zone_geo']).')' : '');
Line 198... Line 198...
198
		
198
		
199
		if(self::coordonneesSontNulles($point) || self::estSensible($point)) {
199
		if(self::coordonneesSontNulles($point) || self::estSensible($point)) {
200
			$point_allege = array();
200
			$point_allege = array();
201
			$point_allege['id'] = self::MARQUEUR_COMMUNE.':'.$point['wgs84_latitude'].'|'.$point['wgs84_longitude'];
201
			$point_allege['id'] = self::MARQUEUR_COMMUNE.':'.$point['wgs84_latitude'].'|'.$point['wgs84_longitude'];
202
			$point_allege['type_emplacement'] = 'communes';
202
			$point_allege['type_emplacement'] = 'communes';
203
			$point_allege['nom'] = self::formaterNomStation($point);
203
			$point_allege['nom'] = self::formaterNomStation($point, 'communes');
204
			$point_allege['lat'] = (float)$point['wgs84_latitude'];
204
			$point_allege['lat'] = (float)$point['wgs84_latitude'];
Line 205... Line 205...
205
			$point_allege['lng'] = (float)$point['wgs84_longitude'];
205
			$point_allege['lng'] = (float)$point['wgs84_longitude'];
206
			
206
			
207
			$point = $point_allege;
207
			$point = $point_allege;
208
		} else {
208
		} else {
209
			$point_allege = array();
209
			$point_allege = array();
210
			$point_allege['id'] = self::MARQUEUR_STATION.':'.$point['latitude'].'|'.$point['longitude'];
210
			$point_allege['id'] = self::MARQUEUR_STATION.':'.$point['latitude'].'|'.$point['longitude'];
211
			$point_allege['type_emplacement'] = 'stations';
211
			$point_allege['type_emplacement'] = 'stations';
212
			$point_allege['nom'] = self::formaterNomStation($point);
212
			$point_allege['nom'] = self::formaterNomStation($point, 'stations');
Line 213... Line 213...
213
			$point_allege['lat'] = (float)$point['latitude'];
213
			$point_allege['lat'] = (float)$point['latitude'];
214
			$point_allege['lng'] = (float)$point['longitude'];
214
			$point_allege['lng'] = (float)$point['longitude'];