PHPackages                             occ2/nette-mapy-cz - 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. occ2/nette-mapy-cz

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

occ2/nette-mapy-cz
==================

Map control and form map picker based on MAPY.CZ API for Nette Framework

1.1.2(6y ago)08011[2 PRs](https://github.com/occ2/nette-mapy-cz/pulls)MITPHPPHP ^7.2

Since Sep 1Pushed 4y ago1 watchersCompare

[ Source](https://github.com/occ2/nette-mapy-cz)[ Packagist](https://packagist.org/packages/occ2/nette-mapy-cz)[ RSS](/packages/occ2-nette-mapy-cz/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (4)Versions (10)Used By (0)

Nette MAPY.CZ
=============

[](#nette-mapycz)

Map coordinates picker and map control using mapy.cz API for Nette Framework

Installation
------------

[](#installation)

```
composer require occ2/nette-mapy-cz
```

Install JS file
---------------

[](#install-js-file)

Add assets/mapycz.js into your web directory (www/js etc.)

Add MAPY.CZ loader and project javascript files to your page heading
--------------------------------------------------------------------

[](#add-mapycz-loader-and-project-javascript-files-to-your-page-heading)

```

	Loader.load()

```

Setup config
------------

[](#setup-config)

Register control factory as service in your config.neon register extension add picker to you forms

```
# register method addGpsPicker to youe forms
extensions:
  mapycz: MapyCZ\DI\GPSPickerExtension

services:
  # add filter json to your latte engine
  nette.latteFactory:
    setup:
      - addFilter(json, MapyCZ\Helpers\Filters::json)
  # create map control factory service
  - MapyCZ\Controls\MapControl\Factories\IMapControlFactory
```

Usage
-----

[](#usage)

In your presenter

```
use MapyCZ\Controls\MapControl\Factories\IMapControlFactory;
use MapyCZ\Controls\MapControl;
use Nette\Application\UI\Form;

/**
 * @var IMapControlFactory
 * @inject
 */
public $mapControlFactory;

...

/**
 * @return MapControl
 * @param string $name
 */
protected function createComponentMap(string $name): MapControl
{
    $map = $this->mapControlFactory->create();
    $map->settings = [
        "mapId" => "map", // HTML id of map element
        "width" => 400, // map width in pixels
        "height" => 300, // map height in pixels
        "units" => "px", // units of map dimensiosns
        "mapType" => 1, // default map
        "center" => [ // default center of map
            "latitude" => 50,
            "longitude" => 15,
        ],
        "defaultZoom" => 13, // default zoom
        "controls" => true, // show controls
    ];
    $this->addComponent($map, $name);
    return $map;
}

...

/**
 * @return Form
 * @param string $name
 */
protected function createComponentForm(string $name): Form
{
	$form = new Form();

	...
	$form->addGpsPicker('gps', 'Vyberte polohu')
             ->setSettings([
                "mapId" => "map",
                "width" => 400,
                "height" => 300,
                "mapType" => 1,
                "units" =>  "px",
                "center" => [
                    "latitude" => 50,
                    "longitude" => 15,
                ],
                "defaultZoom" => 12,
                "controls" => true,
             ]);
	..

	$this-addComponent($form, $name);
	return $form;
}
```

GPS picker validate coordinates (latitude -90 - 90, longitude -180 - 180) on server side. and returns ArrayHash with latitude and longitude properties

```
	 $values = $form->getValues();
	 $latitude = $values->gps->latitude;
	 $longitude = $values->gps->longitude;
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~6 days

Total

6

Last Release

2410d ago

### Community

Maintainers

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

---

Top Contributors

[![xpackal5](https://avatars.githubusercontent.com/u/17193365?v=4)](https://github.com/xpackal5 "xpackal5 (8 commits)")[![Roman3349](https://avatars.githubusercontent.com/u/4655467?v=4)](https://github.com/Roman3349 "Roman3349 (1 commits)")

### Embed Badge

![Health badge](/badges/occ2-nette-mapy-cz/health.svg)

```
[![Health](https://phpackages.com/badges/occ2-nette-mapy-cz/health.svg)](https://phpackages.com/packages/occ2-nette-mapy-cz)
```

###  Alternatives

[nette/code-checker

✅ Nette CodeChecker: A simple tool to check source code against a set of Nette coding standards.

881.7M6](/packages/nette-code-checker)[uestla/twigrid

Experimental DataGrid for Nette Framework

1712.3k2](/packages/uestla-twigrid)

PHPackages © 2026

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