Free javascript Hosting


mfy-france.js

Uploaded on Jan 08 2022 21:51 by vdechartres

// local callers



var minZoom = 6;

var maxZoom = 20;

var localmap = 'pays.france';

var localtags = noelaparis;

var wfs1 = 'worldmap:france.patrim.mh.toutpoint';

var wfs2 = 'worldmap:france.poi.barrest';

var init = {"lat": 47.2, "lng": 2.2, "zoom": 6 }

var southWest = L.latLng(39, -7),

northEast = L.latLng(52, 12),

bounds = L.latLngBounds(southWest, northEast);





// menus lateraux



// contents

var left = '<h3>Activer la géolocalisation (allow geolocation)</h3>';

var right = '<h1>Slide Menu (Right)</h1>';



var contents = '<p>Ajouter (add) mappingforyou.eu à l adresse (to the address)</p>';

contents += '<h3>chrome://flags/#unsafely-treat-insecure-origin-as-secure</h3>';



contents += '<h3>Cartes d Europe (maps of Europe)</h3>';

contents += '<a href="http://mappingforyou.eu/benelux/?zoom=8&lat=50.586&lng=5.002">๐Ÿ‡ง๐Ÿ‡ชBelgië </a>';

contents += '<a href="http://mappingforyou.eu/deutschland">๐Ÿ‡ฉ๐Ÿ‡ช Deutschland </a>';

contents += '<a href="http://mappingforyou.eu/espana">๐Ÿ‡ช๐Ÿ‡ธ Espana </a>';

contents += '<a href="http://mappingforyou.eu/icelandfaroe/?zoom=9&lat=62.004&lng=-6.371">๐Ÿ‡ฉ๐Ÿ‡ฐ Føroyar </a>';



contents += '<a href="http://mappingforyou.eu/france">๐Ÿ‡ซ๐Ÿ‡ท France </a>';

contents += '<a href="http://mappingforyou.eu/atlasfrancilien">๐Ÿ‡ซ๐Ÿ‡ท Paris - Atlas francilien </a>';

contents += '<a href="http://mappingforyou.eu/ukir/?zoom=8&lat=53.439&lng=-6.891">๐Ÿ‡ฎ๐Ÿ‡ช Ireland </a>';



contents += '<a href="http://mappingforyou.eu/icelandfaroe/?zoom=7&lat=64.86&lng=-18.781">๐Ÿ‡ฎ๐Ÿ‡ธ Ísland </a>';



contents += '<a href="http://mappingforyou.eu/italia">๐Ÿ‡ฎ๐Ÿ‡น Italia </a>';

contents += '<a href="http://mappingforyou.eu/benelux/?zoom=8&lat=52.463&lng=5.002">๐Ÿ‡ณ๐Ÿ‡ฑ Nederland </a>';

contents += '<a href="http://mappingforyou.eu/paysalpins/?zoom=8&lat=47.828&lng=13.900">๐Ÿ‡ฆ๐Ÿ‡น Oesterreich </a>';

contents += '<a href="http://mappingforyou.eu/portugal">๐Ÿ‡ต๐Ÿ‡น Portugal </a>';

contents += '<a href="http://mappingforyou.eu/paysalpins/?zoom=8&lat=47.093&lng=9.110">๐Ÿ‡จ๐Ÿ‡ญSchweiz </a>';

contents += '<a href="http://mappingforyou.eu/ukir/?zoom=7&lat=53.63&lng=-4.499">๐Ÿ‡ฌ๐Ÿ‡ง United Kingdom </a>';



contents += '<h3>Cartes du monde (maps of the world)</h3>';

contents += '<a href="http://mappingforyou.eu/monde">๐Ÿ‡บ๐Ÿ‡ณ Monde </a>';

contents += '<a href="http://mappingforyou.eu/histoire">๐Ÿ‡บ๐Ÿ‡ณ History </a>';

contents += '<a href="http://mappingforyou.eu/usa">๐Ÿ‡บ๐Ÿ‡ธ United States </a>';

