PHPackages                             nanoblocktech/html-image-map - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. nanoblocktech/html-image-map

ActiveLibrary[Image &amp; Media](/categories/media)

nanoblocktech/html-image-map
============================

PHP class to create html image map.

1.1(2y ago)05MITPHPPHP ^7.0 || ^8.0

Since Dec 21Pushed 2y ago1 watchersCompare

[ Source](https://github.com/nanoblocktech/html-image-map)[ Packagist](https://packagist.org/packages/nanoblocktech/html-image-map)[ RSS](/packages/nanoblocktech-html-image-map/feed)WikiDiscussions main Synced 2w ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Class Image Map
---------------

[](#class-image-map)

Generate image map, based on coordinates

Installation Guide via Composer:

```
composer require nanoblocktech/html-image-map
```

### Usages

[](#usages)

Initialize class

```
use Luminova\ExtraUtils\ImageMapper\ImageMapper;
$map = new ImageMapper();
```

Create image mapping It will return instance of `ImageMapAreas`

```
$image = $map->addImage('http://example.com/path/to/image.png');
```

Add your map, areas and coordinate b

```
$area = $image->addArea(ImageMapper::RECTANGLE, 'My Area Title');
$area->bindOnclick('myFunction();');
$area->setCoordinates([44, 180, 60]);

$area2 = $image->addArea(ImageMapper::CIRCLE, 'My Area 2  Title');
$area2->bindLink('https://example.com/foo');
$area2->setCoordinates([100, 380, 60]);

// Get your image map

$image->display();
```

### Methods For `ImageMapper()`

[](#methods-for-imagemapper)

`$map = new ImageMapper();`

Methods And ParamDescriptionsaddImage(string image, string description, string name): ImageMapAreasAdd new image set### ImageMapper Constant Variable

[](#imagemapper-constant-variable)

NameTypeDescriptionsRECTANGLEStringImage mapping shape for rectangular areaCIRCLEStringImage mapping shape for circle areaPOLYGONStringImage mapping shape for polygon areaDEFAULTStringImage mapping shape for defaultBIND\_LINKStringBind area click to href link `href="example.com"`BIND\_JSStringBind area click to javascript onClick `onclick="myFunction();"`### Methods For `addImage()`

[](#methods-for-addimage)

`$image = $map->addImage('http://example.com/path/to/image.png');`

Methods And ParamDescriptionsaddArea(string type, string title): selfAdd map area and return `ImageMapAreas` instancebindClick(string type, string action): voidBind click event action to areasetCoordinates(array coords): voidSet area coordinatesaddCoordinate(int left, int top, int pixels): voidAdd coordinate same as `setCoordinates` except this accept parambuild(string id, string class): stringBuild and get html image map stringdisplay(string id, string class): voidDisplay html image map. shorthand for `echo build()`get(string id, string class): stringGet html image map string, shorthand for `build()`

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

970d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce34af529a4ed50696211a2b4d330fbadd2d1738bc5d010523eb4a85cf342b17?d=identicon)[peterujah](/maintainers/peterujah)

---

Top Contributors

[![peterujah](https://avatars.githubusercontent.com/u/16369609?v=4)](https://github.com/peterujah "peterujah (5 commits)")

---

Tags

htmlimageimage-mapphpphpimage mapluminovaPHP image map

### Embed Badge

![Health badge](/badges/nanoblocktech-html-image-map/health.svg)

```
[![Health](https://phpackages.com/badges/nanoblocktech-html-image-map/health.svg)](https://phpackages.com/packages/nanoblocktech-html-image-map)
```

###  Alternatives

[sybio/gif-creator

PHP class that creates animated GIF from multiple images

325415.9k14](/packages/sybio-gif-creator)[dereuromark/media-embed

A PHP library to deal with all those media services around, parsing their URLs and embedding their audio/video content in websites.

180591.1k20](/packages/dereuromark-media-embed)[jkphl/iconizr

A PHP command line tool for converting SVG images to a set of CSS icons (SVG &amp; PNG, single icons and / or CSS sprites) with support for image optimization and Sass output

4849.0k](/packages/jkphl-iconizr)[tomatophp/filament-media-manager

Manage your media files using spatie media library with easy to use GUI for FilamentPHP

14955.0k3](/packages/tomatophp-filament-media-manager)[kiwilan/php-audio

PHP package to parse and update audio files metadata, with `JamesHeinrich/getID3`.

3116.6k1](/packages/kiwilan-php-audio)[nikkanetiya/laravel-color-palette

Laravel Wrapper for `ksubileau/color-thief-php`. Grabs the dominant color or a representative color palette from an image. Uses PHP and GD or Imagick.

3312.7k](/packages/nikkanetiya-laravel-color-palette)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
