Socket
Book a DemoInstallSign in
Socket

@mapotic/mapotic-embed

Package Overview
Dependencies
Maintainers
2
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapotic/mapotic-embed

It enables to place your Mapotic.com map on your websites.

0.0.10
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
Source

Mapotic Embed

It enables to place your Mapotic.com map on your websites.

Usage

Below are some of the most common ways to include Mapotic Embed.

Using Html Element - declarative way

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>How use mapotic embed</title>
    <script
      src="https://cdn.jsdelivr.net/npm/@mapotic/mapotic-embed@0.0.10/dist/mapotic-map-es2015.js"
      type="module"
    ></script>
    <script
      src="https://cdn.jsdelivr.net/npm/@mapotic/mapotic-embed@0.0.10/dist/mapotic-map-es5.js"
      nomodule
      defer
    ></script>
  </head>
  <body>
    <mapotic-embed-map
      mapid="3922"
      lat="50.0850607"
      lng="14.4272246"
      zoom="17"
      custommarkerclickevent="true"
      style="width: 500px; height: 500px;"
    >
    </mapotic-embed-map>
    <script>
      let elem = document.querySelector('mapotic-embed-map');
      elem.addEventListener(
        'onmarkerclick',
        function (e) {
          console.log('onmarkerclick', e);
          return;
        },
        false
      );
    </script>
  </body>
</html>

Using document.createElement - imperative way

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>How use mapotic embed</title>
    <script
      src="https://cdn.jsdelivr.net/npm/@mapotic/mapotic-embed@0.0.10/dist/mapotic-map-es2015.js"
      type="module"
    ></script>
    <script
      src="https://cdn.jsdelivr.net/npm/@mapotic/mapotic-embed@0.0.10/dist/mapotic-map-es5.js"
      nomodule
      defer
    ></script>
  </head>
  <body>
    <div id="mapotic-embed-map-container" style="position: relative; width: 100%; height: 400px;"></div>

    <script>
      var mapElem = document.createElement('mapotic-embed-map');
      mapElem.setAttribute('mapid', '3922');
      mapElem.setAttribute('lat', '49.8602445');
      mapElem.setAttribute('lng', '13.7726288');
      mapElem.setAttribute('zoom', '16');
      mapElem.setAttribute('custommarkerclickevent', 'true');
      mapElem.setAttribute('style', 'width: 100%; height: 400px; display: block;');
      mapElem.addEventListener(
        'onmarkerclick',
        function (e) {
          console.log('onmarkerclick', e);
          return;
        },
        false
      );
      var mapContainer = document.querySelector('#mapotic-embed-map-container');
      mapContainer.appendChild(mapElem);
    </script>
  </body>
</html>

FAQs

Package last updated on 27 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.