
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@yandex/ymaps3-minimap
Advanced tools
Yandex JS API package
The package is located in the dist
folder:
dist/types
TypeScript typesdist/esm
es6 modules for direct connection in your projectdist/index.js
Yandex JS ModuleRecommended use YMapButtonExample
as usual npm package:
npm install @yandex/ymaps3-minimap
and dynamic import
main();
async function main() {
await ymaps3.ready;
const {YMap, YMapDefaultSchemeLayer, YMapDefaultFeaturesLayer, YMapControls} = ymaps3;
const {YMapMiniMap} = await ymaps3.import('@yandex/ymaps3-minimap');
let collapsed = false;
map = new YMap(document.getElementById('app'), {location: LOCATION});
map.addChild(new YMapDefaultSchemeLayer({}));
map.addChild(new YMapDefaultFeaturesLayer({}));
const onButtonClick = () => {
collapsed = !collapsed;
minimap.update({collapsed});
};
const minimap = new YMapMiniMap({size: [200, 200], zoomOffset: 5, collapsed, onButtonClick});
map.addChild(new YMapControls({position: 'left bottom'}).addChild(minimap));
}
You also need to import css styles into your project:
/* index.css */
@import '@yandex/ymaps3-minimap/dist/esm/index.css';
You can use CDN with module loading handler in JS API on your page.
Just use ymaps3.import
:
const pkg = await ymaps3.import('@yandex/ymaps3-minimap');
By default ymaps3.import
can load self modules.
If you want also load your package, should register cdn:
ymaps3.import.registerCdn('https://cdn.jsdelivr.net/npm/{package}', '@yandex/ymaps3-minimap@latest');
Name | Type | Default | Description |
---|---|---|---|
size | [number, number] | [128, 90] | Size of the mini-map in pixels. |
zoomOffset | number | 5 | Difference in zoom levels between the overview map and the main map. |
zoomRange | {min: number; max: number} | Zoom range of the mini-map. Can be used to fix the zoom level. | |
showBounds | boolean | true | Display the boundaries of the main map's visible area on the mini-map. |
controllable | boolean | true | Ability to control the main map through the mini-map interface. Moving the mini-map will move the main map. |
collapsed | boolean | false | State of the mini-map: collapsed or expanded. |
showCollapsedControl | boolean | true | Show control for collapsing/expanding the mini-map. |
boundsDrawingStyle | DrawingStyle | Style for rendering the polygon of the main map's visible area boundaries on the mini-map. | |
location | YMapLocationRequest | Fixed center and zoom level of the mini-map, if required. | |
onButtonClick | function | Collapse button control click. | |
camera | YMapCameraRequest | Mini-map camera, if required. By default, the mini-map camera matches the main map's camera. |
FAQs
Yandex Maps JS API 3.0 example ymaps3-minimap
The npm package @yandex/ymaps3-minimap receives a total of 2,054 weekly downloads. As such, @yandex/ymaps3-minimap popularity was classified as popular.
We found that @yandex/ymaps3-minimap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.