1.0.0 • Published 4 years ago

fatico-kakaomaps v1.0.0

Weekly downloads
-
License
CC BY 2.0
Repository
-
Last release
4 years ago

kakaomaps - Add Kakaomaps to your Fatico webserver

fatico-kakaomaps is a plugin for Fatico that adds Kakaomaps to your Fatico webserver. Surprisingly, no API keys are required.

Quickstart

Here is a step-by-step guide to get started with fatico-kakaomaps. 1. Install the package with npm. npm install fatico-kakaomaps 2. Add the init script to your HTML file. The script is required for every HTML file.

<script src="https://spi.maps.daum.net/imap/map_js_init/v3.js"></script>
  1. Use the package
    // index.js
    res.element({
        'kakaomaps': require('fatico-kakaomaps').initMap,
    }, 'map.html')
    // map.html
    <div class="map" style="width:500px;height:400px;"></div>
    <kakaomaps>
        {
        "lat": "37.5825",
        "lng": "126.9731",
        "level": "2",
        "mapName": "KakaoMaps"
        }
    </kakaomaps>

Config

Inside the HTML file, you can customize the basic map. lat and lng are the coordinates of the center of the map.While level is the zoom level of the map, mapName is the name of the map, used for other APIs.Without the config object, the map will be displayed at the center of the Blue House, with zoom level 2. Be careful, you must include at least {} as the config, or else there will be an error on the client side.

External APIs

You may use all of the APIs from the official API documentation(down below). While using the API, replace map from the example code with the mapName you set in the config. Default name is FaticoKakaoMaps. Example - block zoom

<kakaomaps>
    {
        "lat": "37.5825",
        "lng": "126.9731",
        "level": "2",
        "mapName": "KakaoMaps"
    }
</kakaomaps>
<script>
    KakaoMaps.setZoomable(false)
</script>

Links

1.0.0

4 years ago