|
|
| Ligne 1 : |
Ligne 1 : |
| − | <!--<html><iframe src="http://www.agissons.developpement-durable.gouv.fr/spip.php?page=export&flash=12023_anim-sentier-littoral" width="780" height="521" frameborder="0"/></iframe></html>-->
| |
| − |
| |
| − | <!--<geoportal:map
| |
| − | instance="map1"
| |
| − | width="400px" height="400px"
| |
| − | defaultLayers="['ORTHOIMAGERY.ORTHOPHOTOS','GEOGRAPHICALGRIDSYSTEMS.MAPS']"
| |
| − | defaultLayersOptions="{'GEOGRAPHICALGRIDSYSTEMS.MAPS':{opacity:0.5}}"
| |
| − | layerSwitcherMode="off"
| |
| − | toolboxMode="off"
| |
| − | infoPanelMode="false"
| |
| − | mode="mini"
| |
| − | lon=3.1009 lat=45.77679999999998 zoom=6
| |
| − | >
| |
| − | <html>
| |
| − | var stylePopup= new OpenLayers.StyleMap({
| |
| − | "default": new OpenLayers.Style(
| |
| − | OpenLayers.Util.applyDefaults({
| |
| − | 'externalGraphic': "${getUrl}",
| |
| − | 'graphicOpacity': 1.0,'graphicWidth': 21,'graphicHeight': 25
| |
| − | }, OpenLayers.Feature.Vector.style["default"]),
| |
| − | {
| |
| − | context: {
| |
| − | getUrl: function(feature){
| |
| − | var url=feature.attributes.pictoUrl;
| |
| − | return url;
| |
| − | }
| |
| − | }
| |
| − | }
| |
| − | ),
| |
| − | });
| |
| − | var lPopups= new OpenLayers.Layer.Vector("Projets", {
| |
| − | styleMap:stylePopup, opacity:1.0, visibility:true
| |
| − | });
| |
| − | map1.getMap().addLayer(lPopups);
| |
| − |
| |
| − | var clickOptions= {
| |
| − | onSelect: function(f) {
| |
| − | if (f.attributes.description) {
| |
| − | f.popup= new OpenLayers.Popup.FramedCloud(
| |
| − | "id",
| |
| − | f.geometry.getBounds().getCenterLonLat(),
| |
| − | new OpenLayers.Size(50,50),
| |
| − | f.attributes.description, null, true
| |
| − | );
| |
| − | map1.getMap().addPopup(f.popup);
| |
| − | }
| |
| − | },
| |
| − | onUnselect: function (f) {
| |
| − | if (f.popup) {
| |
| − | map1.getMap().removePopup(f.popup);
| |
| − | delete f.popup;
| |
| − | }
| |
| − | },
| |
| − | autoActivate: true
| |
| − | };
| |
| − | var vectorLayers= map1.getMap().getLayersByClass('OpenLayers.Layer.Vector');
| |
| − | var clickControl= new OpenLayers.Control.SelectFeature(vectorLayers, clickOptions);
| |
| − | map1.getMap().addControl(clickControl);
| |
| − | var pt = new OpenLayers.Geometry.Point(2.961094665796523,45.997043316548705).transform(OpenLayers.Projection.CRS84,map1.getMap().getProjection());
| |
| − | var f = new OpenLayers.Feature.Vector(pt);
| |
| − | f.attributes.description = "test2";
| |
| − | f.attributes.pictoUrl = "http://api.ign.fr/geoportail/api/js/2.0.3/img/marker-gold.png";
| |
| − | lPopups.addFeatures([f]);
| |
| − | </html>
| |
| − | </geoportal:map> -->
| |
| − |
| |
| − | Essai 2 (dernière version IGN fournie par DR) :
| |
| | <geoportal:map | | <geoportal:map |
| | instance="map1" | | instance="map1" |
| Ligne 74 : |
Ligne 7 : |
| | infoPanelMode="false" | | infoPanelMode="false" |
| | mode="mini" | | mode="mini" |
| − | lon="2.8805740806171998" lat="49.316843865822705" zoom="10" | + | lon="2.5949295493671998" lat="49.2155806945199" zoom="10" |
| | > | | > |
| | <geoportal:markers | | <geoportal:markers |
| Ligne 80 : |
Ligne 13 : |
| | > | | > |
| | <geoportal:marker | | <geoportal:marker |
| − | lon="2.8356216824511393" lat="49.41666341729648" | + | lon="2.613148537919889" lat="49.25917322949024" |
| | pictoUrl="../extensions/GeoportailApi/api/js/2.0.3/img/marker-gold.png"> | | pictoUrl="../extensions/GeoportailApi/api/js/2.0.3/img/marker-gold.png"> |
| − | compiegne
| + | Test 13/06/2013 |
| | </geoportal:marker> | | </geoportal:marker> |
| | </geoportal:markers> | | </geoportal:markers> |
| | </geoportal:map> | | </geoportal:map> |