mapsplugin / cordova-plugin-googlemaps

Google Maps plugin for Cordova
Apache License 2.0
1.66k stars 913 forks source link

KML polystyle outline and fill support for 'true' as node value #2875

Open maxcodefaster opened 2 years ago

maxcodefaster commented 2 years ago

I'm submitting a ... (check one with "x")

OS: (check one with "x")

cordova information: (run $> cordova plugin list)

insert the output from the command here

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)

@ionic-native/core : 
@ionic-native/google-maps : 

Current behavior:

Expected behavior:

Screen capture or video record:

Related code, data or error log (please format your code or data):

params.styles.children.forEach(function(style) {
    switch (style.tagName) {
    case 'polystyle':
      style.children.forEach(function(node) {
        switch(node.tagName) {
        case 'color':
          polygonOptions.fillColor = kmlColorToRGBA(node.value);
          break;
        case 'fill':
          polygonOptions.fill = node.value === '1' || node.value === 'true';
          break;
        case 'outline':
          polygonOptions.outline = node.value === '1' || node.value === 'true';
          break;
        }
      });
      break;

Checking vor node.value === 'true' in KmlLoader.js fixes the issue

Please share your project files on Github or others(Bitbucket, Gitlabs...etc).
If you don't want to share your project files, please create a demo project, then share it.

Screen captures, and/or native logs(such as Logcat, xcode logs) are appreciate.

Giving much information, you are waiting time is less.
Thank you for your cooperation.

Support this plugin activity

I appreicate if you give me a beer :beer: from here