Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- map.data.loadGeoJson(
- 'data/trails2018.geojson', {},
- function(features) {
- console.log("loadGeoJson callback "+features.length);
- map.data.forEach(function(feature) {
- var skill = feature.getProperty('skill_leve');
- if (skill == 'ADVANCED'){
- feature.setMap(null);
- }
- });
- });
- map.data.setStyle(function(feature) {
- var visible = false;
- if (feature.getProperty('skill_level')) {
- var skill = feature.getProperty('skill_level');
- if (skill == 'ADVANCED') {
- visible = true;
- }
- }
- return /** @type {google.maps.Data.StyleOptions} */ ({
- strokeColor: "blue",
- visible: visible
- });
- });
Add Comment
Please, Sign In to add comment