Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
maptalks.esri
Advanced tools
A plugin to load ArcGIS service.
npm i maptalks.esri --save
<script src="https://unpkg.com/maptalks/dist/maptalks.js"></script>
<script src="https://unpkg.com/maptalks.esri/dist/maptalks.esri.js"></script>
<script type="text/javascript">
const service = new maptalks.esri.FeatureLayerService(/* params */);
const service1 = new maptalks.esri.ImageLayerService(/* params */);
</script>
import { FeatureLayerService, ImageLayerService } from 'maptalks.esri';
const service = new FeatureLayerService(/* params */);
const service1 = new ImageLayerService(/* params */);
const service = new maptalks.esri.FeatureLayerService({
url: 'https://sampleserver6.arcgisonline.com/arcgis/rest/services/Earthquakes_Since1970/MapServer/0',
// 数据的坐标系,不设置时则默认使用map的坐标系,如果设置,则会按该坐标系转换为map的坐标系
// projection: 'EPSG:3857',
symbol: {
markerType: 'ellipse',
markerWidth: 12,
markerHeight: 12,
markerFill: '#f00',
markerFillOpacity: 0.5,
markerLineColor: '#000',
markerLineWidth: 2
}
});
const pointLayer = new maptalks.PointLayer('polygon');
const groupLayer = new maptalks.GroupGLLayer('group', [pointLayer]).addTo(map);
function query() {
const extent = map.getExtent();
const geometry = [extent.xmin, extent.ymin, extent.xmax, extent.ymax].join(',');
service.query({
geometry: geometry,
geometryType: 'esriGeometryEnvelope'
}).then(json => {
json = JSON.parse(json);
console.log('fetures count:', json.features.length);
const geometries = service.toGeometry(json);
pointLayer.clear();
pointLayer.addGeometry(geometries);
// map.setCenterAndZoom(extent.getCenter(), zoom);
});
}
map.on('viewchange', query);
query();
var service = new maptalks.esri.ImageLayerService({
url: 'https://sampleserver6.arcgisonline.com/arcgis/rest/services/PoolPermits/MapServer/export',
debug: true,
map,
// 数据的坐标系,不设置时则默认使用map的坐标系,如果设置,则会按该坐标系转换为map的坐标系
// projection: 'EPSG:3857',
});
var imageLayer = new maptalks.ImageLayer('imagemaplayer');
map.addLayer(imageLayer);
function query() {
service.query().then(json => {
json = JSON.parse(json);
if (json.href) {
const extent = map.getExtent();
const geometry = [extent.xmin, extent.ymin, extent.xmax, extent.ymax];
imageLayer.setImages([{
url: json.href,
extent: geometry
}]);
}
})
}
map.on('viewchange', query);
query();
FAQs
A maptalks plugin to load ESRI services
We found that maptalks.esri demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.