Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@asicupv/markerpp

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asicupv/markerpp

MPP is a supercharged marker for Leaflet (although it may be used with other frameworks).

latest
npmnpm
Version
1.0.2
Version published
Maintainers
3
Created
Source

Marker Plus Plus

MPP is a supercharged marker for React Leaflet.

  • onClick: function to be executed on click.
  • latlon: marker position
  • imageData: dict:
    • iconSize: icon size on the map
    • anchor: icon anchor relative to iconSize
    • imageSize: rendered image size, aka: resolution
    • shadow: if shadow must be rendered
    • images: list(dict) configuration of each one of the image that compose the icon.
      • url: svg url
      • color
      • dx: X axis position
      • dy: Y axis position
      • dw: width
      • dh: height
  • circles_data: list(dict) configuration of each one of the circles that compose the icon.
    • fillColor
    • borderColor
    • borderWidth
    • radius
<MarkerPP
        onClick={() => console.log('click')}
        latlon={[39.479391, -0.341045]}
        imageData={{
          iconSize: [100, 50],
          anchor: [50, 35],
          imageSize: [200, 100],
          shadow: true,
          images: [
            {
              url: 'https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/svgs/regular/address-card.svg',
              color: '#ff0000',
              dx: 0,
              dy: 0,
              dw: 80,
              dh: 80,
            },
            {
              url: 'https://fonts.gstatic.com/s/i/short-term/release/materialsymbolsoutlined/other_houses/wght100fill1/48px.svg',
              color: '#fff',
              dx: 0,
              dy: -10,
              dw: 40,
              dh: 40,
            },
          ],
        }}
        circlesData={[{ fillColor: '#00ff0055', borderColor: 'green', borderWidth: 1, radius: 100 }]}
      >
        <Popup>Hello world</Popup>
      </MarkerPP>

Thanks to Igor Gaponov for this awesome guide: How to Create and Publish React TypeScript npm Package With Demo and Automated Build

Keywords

react

FAQs

Package last updated on 19 Jun 2023

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