start map
This commit is contained in:
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -285,25 +285,10 @@ function dragcanvas() {
|
||||
$reseau.draggable({
|
||||
scroll: false
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function map() {
|
||||
var mymap = L.map('mapid').setView([51.505, -0.09], 13);
|
||||
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||
maxZoom: 18,
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
id: 'mapbox.streets'
|
||||
}).addTo(mymap);
|
||||
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
clickhand();
|
||||
map();
|
||||
drag();
|
||||
dragcanvas();
|
||||
// scrollbar();
|
||||
|
||||
@@ -40,14 +40,7 @@ body{
|
||||
.mouseDown{
|
||||
cursor: grabbing;
|
||||
}
|
||||
img{
|
||||
filter: grayscale(100%) contrast(1);
|
||||
transition: filter 0.5s;
|
||||
&:hover{
|
||||
filter: grayscale(0%);
|
||||
transition: filter 0.5s;
|
||||
}
|
||||
}
|
||||
|
||||
.blocs{
|
||||
position: absolute;
|
||||
overflow-y: auto;
|
||||
@@ -89,6 +82,16 @@ body{
|
||||
height: 100vh;
|
||||
}
|
||||
}
|
||||
#images{
|
||||
img{
|
||||
filter: grayscale(100%) contrast(1);
|
||||
transition: filter 0.5s;
|
||||
&:hover{
|
||||
filter: grayscale(0%);
|
||||
transition: filter 0.5s;
|
||||
}
|
||||
}
|
||||
}
|
||||
#reseaux-sociaux{
|
||||
svg{
|
||||
// width: 100vw;
|
||||
@@ -101,8 +104,13 @@ body{
|
||||
}
|
||||
#mapid {
|
||||
width: 100vw;
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
.leaflet-marker-pane{
|
||||
img{
|
||||
transform: translate(-25px, -25px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block body %}
|
||||
{% for module in page.collection %}
|
||||
<div id="{{ _self.pageLinkName(module.folder)|replace({"0":"", "1":"", "2":"", "3":"", "4":"", "5":"", "6":"", "7":"", "8":"", "9":"", ".":"","_":"" }) }}">
|
||||
<div id="{{ module.header.id}}">
|
||||
{{ module.content }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block body %}
|
||||
{% for module in page.collection %}
|
||||
<div id="{{ _self.pageLinkName(module.folder)|replace({"0":"", "1":"", "2":"", "3":"", "4":"", "5":"", "6":"", "7":"", "8":"", "9":"", ".":"","_":"" }) }}">
|
||||
<div id="{{ module.header.id }}">
|
||||
{{ module.content }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block body %}
|
||||
{% for module in page.collection %}
|
||||
<div id="{{ _self.pageLinkName(module.folder)|replace({"0":"", "1":"", "2":"", "3":"", "4":"", "5":"", "6":"", "7":"", "8":"", "9":"", ".":"","_":"" }) }}">
|
||||
<div id="{{module.header.id}}">
|
||||
{{ module.content }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
{% block body %}
|
||||
{% for module in page.collection %}
|
||||
<div id="{{ _self.pageLinkName(module.folder)|replace({"0":"", "1":"", "2":"", "3":"", "4":"", "5":"", "6":"", "7":"", "8":"", "9":"", ".":"","_":"" }) }}">
|
||||
<div id="{{ module.header.id }}">
|
||||
{{ module.content }}
|
||||
<svg width="500" height="500"></svg>
|
||||
</div>
|
||||
|
||||
@@ -3,10 +3,57 @@
|
||||
{% macro pageLinkName(text) %}{{ text|lower|replace({' ':'_'}) }}{% endmacro %}
|
||||
|
||||
{% block body %}
|
||||
<div id="mapid"></div>
|
||||
<script>
|
||||
function map() {
|
||||
var mymap = L.map('mapid').setView([48.866667, 2.333333], 14);
|
||||
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||
maxZoom: 18,
|
||||
attribution: '<a href="https://www.openstreetmap.org/"></a>'
|
||||
+ '<a href="https://creativecommons.org/licenses/by-sa/2.0/"></a>'
|
||||
+ '<a href="https://www.mapbox.com/"></a>',
|
||||
id: 'mapbox.streets'
|
||||
}).addTo(mymap);
|
||||
|
||||
var LeafIcon = L.Icon.extend({
|
||||
options: {
|
||||
iconSize: [50, 50],
|
||||
iconAnchor: [25, 25],
|
||||
}
|
||||
});
|
||||
|
||||
var greenIcon = new LeafIcon({iconUrl: 'user/themes/r2c/images/handler.svg'})
|
||||
L.marker([48.866667, 2.333333], {icon: greenIcon}).bindPopup("Coucou").addTo(mymap);
|
||||
|
||||
};
|
||||
|
||||
$(document).ready(function() {
|
||||
map();
|
||||
});
|
||||
|
||||
</script>
|
||||
<div id="mapid"></div>
|
||||
<script>
|
||||
{% for module in page.collection %}
|
||||
<div id="{{ _self.pageLinkName(module.folder)|replace({"0":"", "1":"", "2":"", "3":"", "4":"", "5":"", "6":"", "7":"", "8":"", "9":"", ".":"","_":"" }) }}">
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
var array = []
|
||||
console.log(array);
|
||||
|
||||
var $mappoint = $('#streetmap > div:nth-child(n+2)');
|
||||
array.push('{{module.header.id}}');
|
||||
console.log(array);
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
<div id="{{module.header.id}} {{module.header.lat}} {{module.header.long}}">
|
||||
{{ module.content }}
|
||||
</div>
|
||||
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
{% do assets.addJs('theme://js/d3.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/script_d3js.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/paper_full.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/paper_full.js', {group:'bottom'}) %}
|
||||
{% do assets.addJs('theme://js/jquery.ui.touch-punch.min.js', {group:'bottom'}) %}
|
||||
|
||||
{# % do assets.addJs('theme://js/leaflet.js', {group:'bottom'}) % #}
|
||||
|
||||
Reference in New Issue
Block a user