Loading app/src/js/LayerCollection.js +47 −44 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ import $ from "jquery"; * for quick and easy use in the AstroMap class. */ export default L.LayerCollection = L.Class.extend({ /** * @function LayerCollection.prototype.initialize * @description Constructor that creates the layers. Loading Loading @@ -121,32 +120,36 @@ export default L.LayerCollection = L.Class.extend({ } // Only add feature names to cylindrical if (this._projName == "cylindrical") { this._wfsLayer = new L.GeoJSON(null, { /** * @function LayerCollection.prototype.onEachFeature * @description Select each feature. * @param {String} layer - Overlay information. * @param {JSON} feature - Feature from json. */ onEachFeature: function(feature, layer) { if (feature.properties && feature.properties.name) { layer.bindPopup(feature.properties.name); } }, /** * @function LayerCollection.prototype.pointToLayer * @description Get point to layer. * @param {Constructor} latlng - Latitude and longitude. * @param {JSON} feature - Feature from json. */ pointToLayer: function(feature, latlng) { return new L.CircleMarker(latlng, { radius: 3, fillOpacity: 1 }); } }); this._overlays["Show Feature Names"] = this._wfsLayer; } // Adds WFS feature names to map. // Commented out for now. // if (this._projName == "cylindrical") { // this._wfsLayer = new L.GeoJSON(null, { // /** // * @function LayerCollection.prototype.onEachFeature // * @description Binds the feature name so that when the feature is clicked, // a pop-up with the name is displayed. // * @param {String} layer - Vector layer to add name to. // * @param {JSON} feature - JSON representing feature clicked on. // */ // onEachFeature: function(feature, layer) { // if (feature.properties && feature.properties.name) { // layer.bindPopup(feature.properties.name); // } // }, // /** // * @function LayerCollection.prototype.pointToLayer // * @description Add styling so that feature points get created as // circles instead of markers. // * @param {Constructor} latlng - Latitude and longitude where mouse was clicked. // * @param {JSON} feature - JSON representing feature clicked on. // */ // pointToLayer: function(feature, latlng) { // return new L.CircleMarker(latlng, { radius: 3, fillOpacity: 1 }); // } // }); // this._overlays["Show Feature Names"] = this._wfsLayer; // } }, /** Loading jupyter/CartoCosmos/planetary_maps.py +1 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ class planetary_maps: display(self.gui.get_wkt_button()) # Display map first, then add features self.add_wfs_features() # self.add_wfs_features() def add_wkt(self, wktString): """ Takes in a Well-Known text string Loading Loading
app/src/js/LayerCollection.js +47 −44 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ import $ from "jquery"; * for quick and easy use in the AstroMap class. */ export default L.LayerCollection = L.Class.extend({ /** * @function LayerCollection.prototype.initialize * @description Constructor that creates the layers. Loading Loading @@ -121,32 +120,36 @@ export default L.LayerCollection = L.Class.extend({ } // Only add feature names to cylindrical if (this._projName == "cylindrical") { this._wfsLayer = new L.GeoJSON(null, { /** * @function LayerCollection.prototype.onEachFeature * @description Select each feature. * @param {String} layer - Overlay information. * @param {JSON} feature - Feature from json. */ onEachFeature: function(feature, layer) { if (feature.properties && feature.properties.name) { layer.bindPopup(feature.properties.name); } }, /** * @function LayerCollection.prototype.pointToLayer * @description Get point to layer. * @param {Constructor} latlng - Latitude and longitude. * @param {JSON} feature - Feature from json. */ pointToLayer: function(feature, latlng) { return new L.CircleMarker(latlng, { radius: 3, fillOpacity: 1 }); } }); this._overlays["Show Feature Names"] = this._wfsLayer; } // Adds WFS feature names to map. // Commented out for now. // if (this._projName == "cylindrical") { // this._wfsLayer = new L.GeoJSON(null, { // /** // * @function LayerCollection.prototype.onEachFeature // * @description Binds the feature name so that when the feature is clicked, // a pop-up with the name is displayed. // * @param {String} layer - Vector layer to add name to. // * @param {JSON} feature - JSON representing feature clicked on. // */ // onEachFeature: function(feature, layer) { // if (feature.properties && feature.properties.name) { // layer.bindPopup(feature.properties.name); // } // }, // /** // * @function LayerCollection.prototype.pointToLayer // * @description Add styling so that feature points get created as // circles instead of markers. // * @param {Constructor} latlng - Latitude and longitude where mouse was clicked. // * @param {JSON} feature - JSON representing feature clicked on. // */ // pointToLayer: function(feature, latlng) { // return new L.CircleMarker(latlng, { radius: 3, fillOpacity: 1 }); // } // }); // this._overlays["Show Feature Names"] = this._wfsLayer; // } }, /** Loading
jupyter/CartoCosmos/planetary_maps.py +1 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ class planetary_maps: display(self.gui.get_wkt_button()) # Display map first, then add features self.add_wfs_features() # self.add_wfs_features() def add_wkt(self, wktString): """ Takes in a Well-Known text string Loading