1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| <script
type="text/javascript"
src="http://api.ign.fr/geoportail/api?v=1.0-e&key=2375114714878804406&instance=MyMap">
<!-- -->
</script>
<script type="text/javascript">
<!--
function initGeoportalMap() {
// On implémente la carte
geoportalLoadMyMap("GeoportalMyMapDiv", "normal");
//ajout de la couche carte IGN
MyMap.addGeoportalLayer('GEOGRAPHICALGRIDSYSTEMS.MAPS:WMSC',{opacity:1.0});
//ajout de la couche photo aerienne
MyMap.addGeoportalLayer('ORTHOIMAGERY.ORTHOPHOTOS:WMSC',{visibility:false});
//position du centre de la carte
MyMap.getMap().setCenterAtLonLat(7.187, 48.682, 8);
MyMap.getMap().events.register("click", MyMap.getMap(), function(e){
var pos = MyMap.getMap().getLonLatFromViewPortPx(e.xy);
alert(pos);
}
);
}
-->
</script>
</head>
<body>
<div id="GeoportalMyMapDiv" style="width:800px;height:600px;"></div> |
Partager