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. [Utility &amp; Helpers](/categories/utility)
4. /
5. nanoblocktech/html-image-map

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

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

PHP class to create html image map.

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

Since Dec 21Compare

[ 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 Synced today

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

Popularity5

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

924d ago

### Community

Maintainers

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

---

Tags

phpimage 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

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21623.4k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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