MahmoudArafaaat
MahmoudArafaaat
this is html of the map with the plugin : https://jsfiddle.net/kvsgt9hu/
this one i reformed of the link
Leaflet Map with Ruler #map { height: 600px; } // Create a map centered around Cairo, Egypt var map = L.map('map').setView([30.0444, 31.2357], 8); // Add Esri Satellite tile layer L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}',...
def initialize_map(self): # Create a base map m = folium.Map(location=[30.0444, 31.2357], zoom_start=8) folium.TileLayer( tiles='https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', attr='Esri', name='Esri Satellite', overlay=False, control=True ).add_to(m) m.get_root().header.add_child(folium.CssLink("https://unpkg.com/[email protected]/dist/leaflet.css")) m.get_root().header.add_child(folium.CssLink("https://cdn.rawgit.com/gokertanrisever/leaflet-ruler/master/src/leaflet- ruler.css")) m.get_root().html.add_child(folium.JavascriptLink("https://unpkg.com/[email protected]/dist/leaflet.js")) m.get_root().html.add_child(folium.JavascriptLink("https://cdn.rawgit.com/gokertanrisever/leaflet-ruler/master/src/leaflet- ruler.js")) my_js = ''' L.control.ruler().addTo(map);...
thanks for guiding me , it was easier to add the plugin to my folium library than adding it directly to my code [ruler.txt](https://github.com/user-attachments/files/16920265/ruler.txt)
I've already linked the code to this txt file and edited the init.py inside plugins folder https://github.com/user-attachments/files/16920265/ruler.txt