You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to show currents from Black Sea on a map with streamlines (with leaflet-velocity).
But all streamlines are same color and the map looks very bad.
The map is here: https://syroco.rmri.ro/earth/index.html
I keep the original layer (Ocean Current -Great Barrier Reef) , to see the diference between layers.
I look forward to any suggestion, idea.
The code from demo.js:
function initDemoMap() {
var Esri_WorldImagery = L.tileLayer(
"http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
{
attribution:
"SYROCO 2024" +
"NIMRD 'Grigore Antipa'"
}
);
var Esri_DarkGreyCanvas = L.tileLayer(
"http://{s}.sm.mapstack.stamen.com/" +
"(toner-lite,$fff[difference],$fff[@23],$fff[hsl-saturation@20])/" +
"{z}/{x}/{y}.png",
{
attribution:
"SYROCO 2024" +
"NIMRD 'Grigore Antipa'"
}
);
var baseLayers = {
Satellite: Esri_WorldImagery,
"Grey Canvas": Esri_DarkGreyCanvas
};
var map = L.map("map", {
layers: [Esri_WorldImagery]
});
var layerControl = L.control.layers(baseLayers);
layerControl.addTo(map);
map.setView([43, 35], 7);
return {
map: map,
layerControl: layerControl
};
}
// demo map
var mapStuff = initDemoMap();
var map = mapStuff.map;
var layerControl = mapStuff.layerControl;
$.getJSON("water-gbr.json", function(data) {
var velocityLayer = L.velocityLayer({
displayValues: true,
displayOptions: {
velocityType: "GBR Water",
position: "bottomleft",
emptyString: "No water data"
},
data: data,
maxVelocity: 0.6,
velocityScale: 0.1 // arbitrary default 0.005
});
layerControl.addOverlay(velocityLayer, "Ocean Current - Great Barrier Reef");
});
$.getJSON("currents_6Dec2024.json", function(data) {
var velocityLayer = L.velocityLayer({
displayValues: true,
displayOptions: {
velocityType: "GBR Water",
position: "bottomleft",
emptyString: "No water data"
},
data: data,
minVelocity: -0.5,
maxVelocity: 0.3,
velocityScale: 0.1 // arbitrary default 0.005
});
layerControl.addOverlay(velocityLayer, "Black Sea Current - Romania");
});`
The text was updated successfully, but these errors were encountered:
I try to show currents from Black Sea on a map with streamlines (with leaflet-velocity).
But all streamlines are same color and the map looks very bad.
The map is here: https://syroco.rmri.ro/earth/index.html
I keep the original layer (Ocean Current -Great Barrier Reef) , to see the diference between layers.
I look forward to any suggestion, idea.
The code from demo.js:
The text was updated successfully, but these errors were encountered: