Draw on Google Map is a React-based web application that integrates with the Google Maps API to provide an interactive map experience. Users can view a map, change marker locations, and draw lines and polygons directly on the map.
- Interactive Map: Displays a Google Map using the
@react-google-maps/apilibrary. - Marker Management: Users can place and move markers on the map.
- Drawing Tools: Allows users to draw lines and polygons on the map.
- Node.js (version specified in
.nvmrc) - npm (Node Package Manager)
-
Clone the repository:
git clone <repository-url> <project-name> cd <project-name>
-
Install dependencies:
npm install
-
Set up environment variables:
- Create a
.envfile in the root directory. - Add your Google Maps API key:
REACT_APP_GOOGLE_MAPS_API_KEY=your_api_key_here REACT_APP_GOOGLE_MAPS_MAP_ID=your_map_id_here
- Create a
-
Start the development server:
npm start
-
Open your browser and navigate to
http://localhost:3000.
- To create a production build, run:
npm run build
npm start: Starts the development server.npm run build: Builds the app for production.npm run lint: Lints the codebase using ESLint.npm test: Runs the test suite using Jest.
- src/components/Map: Contains the main map component and related utilities.
- src/components/Head: Header component for the application.
- public/index.html: The main HTML file.
- webpack.config.js: Webpack configuration for bundling the application.
This project is licensed under the ISC License.
Gordon
