2011-06-13 13:27:29 +00:00
< h2 > Localisation géographique< / h2 >
< div class = "paragraph" >
2011-05-06 14:34:12 +00:00
< div id = "infogeo" class = "clearfix" >
2011-06-13 13:27:29 +00:00
< div id = "infogeo_txt" >
2011-05-06 14:34:12 +00:00
< span id = geolocalisation >
< b > Information géographique :< / b > < br / >
Latitude : <?php echo geoLocalisationLib :: dec2dms ( $this -> infos -> GeoLat ) ?> (<?php echo $this -> infos -> GeoLat ; ?> )< br />
Longitude : <?php echo geoLocalisationLib :: dec2dms ( $this -> infos -> GeoLon ) ?> (<?php echo $this -> infos -> GeoLon ; ?> )< br />
< / span >
< a id = "lien-google" href = " <?php echo $this -> google_map_link ; ?> " target = "_blank" >
Afficher l' adresse sur Google Map © < / a > < br / >
< br / >
< b > Code commune / Rivoli :< / b > < br / >
<?php print $this -> infos -> Dept . ' ' . $this -> infos -> codeCommune . ' / ' . $this -> infos -> Rivoli ; ?>
2011-10-17 09:38:38 +00:00
<?php
if (count($this->infos->InfosIris)>0){
$InfosIris = $this->infos->InfosIris;
$codComIris = str_replace($InfosIris->codIris, '', $InfosIris->codComIris);
?>
< br / > < br / > < b > Iris :< / b >
<?php
if ($InfosIris->codIris*1 == 0){
?>
< br / > Commune non découpée en Iris
<?php } else { ?>
< br /> Code : <? = $codComIris ?> <? = $InfosIris -> codIris ?>
< br /> Libellé : < a title = "Consulter le plan d'assemblage de la commune" href = " <? = $this -> url ( array ( 'controller' => 'identite' , 'action' => 'iris' , 'code' => $codComIris ), null , true ) ?> " target = "_blank" > <? = $InfosIris -> libIris ?> </ a >
< img title = " <? = $InfosIris -> typIris ?> " style = "vertical-align:middle;" src = "/themes/default/images/info.gif" >
<?php } ?>
<?php } ?>
2011-05-06 14:34:12 +00:00
< / div >
2011-12-07 15:49:05 +00:00
<?php if ( ! $this -> disable ) : ?>
2011-05-10 06:46:09 +00:00
<?php if ( $this -> source == 'google' ) : ?>
< div id = "infogeo_photo" >
< div id = "legende-photo" style = "display: block;" >
Cliché à l'approche de l'adresse postale.
< / div >
2011-05-06 14:34:12 +00:00
< div >
< img id = "pp-cb-thumb" src = "http://cbk0.google.com/cbk?output=thumbnail&w=150&h=69&ll= <?php echo $this -> infos -> GeoLat . ',' . $this -> infos -> GeoLon ?> " width = "300px" height = "128px" />
< / div >
< / div >
< script type = "text/javascript"
src="http://maps.google.com/maps?file=api& v=2& key=<?php echo $this -> googleKey ; ?> ">
< / script >
< script type = "text/javascript" >
function affichePhoto() {
<?php
if ($this->infos->GeoPrecis < 7 ) {
print 'var geoCoder = new GClientGeocoder;';
print 'geoCoder.getLocations("'.
$this->infos->AdresseNum.' '.
$this->infos->AdresseRue.' '.
$this->infos->CP.' '.
$this->infos->Ville.'", geoCodeCB);';
} else {
print 'var ll = new GLatLng('.$this->infos->GeoLat.', '.$this->infos->GeoLon.');';
print 'doShowPanoData(ll);';
}
?>
}
function geoCodeCB(reponse) {
if (reponse & &
reponse.Status.code == 200 & &
reponse.Placemark.length == 1 & &
reponse.Placemark[0].AddressDetails.Accuracy > 5) {
var lat = reponse.Placemark[0].Point.coordinates[1];
var lon = reponse.Placemark[0].Point.coordinates[0];
var ll = new GLatLng(lat, lon);
$("#geolocalisation").
replaceWith("< b > Information géographique :< / b > < br / > " +
"Latitude : " + lat + "< br / > " +
"Longitude : " + lon + "< br / > "
);
$("#lien-google").
replaceWith(
"< a href = http://maps.google.fr/maps?q=" +
"<?php echo $this -> info -> AdresseNum . '+' . $this -> infos -> AdresseRue . '+' .
$this->infos->CP.'+'.$this->infos->Ville;?>" +
" target=_blank>" +
"Afficher l'adresse sur Google Map © < / a > "
);
doShowPanoData(ll);
}
}
$(document).ready(function() {
if ($('#pp-cb-thumb').length) {
affichePhoto();
}
2011-05-09 08:57:23 +00:00
});
< / script >
<?php elseif ( $this -> source == 'mappy' ) : ?>
< div >
< img id = "pp-cb-thumb" width = "300px" / >
< / div >
< script src = "http://axe.mappy.com/1v1/init/get.aspx?auth= <?php echo $this -> token ; ?> &version=2.01&solution=ajax" ></ script >
< script type = "text/javascript" >
$(document).ready(function() {
var photoService = new Mappy.api.visiocity.PhotoService();
var geo = new Mappy.api.geolocation.Geocoder();
var address = "<?php echo $this -> AdresseNum ; ?> <?php echo $this -> AdresseRue ; ?> <?php echo $this -> AdresseVille ; ?> ";
geo.geocode(address,
function(result) {
photoService.search(result[0], "f", serviceHandler);
},
function(error) {
});
var serviceHandler = function(result) {
if (result instanceof Mappy.api.visiocity.Frontage) {
var current = result.getCurrent();
var img = $('< img src = "' + current . getURL ( 320 , null ) +
'" alt="' + current.getDescription() +
'" width="300px" />');
$('#pp-cb-thumb').replaceWith(img);
}
}
2011-05-06 14:34:12 +00:00
}
);
2011-05-09 08:57:23 +00:00
< / script >
<?php endif ; ?>
2011-12-07 15:49:05 +00:00
<?php endif ; ?>
2011-06-13 13:27:29 +00:00
< / div >
2011-05-06 14:34:12 +00:00
< / div >