/trunk/widget/modules/saisie/squelettes/biodiversite34/js/biodiversite34.js |
---|
30,14 → 30,22 |
equalTo: "#courriel" |
}, |
milieu : "required", |
latitude : "required", |
longitude : "required" |
latitude : { |
required: true, |
range: [-90, 90]}, |
longitude : { |
required: true, |
range: [-180, 180]}, |
date : { |
required: true, |
date: true}, |
taxon : "required" |
} |
}); |
$("#date").datepicker($.datepicker.regional['fr']); |
$("#courriel-confirmation").bind('paste', function(e) { |
$("#courriel_confirmation").bind('paste', function(e) { |
$("#dialogue-bloquer-copier-coller").dialog(); |
return false; |
}); |
52,7 → 60,7 |
'onStart' : function(e) { |
arreter(e); |
$("#gg-map-localisation").height($(window).height() - 100); |
$("#gg-map-carte").height($(window).height() - 230); |
$("#gg-map-carte").height($(window).height() - 200); |
$("#gg-map-localisation").width($(window).width() - 100); |
}, |
'onComplete' : function() { |
258,7 → 266,6 |
if (status == google.maps.GeocoderStatus.OK) { |
if (responses && responses.length > 0) { |
mettreAJourMarkerAdresse(responses[0].formatted_address); |
console.log(responses); |
} else { |
mettreAJourMarkerAdresse("Impossible de trouver d'adresse pour cette position."); |
} |
274,11 → 281,20 |
} |
function mettreAJourMarkerPosition(latLng) { |
document.getElementById('marqueur-coordonnees').innerHTML = [ |
latLng.lat().toFixed(5), |
latLng.lng().toFixed(5) |
].join(', '); |
$("#marqueur-coordonnees").data('latLon', {'lat' : latLng.lat().toFixed(5), 'lon' : latLng.lng().toFixed(5)}); |
var lat = latLng.lat().toFixed(5); |
var lon = latLng.lng().toFixed(5); |
document.getElementById('marqueur-wgs84').innerHTML = [lat, lon].join(', '); |
$("#marqueur-coordonnees").data('latLon', {'lat' : lat, 'lon' : lon}); |
Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"; |
Proj4js.defs["EPSG:2154"]="+title=RGF93 / Lambert-93 +proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs "; |
var source = new Proj4js.Proj('EPSG:4326');// Coordonnées source : WGS 84 |
var dest = new Proj4js.Proj('EPSG:2154');// Coordonnées destination : Lambert 93 |
var p = new Proj4js.Point(lon+','+lat);//lon+','+lat any object will do as long as it has 'x' and 'y' properties |
Proj4js.transform(source, dest, p); |
//Proj4js.reportError = function(msg) {alert(msg);} |
//console.log(p.toString()); |
document.getElementById('marqueur-lambert93').innerHTML = [p.x.toFixed(0)+' '+dest.units, p.y.toFixed(0)+' '+dest.units].join(', '); |
} |
function mettreAJourMarkerAdresse(str) { |
/trunk/widget/modules/saisie/squelettes/biodiversite34/biodiversite34.tpl.html |
---|
21,7 → 21,7 |
<!-- Javascript : bibliothèques --> |
<!-- Google Map v3 --> |
<script type="text/javascript" src="https://getfirebug.com/firebug-lite.js"></script> |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.3&sensor=true"></script> |
<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.5&sensor=true"></script> |
<!-- Jquery --> |
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/1.5.1/jquery-1.5.1.min.js"></script> |
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/jquery-ui/1.8.13/js/jquery-ui-1.8.13.custom.min.js"></script> |
29,6 → 29,8 |
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/fancybox/1.3.4/jquery.fancybox-1.3.4.pack.js"></script> |
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/validate/1.8.1/jquery.validate.min.js"></script> |
<script type="text/javascript" src="http://www.tela-botanica.org/commun/jquery/validate/1.8.1/messages_fr.js"></script> |
<!-- <script type="text/javascript" src="http://www.tela-botanica.org/commun/proj4js/1.0.1/projCode/lcc.js"></script> --> |
<script type="text/javascript" src="http://www.tela-botanica.org/commun/proj4js/1.0.1/proj4js-compressed.js"></script> |
<script src="<?=$url_base?>saisie?projet=biodiversite34&service=taxons" type="text/javascript"></script> |
<script type="text/javascript" src="<?=$url_base?>modules/saisie/squelettes/biodiversite34/js/biodiversite34.js"></script> |
70,6 → 72,7 |
<li> |
<label for="milieu"><span class="obligatoire" title="Champ obligatoire">*</span> Milieu</label> |
<select id="milieu" name="milieu"> |
<option value="">Sélectionner un milieu</option> |
<?php foreach ($milieux as $milieu => $description) : ?> |
<option value="<?=$milieu?>" <?=($description != '') ? 'title="'.$description.'"': '' ?>><?=$milieu?></option> |
<?php endforeach; ?> |
89,12 → 92,13 |
<legend>3. Observation</legend> |
<ul> |
<li> |
<label for="date">Date</label> |
<label for="date"><span class="obligatoire" title="Champ obligatoire">*</span> Date</label> |
<input id="date" name="date" type="text" value="" /> |
</li> |
<li> |
<label for="taxon">Espèce</label> |
<label for="taxon"><span class="obligatoire" title="Champ obligatoire">*</span> Espèce</label> |
<select id="taxon" name="taxon"> |
<option value="">Sélectionner un taxon</option> |
<?php foreach ($taxons as $taxon) : ?> |
<option value="<?=$taxon['num_nom_sel']?>" title="<?=$taxon['nom_sel'].($taxon['nom_fr_autre'] != '' ? ' - '.$taxon['nom_fr_autre'] : '' )?>"><?=$taxon['nom_fr']?></option> |
<?php endforeach; ?> |
130,7 → 134,7 |
</li> |
<li> |
<span class="champ">Coordonnées du marqueur</span> |
<span id="marqueur-coordonnees"></span> |
<span id="marqueur-coordonnees"><span title="Système géodésique mondial, révision de 1984 - Coordonnées non projetées">WGS84 : <span id="marqueur-wgs84"></span></span> / <span title="Système géodésique RGF93 - Coordonnées en projection Lambert 93">Lambert 93 : <span id="marqueur-lambert93"></span></span></span> |
</li> |
<li> |
<span class="champ">Adresse correspondante la plus proche</span> |
/trunk/widget/modules/saisie/squelettes/biodiversite34/css/biodiversite34.css |
---|
1,9 → 1,5 |
@CHARSET "UTF-8"; |
html { |
overflow:hidden; |
} |
body { |
overflow:hidden; |
padding:0; |
margin:0; |
width:100%; |
152,9 → 148,9 |
} |
#gg-map-info ul { |
list-style-type:none; |
padding-left:0; |
} |
#gg-map-info li { |
padding-left:0; |
margin:0; |
} |
#gg-map-info ul, #gg-map-info button{ |