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.
🌏 Render a map on browser easily.
Just download the js
and include it in your HTML
.
<!-- add easy.map in your html -->
<script type="text/javascript" src="PATH/TO/easy-map.min.js"></script>
<!-- if you use AMD or CommonJS -->
<script>
require(["PATH/TO/easy-map"], function (EasyMap) {
// Do something..
});
/* or */
var EasyMap = require("easy-map");
</script>
$ yarn add easy-map
# or
$ npm i easy-map
$ npm run demo
# then access http://localhost:8888
Map Key
to use map API
.
Parameter | Type | Remarks |
---|---|---|
mapType | string | Required (It must be included in ['google'] ) |
element | DOM Node | Required |
key | string | Required |
source | object | Specific location's information |
source.lat | number | Specific location's latitude |
source.lng | number | Specific location's longitude |
source.marker | object | Marker on Specific location |
source.marker.icon | string | Write icon image's path |
source.marker.width | number | Marker's width (px) |
source.marker.height | number | Marker's height (px) |
source.marker.verticalAlign | string | top, bottom, middle |
source.marker.horizontalAlign | string | right, left, center |
source.infoWindow | object | Marker's infoWindow |
source.infoWindow.content | string | infoWindow's content |
source.infoWindow.maxWidth | number | infoWindow's max width (px) |
source.infoWindow.backgroundColor | string | infoWindow's background color (hex code or color name )ONLY FOR NAVER |
source.infoWindow.borderColor | string | infoWindow's border color (hex code or color name )ONLY FOR NAVER |
source.infoWindow.borderWidth | number | infoWindow's border width (px) ONLY FOR NAVER |
source.infoWindow.anchorSize | object | infoWindow's anchor widthnew naver.maps.Size(30, 30) ONLY FOR NAVER |
source.infoWindow.anchorSkew | boolean | infoWindow's anchor shape ONLY FOR NAVER |
source.infoWindow.pixelOffset | object | infoWindow's offsetnew naver.maps.Point(20, -20) ONLY FOR NAVER |
coords | array | Set of coordinates |
coords[n] | object | Same as source |
closeInfoWindowAuto | boolean | Close automately when click a marker |
clickedNestedMarker | function | Callback function when click nested markers |
=== | === | === |
coords[n].infoWindow.content | string | If you write {{distance m}}, you can get the distance between coores[n] and source Available unites : [ m , km , ft , yd ] |
const easyMap = new EasyMap({
mapType: 'google',
key: 'AIzaSyBL4Ugej1KvkfIrU2qOhoAkE85rKEcTApo',
element: document.getElementById('map'),
source: {
lat: 37.5666103,
lng: 126.9783882,
marker: { icon: '//assets-cdn.github.com/images/modules/contact/heartocat.png', width: 48, height: 48, verticalAlign: 'top' },
infoWindow: { content: '<div class="info-window">Source Marker</div>', maxWidth: 50 }
},
coords: [
{
lat: 37.5658528,
lng: 126.9779845,
name: 'Marker 1',
marker: { icon: '//assets-cdn.github.com/images/modules/contact/heartocat.png', width: 36, height: 36, verticalAlign: 'middle' },
infoWindow: { content: '<div class="info-window">Marker 1<br>distance is {{distance m}}</div>', maxWidth: 50 }
},
{
lat: 37.5658528,
lng: 126.9779845,
name: 'Marker 2',
marker: { icon: '//assets-cdn.github.com/images/modules/contact/heartocat.png', width: 36, height: 36, verticalAlign: 'middle' },
infoWindow: { content: '<div class="info-window">Marker 2<br>distance is {{distance km}}</div>', maxWidth: 50 }
},
],
closeInfoWindowAuto: true,
clickedNestedMarker: function (cb, ids, strs) {
let userInput = prompt(`You clicked nested markers! Select on.\n${ strs }`, '');
cb(+userInput);
},
});
easyMap.start();
Google Maps
Naver Maps
1.0.0
1.0.1
Copyright (c) 2017 wonism
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
This is a open source project to represent map in your web page easily.
The npm package easy-map receives a total of 0 weekly downloads. As such, easy-map popularity was classified as not popular.
We found that easy-map demonstrated a not healthy version release cadence and project activity because the last version was released 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.