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.
But all streamlines are same color.
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.
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");
});
I try to show currents from Black Sea on a map with streamlines.
But all streamlines are same color.
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.
The code from demo.js:
`
My current dataset: (blacksea.json)
[{"header": {"parameterUnit":"m.s-1", "parameterNumber":2, "dx":1.0, "dy":1.0, "parameterNumberName":"U_component_of_current", "la1":80, "la2":-80, "parameterCategory":2, "lo2":379.66, "nx":83, "ny":141, "refTime":"2023-11-07 13:55:00", "lo1":20}, "data":[-0.04,-0.05,-0.05,.....] {"header": {"parameterUnit":"m.s-1", "parameterNumber":3, "dx":1.0, "dy":1.0, "parameterNumberName":"V_component_of_current", "la1":80, "la2":-80, "parameterCategory":2, "lo2":379.66, "nx":83, "ny":141, "refTime":"2023-11-07 13:55:00", "lo1":20}, "data":[....]
The text was updated successfully, but these errors were encountered: