{"id":234,"date":"2025-08-24T23:44:42","date_gmt":"2025-08-24T23:44:42","guid":{"rendered":""},"modified":"2026-04-08T13:19:41","modified_gmt":"2026-04-08T13:19:41","slug":"sky-lantern","status":"publish","type":"page","link":"https:\/\/generatedbyeye.com\/gbe\/sky-lantern\/","title":{"rendered":"Sky Lantern"},"content":{"rendered":"<div id=\"pl-234\"  class=\"panel-layout\" ><div id=\"pg-234-0\"  class=\"panel-grid panel-no-style\" ><div id=\"pgc-234-0-0\"  class=\"panel-grid-cell\" ><div id=\"panel-234-0-0-0\" class=\"so-panel widget widget_sow-editor panel-first-child panel-last-child\" data-index=\"0\" ><div\n\t\t\t\n\t\t\tclass=\"so-widget-sow-editor so-widget-sow-editor-base\"\n\t\t\t\n\t\t>\n<div class=\"siteorigin-widget-tinymce textwidget\">\n\t    <div class=\"leaflet-map-container\">\n        <label for=\"skylantern-selector-6aa5147a0edd0\">Select a Point:<\/label>\n        <select id=\"skylantern-selector-6aa5147a0edd0\">\n            <option value=\"\">-- Select --<\/option>\n                            <option value=\"13\">Angramadea<\/option>\n                            <option value=\"12\">Melbourne Launch<\/option>\n                            <option value=\"10\">NewTest<\/option>\n                            <option value=\"5\">null<\/option>\n                            <option value=\"9\">One Love<\/option>\n                            <option value=\"8\">Phone Lantern<\/option>\n                            <option value=\"11\">Recovery and health for my grandma<\/option>\n                            <option value=\"6\">Sky Lantern Test Flight<\/option>\n                            <option value=\"1\">test<\/option>\n                            <option value=\"3\">test<\/option>\n                            <option value=\"4\">test6<\/option>\n                            <option value=\"7\">Testing one in Florida<\/option>\n                            <option value=\"2\">testy<\/option>\n                    <\/select>\n        <div id=\"skylantern-display-6aa5147a0edd0\" style=\"height: 400px;\"><\/div>\n    <\/div>\n    <script>\n        document.addEventListener(\"DOMContentLoaded\", function () {\n            var map = L.map('skylantern-display-6aa5147a0edd0').setView([43.7, -79.4],1);\n            L.tileLayer('https:\/\/{s}.tile.openstreetmap.org\/{z}\/{x}\/{y}.png', {\n                attribution: '&copy; OpenStreetMap contributors'\n            }).addTo(map);\n            var featureLayers = {};\n            function getColor(id) {\n                const colors = [\"red\", \"blue\", \"green\", \"orange\", \"purple\", \"brown\", \"magenta\", \"cyan\", \"lime\", \"black\"];\n                return colors[id % colors.length];\n            }\n            fetch('https:\/\/generatedbyeye.com\/gbe\/wp-admin\/admin-ajax.php?action=skylantern_get_locations')\n                .then(response => response.json())\n                .then(data => {\n                    data.features.forEach(feature => {\n                        var id = feature.properties.id || 0;\n                        var color = getColor(id);\n                        var layer;\n                        if (feature.geometry.type === \"Point\") {\n                            layer = L.geoJSON(feature, {\n                                pointToLayer: function (feature, latlng) {\n                                    return L.circleMarker(latlng, {\n                                        radius: 6,\n                                        fillColor: color,\n                                        color: color,\n                                        weight: 1,\n                                        opacity: 1,\n                                        fillOpacity: 0.8\n                                    });\n                                }\n                            });\n                        } else if (feature.geometry.type === \"LineString\") {\n                            layer = L.geoJSON(feature, {\n                                style: {\n                                    color: color,\n                                    weight: 3,\n                                    opacity: 0.9\n                                }\n                            });\n                        }\n                        layer.bindPopup(`<b>${feature.properties.attribution}<\/b>`);\n                        layer.addTo(map);\n                        featureLayers[id] = layer;\n                    });\n                });\n            document.getElementById(\"skylantern-selector-6aa5147a0edd0\").addEventListener(\"change\", function () {\n                var selectedId = this.value;\n                if (selectedId && featureLayers[selectedId]) {\n                    var bounds = featureLayers[selectedId].getBounds();\n                    map.fitBounds(bounds);\n                    featureLayers[selectedId].openPopup();\n                }\n            });\n        });\n    <\/script>    \n<\/div>\n<\/div><\/div><\/div><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Select a Point: &#8212; Select &#8212; Angramadea Melbourne Launch NewTest null One Love Phone Lantern Recovery and health for my grandma Sky Lantern Test Flight test test test6 Testing one in Florida testy<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-234","page","type-page","status-publish","hentry","content-columns-1"],"_links":{"self":[{"href":"https:\/\/generatedbyeye.com\/gbe\/wp-json\/wp\/v2\/pages\/234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/generatedbyeye.com\/gbe\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/generatedbyeye.com\/gbe\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/generatedbyeye.com\/gbe\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/generatedbyeye.com\/gbe\/wp-json\/wp\/v2\/comments?post=234"}],"version-history":[{"count":11,"href":"https:\/\/generatedbyeye.com\/gbe\/wp-json\/wp\/v2\/pages\/234\/revisions"}],"predecessor-version":[{"id":1533,"href":"https:\/\/generatedbyeye.com\/gbe\/wp-json\/wp\/v2\/pages\/234\/revisions\/1533"}],"wp:attachment":[{"href":"https:\/\/generatedbyeye.com\/gbe\/wp-json\/wp\/v2\/media?parent=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}