npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tasareeh/tasareeh_components

v1.0.19

Published

A library for integrating ESRI-based map components into your React applications.

Readme

ESRI Logo

ESRI Map Component Library

A library for integrating ESRI-based map components into your React applications.

Installation

You can install the ESRI Map Component Library via npm or yarn:

npm install @tasareeh/tasareeh_components --save
# or
yarn add @tasareeh/tasareeh_components

Usage

After installation, you can use the MapComponent in your React application.

Basic Example

import { MapComponent } from "@tasareeh/tasareeh_components";

// Default map view is created if mapConfig is not passed as a property
<MapComponent 
  mapConfig={mapConfig} // Configuration object for the map (required)
  zoom={true} // Boolean for showing or hiding the default zoom buttons
  attributions={true} // Boolean for hiding or viewing the map attributions.
  afterViewCreateCallback={handleMapLoad} // A callback function triggered after map load.
/>

// Example mapConfig object:
const mapConfig = {
  basemap: "satellite", // Available options: satellite, streets, topographic, etc.
  center: [78.9629, 20.5937], // Longitude, Latitude
  zoom: 5, // Zoom level
  width: "100%", // Map width (px or %)
  height: "600px" // Map height (px)
};

Props

| Prop | Type | Description | |-------------------------|-----------|-------------| | mapConfig | object | A configuration object for the map (e.g., center, zoom, layers, etc.). Required. | | zoom | boolean | Determines whether to show the zoom buttons (default is true). | | attributions | boolean | Determines whether to show the map attributions (default is true). | | afterViewCreateCallback | function | A callback function that is triggered after the map has been loaded. |

Adding More Functionalities After Map Load

Example of Adding a Layer After Map Load:

Once the map view is created, you can add further functionalities, such as adding a new layer:

// Example to add a MapImageLayer to the map after it has been loaded
const handleMapLoad = ({ map, view }) => {
  const identifyLayer = new MapImageLayer({
    url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
  });

  map.add(identifyLayer);
};

Full Example in a React Component

import React from "react";
import { MapComponent } from "@tasareeh/tasareeh_components";
import MapImageLayer from "@arcgis/core/layers/MapImageLayer.js";

function App() {
  const mapConfig = {
    basemap: "satellite",
    center: [78.9629, 20.5937],
    zoom: 5,
    width: "100%",
    height: getMapHeight() + "px"
  };

  const handleMapLoad = ({ map, view }) => {
    const identifyLayer = new MapImageLayer({
      url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
    });

    map.add(identifyLayer);
  };

  function getMapHeight() {
    return window.innerHeight;
  }

  return (
    <div>
      <MapComponent 
        mapConfig={mapConfig} 
        zoom={true} 
        attributions={true} 
        afterViewCreateCallback={handleMapLoad} 
      />
    </div>
  );
}

export default App;

License

This project is licensed under the MIT License.

MIT License

© 2025 Masthan Patan

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.