Add map to node-red

<link rel="stylesheet" href="" />
<script src=""></script>

    (function() {
        const cScope = this.scope;
        setTimeout(function () {
        	const map ='mapid').setView([48.204550, 16.364333], 13);
            let marker;
        	L.tileLayer('https://{s}{z}/{y}/{x}.png', {
        		maxZoom: 18,
                subdomains: ["maps1", "maps2", "maps3", "maps4"]
        	map.on('click', function(e) {
                if (marker) {
                marker = L.circleMarker(e.latlng).addTo(map);
            setTimeout(function () {
            }, 100);
        }, 300);

<div id="mapid" style="width: 100%; height: 320px;"></div>

This is some sample ui template for node-red ui, hope this help

Happy Coding

Salam ngoprek


Author: susiloharjo

Khoirunnas anfa'ahum linnas A Father, Husband and love to learn person Love my Family, Electronics, Photography, Robot, Dreaming, Programming

Ditunggu komennya ...

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: