A library that makes Image Map Area responsive

Overview

img-map-area

A library that makes Image Map Area responsive.

Installation

# yarn
$ yarn add img-map-area

# npm
$ npm i img-map-area

Usage

  1. 统一处理页面中的 img map area.
// src/plugins/responsive-img-map-area.js

import { responsiveImgMapArea } from 'img-map-area'

window.addEventListener('load', () => {
  // .map-area-img 放置在想要进行 responsive 处理的 img 元素上
  const elements = document.querySelectorAll('.map-area-img')

  const resizeHandler = () => {
    elements.forEach((imgEl) => {
      responsiveImgMapArea(imgEl)
    })
  }

  resizeHandler()

  window.addEventListener('resize', resizeHandler)
})
  1. 应用到某个单独组件中。比如 .vue 或者 React 组件中。
You might also like...

A map tool with real-time collaboration 🗺️

Mapus Maps with real-time collaboration 🗺️ Mapus is a tool to explore and annotate collaboratively on a map. You can draw, add markers, lines, areas,

Jan 4, 2023

3D web map rendering engine written in TypeScript using three.js

3D web map rendering engine written in TypeScript using three.js

3D web map rendering engine written in TypeScript using three.js

Dec 30, 2022

Mind elixir is a free open source mind map core.

Mind elixir is a free open source mind map core.

Mind-elixir is a framework agnostic mind map core

Jan 2, 2023

Fast Map built for keys that are always fixed size uniformly distributed buffers.

turbo-hash-map Fast Map built for keys that are always fixed size uniformly distributed buffers. npm install turbo-hash-map Uses a prefix trie to map

Jun 20, 2022

Greasemonkey script to allow marking items on the interactive map of Elden Ring as completed.

Greasemonkey script to allow marking items on the interactive map of Elden Ring as completed.

Greasemonkey script (or Tampermonkey) to allow marking items on the interactive map of Elden Ring as completed. The interactive map is a Fextralife-project, all credits for the map go to them.

Jun 19, 2022

Interactive map overlay for finding secrets hidden around the world of Lost Ark.

Interactive map overlay for finding secrets hidden around the world of Lost Ark.

Lostark Map Overlay This is an interactive map overlay which is resizable, movable and can be kept up during gameplay for finding secrets hidden aroun

Dec 29, 2022

:ukraine: A self-hosted app for keeping track of employee wellbeing and dislocation during the Russo-Ukrainian war, with an interactive map.

:ukraine: A self-hosted app for keeping track of employee wellbeing and dislocation during the Russo-Ukrainian war, with an interactive map.

Helping organizations stay together and help their members in times of disaster On February 24th, 2022, the lives of the entire Ukrainian nation were

Dec 15, 2022

Generates an embeddable map that displays business info from an OSM object id.

# OSM Business Card Generates an embeddable map that displays business info from an OSM object id. Loads object type (n/w/r) and id from url parameter

May 26, 2022

Simple location picker on Leaflet map

Simple location picker on Leaflet map

Leaflet Location Picker Simple location picker with Leaflet map Usage: labelInsert a Geo Location input id="geoloc" type="text" value="" / /lab

Nov 17, 2022
Owner
elenh
a front-end engineer!
elenh
jQuery Vector Map Library

This project is a heavily modified version of jVectorMap as it was in April of 2012. I chose to start fresh rather than fork their project as my inten

10 Best Design 1.8k Dec 28, 2022
jQuery Vector Map Library

This project is a heavily modified version of jVectorMap as it was in April of 2012. I chose to start fresh rather than fork their project as my inten

10 Best Design 1.8k Dec 28, 2022
A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling

Windshaft A Node.js map tile library for PostGIS and torque.js, with CartoCSS styling. Can render arbitrary SQL queries Generates image and UTFGrid in

CARTO 306 Dec 22, 2022
Waypoints is a library that makes it easy to execute a function whenever you scroll to an element.

Waypoints Waypoints is a library that makes it easy to execute a function whenever you scroll to an element. var waypoint = new Waypoint({ element:

Caleb Troughton 10.3k Jan 4, 2023
JavaScript WebGL 3D map rendering engine

VTS Browser JS is a powerful JavaScript 3D map rendering engine with a very small footprint (about 163 kB of gziped JS code). It provides almost all f

Melown Technologies, SE 203 Dec 7, 2022
Mapbox Visual for Power BI - High performance, custom map visuals for Power BI dashboards

Mapbox Visual for Microsoft Power BI Make sense of your big & dynamic location data with the Mapbox Visual for Power BI. Quickly design high-performan

Mapbox 121 Nov 22, 2022
Add time dimension capabilities on a Leaflet map.

Leaflet TimeDimension Add time dimension capabilities on a Leaflet map. Examples and basic usage API L.Map L.TimeDimension L.TimeDimension.Layer L.Tim

SOCIB public code 379 Dec 23, 2022
Serverless raster and vector map tile generation using Mapnik and AWS Lambda

tilegarden ??️ ?? Contents About Usage Deployment to AWS Additional Configuration Options Required AWS Permissions Features Configuration Selection an

Azavea 89 Dec 22, 2022
Lightweight Node.js isochrone map server

Galton Lightweight Node.js isochrone server. Build isochrones using OSRM, Turf and concaveman. Francis Galton is the author of the first known isochro

Urbica 266 Dec 17, 2022
A pluggable Node.js map tile server.

TileStrata TileStrata is a pluggable "slippy map" tile server that emphasizes code-as-configuration. The primary goal is painless extendability. It's

Natural Atlas 409 Dec 30, 2022