{"_id":"@binghamchris/gatsby-plugin-react-leaflet","name":"@binghamchris/gatsby-plugin-react-leaflet","dist-tags":{"latest":"4.0.3"},"versions":{"4.0.3":{"name":"@binghamchris/gatsby-plugin-react-leaflet","version":"4.0.3","description":"React Leaflet for Gatsby","main":"index.js","scripts":{"build":"babel src --out-dir .","prepare":"cross-env NODE_ENV=production npm run build"},"keywords":["gatsby","gatsby-plugin","react-leaflet"],"author":{"name":"David Weirich"},"license":"MIT","peerDependencies":{"gatsby":"^5.0.0","leaflet":"^1.9.4","react-leaflet":"^4.0.0"},"repository":{"type":"git","url":"git+https://github.com/binghamchris/gatsby-plugin-react-leaflet.git"},"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","cross-env":"^5.2.0"},"_id":"@binghamchris/gatsby-plugin-react-leaflet@4.0.3","gitHead":"ca6e9db674c181f30a08403335cd36cb7c760337","bugs":{"url":"https://github.com/binghamchris/gatsby-plugin-react-leaflet/issues"},"homepage":"https://github.com/binghamchris/gatsby-plugin-react-leaflet#readme","_nodeVersion":"20.12.2","_npmVersion":"10.7.0","dist":{"integrity":"sha512-3El64Vj5JUq1Wsqe54Z9VeJJZFzXWSVqy0rfE5WwmLVLxe+1cfBxtSZGP7klrmvpFQBGwSGkXmAkkolQ6TJ4/A==","shasum":"01b724e4ff52bcfc799d46f824654726a074e0c0","tarball":"https://registry.npmjs.org/@binghamchris/gatsby-plugin-react-leaflet/-/gatsby-plugin-react-leaflet-4.0.3.tgz","fileCount":9,"unpackedSize":4879,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3VF60/4sDGPtal22of8Md/wLqsXlX+6qw8EMkfvR1KwIgaLgv7dQZiciIH255S3WBsZDp/SIap8tUtnggAtgnHms="}]},"_npmUser":{"name":"binghamchris","email":"chris@pearit.co.uk"},"directories":{},"maintainers":[{"name":"binghamchris","email":"chris@pearit.co.uk"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-plugin-react-leaflet_4.0.3_1715866904841_0.7213166253070247"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-16T13:41:44.688Z","4.0.3":"2024-05-16T13:41:44.998Z","modified":"2024-05-16T13:41:45.299Z"},"maintainers":[{"name":"binghamchris","email":"chris@pearit.co.uk"}],"description":"React Leaflet for Gatsby","homepage":"https://github.com/binghamchris/gatsby-plugin-react-leaflet#readme","keywords":["gatsby","gatsby-plugin","react-leaflet"],"repository":{"type":"git","url":"git+https://github.com/binghamchris/gatsby-plugin-react-leaflet.git"},"author":{"name":"David Weirich"},"bugs":{"url":"https://github.com/binghamchris/gatsby-plugin-react-leaflet/issues"},"license":"MIT","readme":"# Package origins\n\nThis repository was forked from [dweirich/gatsby-plugin-react-leaflet](https://github.com/dweirich/gatsby-plugin-react-leaflet).\n\n# Getting started\n\nThis package takes care of setting up your project for [React Leaflet](https://react-leaflet.js.org/).\n\nThe current npm version is for Gatsby v5.\n\n\n## Step 1\n\nFirst install the packages.\n```\nnpm i --save gatsby-plugin-react-leaflet react-leaflet leaflet\n```\n\n## Step 2\n\nAdd the plugin to your Gatsby configuration.\n\n### gatsby-config.js\n```javascript\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-react-leaflet',\n      options: {\n        linkStyles: true // (default: true) Enable/disable loading stylesheets via CDN\n      }\n    }\n  ]\n}\n```\n\n## Step 3\n\nAdd your React Leaflet components.\n\n```javascript\nimport React from 'react'\nimport { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet'\n\nconst IndexPage = () => {\n  return (\n    <MapContainer style={{ height: '400px' }} center={[51.505, -0.09]} zoom={13} scrollWheelZoom={false}>\n      <TileLayer\n        attribution='&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors'\n        url=\"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\"\n      />\n      <Marker position={[51.505, -0.09]}>\n        <Popup>\n          A pretty CSS3 popup. <br /> Easily customizable.\n        </Popup>\n      </Marker>\n    </MapContainer>\n  )\n}","readmeFilename":"README.md"}