Skip to content

Instantly share code, notes, and snippets.

@M4R14
Created November 30, 2016 06:54
Show Gist options
  • Select an option

  • Save M4R14/daaee8ce85e76a7976d14920d894bb1e to your computer and use it in GitHub Desktop.

Select an option

Save M4R14/daaee8ce85e76a7976d14920d894bb1e to your computer and use it in GitHub Desktop.
map.data.setStyle(function(feature) {
var RESINFO = feature.getProperty('RESINFO');
var color;
var color_line;
if(RESINFO == 'gas'){
color = 'blue';
color_line = 'blue';
}else if(RESINFO == 'oil'){
color = 'red';
color_line = 'red';
}else if(RESINFO == 'oil and gas'){
color = 'blue';
color_line = 'red';
}else if(RESINFO == 'no info'){
color = 'gray';
color_line = 'gray';
}
return {
fillColor: color,
strokeColor: color_line,
strokeOpacity: 1,
strokeWeight: 2
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment