{"action":"created","issue":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2560","repository_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps","labels_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2560/labels{/name}","comments_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2560/comments","events_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2560/events","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2560","id":411018948,"node_id":"MDU6SXNzdWU0MTEwMTg5NDg=","number":2560,"title":"Error loading KML if polygon has 'tessellate' node ","user":{"login":"ggiordan","id":3812056,"node_id":"MDQ6VXNlcjM4MTIwNTY=","avatar_url":"https://avatars3.githubusercontent.com/u/3812056?v=4","gravatar_id":"","url":"https://api.github.com/users/ggiordan","html_url":"https://github.com/ggiordan","followers_url":"https://api.github.com/users/ggiordan/followers","following_url":"https://api.github.com/users/ggiordan/following{/other_user}","gists_url":"https://api.github.com/users/ggiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/ggiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggiordan/subscriptions","organizations_url":"https://api.github.com/users/ggiordan/orgs","repos_url":"https://api.github.com/users/ggiordan/repos","events_url":"https://api.github.com/users/ggiordan/events{/privacy}","received_events_url":"https://api.github.com/users/ggiordan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2019-02-16T03:10:44Z","updated_at":"2019-02-16T12:25:47Z","closed_at":"2019-02-16T04:08:29Z","author_association":"NONE","body":"<!--\r\n\r\n*********************************************************************\r\n\r\n**public support**\r\n\r\nIf you have a question about this plugin, please ask here.\r\nHowever this is not a good place for Q&A, please ask only things related with this plugin (such as how to use).\r\n\r\nIf you want to report your problem, please share your project files on Github in advance.\r\nWithout your project files, I can only guess your issue (except your issue is really easy case).\r\nSharing your project files in advance is the fastest way to resolve your issue.\r\n\r\n**private support**\r\n\r\nIf you don't want to discover anything including code, screen captures or screen records,\r\nplease [create an private issue ticket](https://github.com/mapsplugin/cordova-plugin-googlemaps/blob/master/.github/ISSUE_TEMPLATE/private-support.md).\r\nI provide a private space for chatting.\r\n\r\n*********************************************************************\r\n\r\n--->\r\n\r\n**I'm submitting a ...**  (check one with \"x\")\r\n- [ ] question\r\n- [ X] any problem or bug report\r\n\r\n**OS:**  (check one with \"x\")\r\n- [ X] **Android**\r\n- [ X] **iOS**\r\n- [ x] **Browser**\r\n\r\n**cordova information:**  (run `$> cordova plugin list`) \r\n\r\n```\r\nD:\\rovermobileandroid>cordova plugin list\r\ncom.borismus.webintent 1.0.0 \"WebIntent\"\r\ncordova-plugin-appavailability 0.4.2 \"AppAvailability\"\r\ncordova-plugin-device 2.0.2 \"Device\"\r\ncordova-plugin-dialogs 2.0.1 \"Notification\"\r\ncordova-plugin-file 6.0.1 \"File\"\r\ncordova-plugin-geolocation 4.0.1 \"Geolocation\"\r\ncordova-plugin-globalization 1.11.0 \"Globalization\"\r\ncordova-plugin-googlemaps 2.4.6 \"cordova-plugin-googlemaps\"\r\ncordova-plugin-inappbrowser 3.0.0 \"InAppBrowser\"\r\ncordova-plugin-insomnia 4.3.0 \"Insomnia (prevent screen sleep)\"\r\ncordova-plugin-ios-non-exempt-encryption 1.0.0 \"ITSAppUsesNonExemptEncryption false\"\r\ncordova-plugin-media 5.0.2 \"Media\"\r\ncordova-plugin-network-information 2.0.1 \"Network Information\"\r\ncordova-plugin-sim 1.3.3 \"SIM\"\r\ncordova-plugin-splashscreen 5.0.2 \"Splashscreen\"\r\ncordova-plugin-statusbar 2.4.2 \"StatusBar\"\r\ncordova-plugin-whitelist 1.3.3 \"Whitelist\"\r\ncordova-support-google-services 1.1.0 \"cordova-support-google-services\"\r\nphonegap-plugin-multidex 1.0.0 \"Multidex\"\r\nphonegap-plugin-push 2.2.3 \"PushPlugin\"\r\n```\r\n\r\n**Current behavior:**\r\n<!-- Describe how the bug manifests. -->\r\nThe KML loader is not finding the coordinates if there is a tesselate node in the linearring, like this:\r\n![image](https://user-images.githubusercontent.com/3812056/52893671-006f4800-316d-11e9-9d8b-8027b61564a5.png)\r\n\r\n\r\n**Expected behavior:**\r\nLoad the KML file\r\n\r\n**Related code, data or error log (please format your code or data):**\r\nThe problem is caused by these lines of code in KmlLoader.js (around line 608)\r\n```\r\n    switch (element.tagName) {\r\n      case \"outerboundaryis\":\r\n        if (element.children.length === 1) {\r\n          switch(element.children[0].tagName) {\r\n            case \"linearring\":\r\n              coordinates = element.children[0].children[0].coordinates;\r\n              break;\r\n```\r\nin the case above, the coordinates are not children of the 0th element.  They are the children of the 1st element.\r\n\r\nI _THINK_ the answer is to use findTag(), but, I'm not 100% sure.\r\n\r\nI've worked around my immediate problem by removing the node, so that the coordinates are at the 0th element.\r\nBut in the long run this is not workable as I don't control all the supplied KML.\r\n"},"comment":{"url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/comments/464342839","html_url":"https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2560#issuecomment-464342839","issue_url":"https://api.github.com/repos/mapsplugin/cordova-plugin-googlemaps/issues/2560","id":464342839,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2NDM0MjgzOQ==","user":{"login":"ggiordan","id":3812056,"node_id":"MDQ6VXNlcjM4MTIwNTY=","avatar_url":"https://avatars3.githubusercontent.com/u/3812056?v=4","gravatar_id":"","url":"https://api.github.com/users/ggiordan","html_url":"https://github.com/ggiordan","followers_url":"https://api.github.com/users/ggiordan/followers","following_url":"https://api.github.com/users/ggiordan/following{/other_user}","gists_url":"https://api.github.com/users/ggiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/ggiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggiordan/subscriptions","organizations_url":"https://api.github.com/users/ggiordan/orgs","repos_url":"https://api.github.com/users/ggiordan/repos","events_url":"https://api.github.com/users/ggiordan/events{/privacy}","received_events_url":"https://api.github.com/users/ggiordan/received_events","type":"User","site_admin":false},"created_at":"2019-02-16T12:25:47Z","updated_at":"2019-02-16T12:25:47Z","author_association":"NONE","body":"I have no issue ignoring that tag, or any other unused tag for that matter.  I am not suggesting that support for altitude is needed in this case, sorry if for not being clear on that point.\r\n\r\nThe real point is that if the kml contains a polygon with something other than the <coordinates> as index zero, it throws an exception... the the coordinates variable is undefined and the foreach a few lines down barfs.\r\n\r\nI'm simply suggesting that the code should be a little more robust and not make an assumption where the element is.  We know there is at least one KML file in the wild where this is true.  I think it was exported from an ARCSYS system, so I expect that there are plenty more too."}}
{"actor":{"display_login":"ggiordan"}}