Hospital Map is a web application designed to help users locate nearby hospitals on an interactive map. The application uses geolocation services and mapping technologies to provide real-time hospital locations, making it easier for users to find healthcare facilities quickly.
- Interactive Map Interface - Browse a user-friendly map to find hospitals in your area.
- Geolocation Support - Automatically detects your location and centers the map accordingly.
- Hospital Information - Displays details about each hospital, including name, address, and contact information.
- Search Functionality - Users can search for hospitals in specific locations.
- Responsive Design - Works on both desktop and mobile devices.
- HTML
- CSS
- JavaScript
- EJS (Embedded JavaScript Templates)
- Node.js
- Express.js
- Leaflet - A lightweight JavaScript library for interactive maps.
- OpenStreetMap - Provides free geographic data.
To run the project locally, follow these steps:
-
Clone the Repository:
git clone https://github.com/SAPtadeep27/hospital_map.git
-
Navigate to the Project Directory:
cd hospital_map
-
Install Dependencies:
npm install
-
Start the Application:
npm start
The application will run on
http://localhost:3000
by default.
-
Access the Application: Open your browser and go to
http://localhost:3000
or visit the live version at Hospital Map. -
Enable Geolocation: Grant permission for the app to access your location for accurate results.
-
Explore Hospitals:
- Use the interactive map to find hospitals.
- Click on markers to view hospital details.
- Search for hospitals by city or address.
hospital_map/
├── public/
│ ├── css/
│ │ └── styles.css
│ ├── js/
│ │ └── main.js
│ └── images/
├── views/
│ ├── index.ejs
│ └── layout.ejs
├── app.js
├── package.json
└── README.md
public/
: Contains static assets like CSS, JavaScript, and images.views/
: Holds EJS templates for rendering HTML pages.app.js
: The main server file for handling requests.package.json
: Manages dependencies and scripts.
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name
- Make your changes and commit them:
git commit -m "Description of changes"
- Push to the branch:
git push origin feature-name
- Open a Pull Request.
- Leaflet for the interactive map library.
- OpenStreetMap for providing open-source map data.
Thank you for using Hospital Map! Feel free to contribute and enhance the project.