
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
next-store-locator
Advanced tools
A React component for easily integrating Google Maps Store Locator feature into Next.js applications. Check working example.
npm install next-store-locator-test
# or
yarn add next-store-locator-test
First, import the CSS for next-store-locator-test
at the top of your application or component to ensure the styles are loaded:
import 'next-store-locator-test/dist/style.css';
Here's a basic example to integrate the NextStoreLocator
component into your Next.js app:
import React, { useEffect, useState } from 'react';
import NextStoreLocator from 'next-store-locator-test';
const mapOptions = {
center: { lat: 40.7128, lng: -74.0060 },
zoom: 10,
mapTypeControl: false,
streetViewControl: false,
fullscreenControl: false,
styles: [{ featureType: 'poi', elementType: 'labels', stylers: [{ visibility: 'off' }] }],
};
const Page = () => {
const [locations, setLocations] = useState([]);
useEffect(() => {
async function fetchLocations() {
const response = await fetch('https://www.milestone.de/api/getstorelocatorlist');
const data = await response.json();
setLocations(data);
}
fetchLocations();
}, []);
return (
<main className="w-full pt-8">
<div className="w-full inline-flex justify-center pb-8">
<h1 className="text-3xl font-bold">Next Store Locator</h1>
</div>
{locations.length > 0 && (
<NextStoreLocator
locationsProp={locations}
mapOptionsProp={mapOptions}
iconPaths={{ markerIcon: 'images/custom-marker.png' }}
apiKey={"YOUR_GOOGLE_MAPS_API_KEY"}
/>
)}
</main>
);
};
export default Page;
Replace "YOUR_GOOGLE_MAPS_API_KEY"
with your actual Google Maps API key.
For more advanced usage and customization options, please refer to the official documentation.
Specify your package's license here, typically "MIT".
FAQs
React port of jquery store-locator plugin.
The npm package next-store-locator receives a total of 0 weekly downloads. As such, next-store-locator popularity was classified as not popular.
We found that next-store-locator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.