Skip to content

Commit 7fcc359

Browse files
version 1.0.1
1 parent b6bf0a8 commit 7fcc359

12 files changed

Lines changed: 77 additions & 14 deletions
13 Bytes
Binary file not shown.
594 Bytes
Binary file not shown.

MapConfig/map.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ def add_custom_icon_marker(self, place_name, icon_url, icon_size=(30, 30), popup
4040
self._init_map_if_needed([lat, lon])
4141
icon = folium.CustomIcon(icon_url, icon_size=icon_size)
4242
folium.Marker([lat, lon], icon=icon, popup=popup).add_to(self._map)
43+
44+
def add_path(self,first_place, second_place, color='red', weight=5, popup=None):
45+
lat1, lon1 = self._get_coordinates(first_place)
46+
lat2, lon2 = self._get_coordinates(second_place)
47+
self._init_map_if_needed([(lat1 + lat2) / 2, (lon1 + lon2) / 2])
48+
folium.PolyLine([(lat1, lon1), (lat2, lon2)], color=color, weight=weight, popup=popup).add_to(self._map)
4349

4450
def save(self, filepath="my_map.html"):
4551
if self._map:

ReadMe.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
1-
# GeoMap
1+
# MapConfig
22

3-
A simple Python library to create interactive geo maps using only place names.
3+
MapConfig is a simple, lightweight Python library for creating beautiful interactive maps using only place names (for example, "New Delhi", "Paris", "Tokyo") without needing to know coordinates.
44

5-
## Features
5+
It uses OpenStreetMap's Nominatim API to fetch coordinates and Folium to render maps.
66

7-
- Add markers by place name only.
8-
- Add circle overlays by place name.
9-
- Add custom icon markers by place name.
10-
- Automatically centers on first place.
11-
- Open in browser (`show()`) or save (`save()`).
7+
---
128

13-
## Installation
9+
## ⭐ Features
1410

11+
- 🔥 Add simple markers with just a place name
12+
- 📍 Add circles to highlight areas
13+
- 🖼️ Add custom icon markers
14+
- 💨 Automatically center and display in the browser (no saving needed)
15+
- 🌐 Show directly in a popup browser tab or export as HTML
16+
- add paths between two places
17+
-
18+
more coming soon ..
19+
20+
---
21+
22+
## 🚀 Example
23+
24+
```python
25+
from mapconfig import GeoMap
26+
27+
m = GeoMap()
28+
m.add_marker("New Delhi", popup="Capital City")
29+
m.add_circle("Hyderabad", radius=10000, color="green", popup="Cyber Hub")
30+
m.add_custom_icon_marker("Chennai", icon_url="https://cdn-icons-png.flaticon.com/512/684/684908.png", popup="Beach City")
31+
32+
m.show()

Setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
setup(
44
name="mapconfig",
5-
version="1.0.0",
5+
version="1.0.1",
66
description="A simple Python library for creating interactive maps with markers, circles, and custom icons",
77
author="cyrus-spc-tech",
88
author_email="tanishgupta12389@gmail.com",
9+
long_description=open("README.md", encoding="utf-8").read(),
10+
long_description_content_type="text/markdown",
911
packages=find_packages(),
1012
install_requires=[
1113
"folium>=0.19.0",
-2.78 KB
Binary file not shown.

dist/mapconfig-1.0.0.tar.gz

-2.3 KB
Binary file not shown.
3.44 KB
Binary file not shown.

dist/mapconfig-1.0.1.tar.gz

3 KB
Binary file not shown.

mapconfig.egg-info/PKG-INFO

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,56 @@
11
Metadata-Version: 2.4
22
Name: mapconfig
3-
Version: 1.0.0
3+
Version: 1.0.1
44
Summary: A simple Python library for creating interactive maps with markers, circles, and custom icons
55
Author: cyrus-spc-tech
66
Author-email: tanishgupta12389@gmail.com
77
Classifier: License :: OSI Approved :: MIT License
88
Classifier: Programming Language :: Python :: 3
99
Classifier: Programming Language :: Python :: 3.12
1010
Requires-Python: >=3.6
11+
Description-Content-Type: text/markdown
1112
License-File: LICENCE
1213
Requires-Dist: folium>=0.19.0
1314
Requires-Dist: requests>=2.25.0
1415
Dynamic: author
1516
Dynamic: author-email
1617
Dynamic: classifier
18+
Dynamic: description
19+
Dynamic: description-content-type
1720
Dynamic: license-file
1821
Dynamic: requires-dist
1922
Dynamic: requires-python
2023
Dynamic: summary
24+
25+
# MapConfig
26+
27+
MapConfig is a simple, lightweight Python library for creating beautiful interactive maps using only place names (for example, "New Delhi", "Paris", "Tokyo") without needing to know coordinates.
28+
29+
It uses OpenStreetMap's Nominatim API to fetch coordinates and Folium to render maps.
30+
31+
---
32+
33+
## ⭐ Features
34+
35+
- 🔥 Add simple markers with just a place name
36+
- 📍 Add circles to highlight areas
37+
- 🖼️ Add custom icon markers
38+
- 💨 Automatically center and display in the browser (no saving needed)
39+
- 🌐 Show directly in a popup browser tab or export as HTML
40+
- add paths between two places
41+
-
42+
more coming soon ..
43+
44+
---
45+
46+
## 🚀 Example
47+
48+
```python
49+
from mapconfig import GeoMap
50+
51+
m = GeoMap()
52+
m.add_marker("New Delhi", popup="Capital City")
53+
m.add_circle("Hyderabad", radius=10000, color="green", popup="Cyber Hub")
54+
m.add_custom_icon_marker("Chennai", icon_url="https://cdn-icons-png.flaticon.com/512/684/684908.png", popup="Beach City")
55+
56+
m.show()

0 commit comments

Comments
 (0)