JS SDK Mapy.cz

The original JavaScript SDK designed for embedding maps and data from Mapy.cz into websites.

We no longer recommend using the Mapy.cz JS SDK for new projects.

You can find the documentation at this link.

The old Mapy.cz API is a set of JavaScript components that display a map on a web page. The new Mapy.cz REST API is a functional and data-oriented API based on REST principles. It provides data (map tiles) and functions (geocoding, route planning) but is not tied to any specific rendering technology or environment. You can use it with any third-party library (see Map libraries) or develop your own solution. You can utilize the data and functions on websites, mobile applications, desktop applications, or the backend – whatever suits your needs.

Using the Premium JS SDK

If you are using the JavaScript SDK in the Premium mode (based on a contract), you need to set an API key.

The initialization of the JavaScript API is almost the same as shown in the example http://api.mapy.cz/view?page=instruction

Only one extra line needs to be added before calling Loader.load().

<script type="text/javascript" src="https://api.mapy.cz/loader.js"></script>
<script type="text/javascript">
        	Loader.apiKey = "your_api_key_here";

The JavaScript API takes care of distributing the key and passing it to individual functions automatically.