Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add altitude colors to receiver ranges #1

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add altitude colors to receiver ranges
  • Loading branch information
mikkyo9 committed Aug 13, 2019
commit f1cdb0cc82e4922ad2933b74d85a8fba18557f09
37 changes: 34 additions & 3 deletions html/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -896,11 +896,31 @@ function initialize_map() {
var ringStyle = new ol.style.Style({
fill: null,
stroke: new ol.style.Stroke({
color: '#0000DD',
color: '#00FF80',
width: 2
})
});
var ringStyle2 = new ol.style.Style({
fill: null,
stroke: new ol.style.Stroke({
color: '#0080FF',
width: 2
})
});
var ringStyle3 = new ol.style.Style({
fill: null,
stroke: new ol.style.Stroke({
color: '#0000FF',
width: 2
})
});
var ringStyle4 = new ol.style.Style({
fill: null,
stroke: new ol.style.Stroke({
color: '#CC00CC',
width: 2
})
});

for (var i = 0; i < data.rings.length; ++i) {
var geom = null;
var points = data.rings[i].points;
Expand All @@ -913,7 +933,18 @@ function initialize_map() {
geom.transform('EPSG:4326', 'EPSG:3857');

var feature = new ol.Feature(geom);
feature.setStyle(ringStyle);
if (i==0){
feature.setStyle(ringStyle);
}
if (i==1){
feature.setStyle(ringStyle2);
}
if (i==2){
feature.setStyle(ringStyle3);
}
if (i==3){
feature.setStyle(ringStyle4);
}
StaticFeatures.push(feature);
}
}
Expand Down