contents += '<a href="http://mappingforyou.eu/antillesguyane">๐Ÿ‡ซ๐Ÿ‡ท Antilles Guyane </a>';

contents += '<a href="http://mappingforyou.eu/reunionmayotte">๐Ÿ‡ซ๐Ÿ‡ท Réunion Mayotte </a>';



contents += '<h3>Sources cartographiques (origin of the data)</h3>';



contents += '<p>(C) Openstreetmap contributors, ESRI, Diva-Gis, EAA, Ministère de la Culture français, plateforme opendata du gouv.français, CAUE départementaux de France, IGN France, British Crown Copyright, USDA, Ministero Italiano della Cultura, dell Ambiante, Gobierno espanol (IGN), http://www2.jpl.nasa.gov/srtm (NASA SRTM 2 hillshade)</p>';

contents += '<h3>Contact (contact)</h3>';



contents += '<p>Vincent Dechartres, Mapping for you, France, mail(-at-)mappingforyou.eu</p>';

contents += '<h3>Fonctionnalités (features)</h3>';

contents += '<p>Ouverture de Geojson, GPX, Shapefile sous format zip. Dessin de points, lignes, aires, ajout d un commentaire basique, et téléchargement en GPX et GeoJson. (opening geojson, GPX and shape files, drawing shapes of all kinds, basic labelling and downloading them in gpx or geojson)</p>';

contents += '<input type="text" id="number" value="15"><button onclick="myFunction()">Buffer desactivé</button><p id="demo"></p>';

contents += ' <p>Envoyer SHP zippé</p> <input type="file" id="file"><input type="submit" id="submit"> <span id="warning"></span></p>';

contents += '<h3>Légende de Corine Land Cover (key)</h3>';

contents += ' <img src="../icons/legend.png">';

// contents += '<h3>Usage</h3>';

// contents += '<p>L.control.slideMenu("&lt;p&gt;test&lt;/p&gt;").addTo(map);</p>';

// contents += '<h3>Arguments</h3>';

// contents += '<p>L.control.slideMenu(&lt;String&gt;innerHTML, &lt;SlideMenu options&gt;options?)</p>';

// contents += '<h3>Options</h3>';

// contents += '<p>position<br>';

// contents += 'menuposition<br>';

// contents += 'hidden</p>';

// contents += '<h3>Methods</h3>';

// contents += '<p>setContents(&lt;String&gt;innerHTML)</p>';

// contents += '<h3>License</h3>';





// left

L.control.slideMenu(left + contents).addTo(map);



// right

// var slideMenu = L.control.slideMenu('', {position: 'topright', menuposition: 'topright', width: '30%', height: '400px', delay: '50', icon: 'fa-chevron-left'}).addTo(map);

// slideMenu.setContents(right + contents);









// Essai de groupement non encore réussi



var monum = L.WMS.overlay('http://mappingforyou.eu/geoserver/wms?', {

layers: 'france.patrim.mhareas',

'format': 'image/png',

'transparent': true,

});

var mon = L.layerGroup([featureLayer, monum]);





// Categories



// panel layers

// base layers fonctionne sur la même architecture, mais je n'en veux pas donc caché

var baseLayers = [

// {

// name: "Carte paysagère",

// layer: vdlibraries

// },

];



var overLayers = [

{

group: " ",

layers: [

{

name: "Vue aérienne (aerial view)",

layer: L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', {

maxZoom:20,



})

},

{

active: false,

name: "Heberg. (accommodation)",

icon: '<i class="icon icon-tente"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.poi.hebergement',

format: 'image/png',

transparent: true,

maxZoom:20,

//minZoom: 13

}

]

}

},

{

active: false,

name: "Restauration (eating out)",

icon: '<i class="icon icon-restaurant"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.poi.barrest',

format: 'image/png',

transparent: true,

maxZoom:20,

//minZoom: 13

}

]

}

},

// {

// active: false,

// name: "Restauration (test wfs)",

// icon: '<i class="icon icon-restaurant"></i>',

// layer: featureLayer2,

// },

{

active: false,

name: "Alimentation (food goods)",

icon: '<i class="icon icon-supermarche"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.poi.stores',

format: 'image/png',

transparent: true,

maxZoom:20,

//minZoom: 13

}

]

}

},



{

active: false,

name: "Services/urg. (serv./emerg.)",

icon: '<i class="icon icon-emergency"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.poi.services',

format: 'image/png',

transparent: true,

maxZoom:20,

//minZoom: 13

}

]

}

},

{

active: false,

name: "Loisirs (going out)",

icon: '<i class="icon icon-loisirs"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.poi.loisirs',

format: 'image/png',

transparent: true,

maxZoom:20,

//minZoom: 13

}

]

}



},



{

active: false,

name: "Mon.historiques(listed bldg)",

icon: '<i class="icon icon-monument"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.patrim.mhareas',

format: 'image/png',

transparent: true,

maxZoom:20,

//minZoom: 13

}

]

}

},

{

name: "Fusion MH (test)",

icon: '<i class="icon icon-velo"></i>',

layer: mon

},

{

active: false,

name: "Mon.hist.info(listed bldg inf)",

icon: '<i class="icon icon-monument"></i>',

layer: featureLayer,

},

{

active: true,

name: "Photos Flickr",

icon: '<i class="icon icon-monument"></i>',

layer: flickr,

},

{

active: false,

name: "App.vins/spir.(cert,wine/liq.)",

icon: '<i class="icon icon-vins"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.patrim.aocigp_simpl500_alcools',

format: 'image/png',

transparent: true,

//minZoom: 13

}

]

}

},

{

active: false,

name: "App.spté rég.(cers,ot.prod.)",

icon: '<i class="icon icon-specialites"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.patrim.aocigp_simpl500_specialites',

format: 'image/png',

transparent: true,

//minZoom: 13

}

]

}

},

{

active: false,

name: "Provinces hist. (hist. prov.)",

icon: '<i class="icon icon-provinces"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.histoire.provinces',

format: 'image/png',

transparent: true,

//minZoom: 13

}

]

}

},

{

active: false,

name: "Bus",

icon: '<i class="icon icon-bus"></i>',

layer: {

type: "tileLayer.wms",

args: ["http://mappingforyou.eu/geoserver/wms", {

layers: 'france.roads.bus10m',

format: 'image/png',

transparent: true,

maxZoom:20,

//minZoom: 13

}

]

}

},





{

name: "Routes (roads)",

icon: '<i class="icon icon-road"></i>',

layer: L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lines/{z}/{x}/{y}{r}.{ext}', {

maxZoom:20,



})

},



{

name: "Voies vélo (cycling)",

icon: '<i class="icon icon-velo"></i>',

layer: L.tileLayer('https://tile.waymarkedtrails.org/cycling/{z}/{x}/{y}.png', {

maxZoom:20,



})

},





{

name: "Randonnée (hiking)",

icon: '<i class="icon icon-randonnee"></i>',

layer: L.tileLayer('https://tile.waymarkedtrails.org/hiking/{z}/{x}/{y}.png', {

maxZoom:20,



})

},



{

name: "Ski (skiing)",

icon: '<i class="icon icon-mountains"></i>',

layer: L.tileLayer('https://tiles.opensnowmap.org/pistes/{z}/{x}/{y}.png', {

maxZoom:20,



})

},





{

active: false,

name: "Courbes de niv.(cont. lines)",

icon: '<i class="icon icon-mountains"></i>',

layer: {

type: "tileLayer.wms",

args: ["https://ows.terrestris.de/osm/service?", {

layers: 'SRTM30-Contour',

format: 'image/png',

transparent: true,

maxZoom:20,

//minZoom: 13

}

]

}

},



// {

// active: true,

// name: "River",

// layer: (function() {

// var l = L.geoJson();

// $.getJSON('data/river.json', function(j) {

// l.addData(j);

// });

// return l;

// }())

// },

]

},

];



var panelLayers = new L.Control.PanelLayers(baseLayers, overLayers, {

compact: true,

collapsed: true,

collapsibleGroups: true

});



map.addControl(panelLayers);

Back to list