This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function fromWKT2Json(WKTstr) { | |
| var mods = {}; | |
| var convertToPointArray = function (ptArrayString) { | |
| var points = [], | |
| ptStringArray = ptArrayString.replace(/\)|\(/gi, "").split(","); | |
| ptStringArray.forEach(function (pt) { | |
| var splitpt = pt.trim().split(" "), | |
| x = parseFloat(splitpt[0], 10), | |
| y = parseFloat(splitpt[1], 10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // extension for jQuery | |
| (function (root) { | |
| if (root.Enumerable == null) { | |
| throw new Error("can't find Enumerable. linq.jquery.js must load after linq.js"); | |
| } | |
| if (root.jQuery == null) { | |
| throw new Error("can't find jQuery. linq.jquery.js must load after jQuery"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Getting a file through XMLHttpRequest as an arraybuffer and creating a Blob | |
| var rhinoStorage = localStorage.getItem("rhino"), | |
| rhino = document.getElementById("rhino"); | |
| if (rhinoStorage) { | |
| // Reuse existing Data URL from localStorage | |
| rhino.setAttribute("src", rhinoStorage); | |
| } | |
| else { | |
| // Create XHR, Blob and FileReader objects | |
| var xhr = new XMLHttpRequest(), |