#1 Thu 21 February 2013 19:11
- michel56
- Participant assidu
- Lieu: Lorient
- Date d'inscription: 14 Jul 2012
- Messages: 474
Projection CC48
Bonjour,
Je cherche à représenter un carroyage du Scan25 CC48 sur fond Openlayers. J'ai chargé proj4js.js paramétré la projection CC48 "EPSG:3948".
Mon carroyage au format geojson est correct mais je voudrais faire tourner légèrement mon fond de carte pour avoir le corroyage horizontalement.
Voir pièce jointe.
Cordialement.
Code:
    <script type="text/javascript">
function init()
{
    var map = new OpenLayers.Map({
        div: "map",
        projection: "EPSG:900913",
        displayProjection: "EPSG:3948",//Lambert93-CC48
        numZoomLevels: 18,
        isBaseLayer: true
    });
        var mapnik = new OpenLayers.Layer.OSM("OpenStreetMap","http://a.tile.openstreetmap.org/${z}/${x}/${y}.png",
                                                              "http://b.tile.openstreetmap.org/${z}/${x}/${y}.png",
                                                              "http://c.tile.openstreetmap.org/${z}/${x}/${y}.png",
        {
        attribution: "OSM - License CC-BY-SA ©2012 "
        }
        );
        map.addLayer(mapnik);
var SC25_2012_CC48_3948 = new OpenLayers.Layer.Vector("SC25_2012_CC48_3948", {
                projection: new OpenLayers.Projection("EPSG:3948"),
                strategies: [new OpenLayers.Strategy.Fixed()],
                protocol: new OpenLayers.Protocol.HTTP({
                    url: "SC25_2012_CC48_3948.geojson",
                    format: new OpenLayers.Format.GeoJSON()
                })
            });
        map.addLayer(SC25_2012_CC48_3948);
        
    map.addControl(new OpenLayers.Control.MousePosition());
    map.addControl(new OpenLayers.Control.LayerSwitcher());
    map.zoomToMaxExtent();
}
</script>Dernière modification par michel56 (Thu 21 February 2013 19:12)
Opérateur cartographique & DAO & PHP.
Hors ligne





