Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Add this line to your application's Gemfile:
gem 'blacklight_heatmaps'
And then execute:
bundle install
Run the BlacklightMaps installer:
rails generate blacklight_heatmaps:install
BlacklightHeatmaps expects your data to be indexed as a Spatial Recursive Prefix Tree type. The plugin currently supports data indexed in formats:
x y
Syntax. example: "-121.631609 36.688128"minX, maxX, maxY, minY
). example: "ENVELOPE(122.934585571, 153.987060547, 45.522888184, 20.422889709)"BlacklightHeatmaps also works with multivalued Spatial Recursive Prefix Tree types.
{
"id": 1,
"name": "Null Island",
"geo_srpt": [
"ENVELOPE(-0.0005, 0.000379, 0.000309, -0.000282)", "0 0"
]
}
Solr does not seem to be able to handle multivalued points without an accompanying geometry.
Additional formats could be added by extending BlacklightHeatmaps::GeometryParser
By default three different basemaps are included with BlacklightHeatmaps. You can modify these by changing the configuration value in the CatalogController
.
# Basemaps configured include: 'positron', 'darkMatter', 'OpenStreetMap.HOT'
config.basemap_provider = 'OpenStreetMap.HOT'
BlacklightHeatmaps allows you to customize your basemap further to any Leaflet TileLayer subclass. This includes WMS layers, TileLayers, etc. Checkout Leaflet Providers for more ideas on basemaps you can use.
To customize the basemap, make sure that you extend the BlacklightHeatmaps.Basemaps
object to include your basemap selection:
BlacklightHeatmaps.Basemaps[' OpenStreetMap.BlackAndWhite'] = L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
});
The heatmap color ramp is also customizable. This setting can be modified in CatalogController
by passing in an array of hexadecimal color values as strings.
#Heatmap color ramp. For best results, use http://colorbrewer2.org or http://tristen.ca/hcl-picker/#/hlc/5/1
config.view.heatmaps.color_ramp = ['#fef0d9','#fdcc8a','#fc8d59','#e34a33','#b30000']
ColorBrewer is a great resource in choosing a color ramp. It also has options for colorblind safe ramps to use and can export the hex values in an array that you can paste into your configuration.
Run Solr and Blacklight (with BlacklightMaps) for interactive development:
bundle exec rake blacklight_heatmaps:server
Run the test suite
bundle exec rake ci
FAQs
Unknown package
We found that blacklight_heatmaps demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.