Guest User

Untitled

a guest
Mar 17th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. map.data.loadGeoJson(
  2. 'data/trails2018.geojson', {},
  3. function(features) {
  4. console.log("loadGeoJson callback "+features.length);
  5. map.data.forEach(function(feature) {
  6. var skill = feature.getProperty('skill_leve');
  7. if (skill == 'ADVANCED'){
  8. feature.setMap(null);
  9. }
  10. });
  11. });
  12.  
  13. map.data.setStyle(function(feature) {
  14. var visible = false;
  15. if (feature.getProperty('skill_level')) {
  16. var skill = feature.getProperty('skill_level');
  17. if (skill == 'ADVANCED') {
  18. visible = true;
  19. }
  20. }
  21. return /** @type {google.maps.Data.StyleOptions} */ ({
  22. strokeColor: "blue",
  23. visible: visible
  24. });
  25. });
Add Comment
Please, Sign In to add comment