[빅데이터/Folium]

안지은·2022년 12월 18일
0

기본적인 지도 호출

import folium

# google map에서 얻은 울산대학교 위도, 경도
map_osm = folium.Map(location=[35.5437411,129.2540956], zoom_start=15)

map_osm

map_osm.save('UOU.html')  #html 파일로 저장

tile 지정해서 지도 호출

map_osm = folium.Map(location=[35.5437411,129.2540956], zoom_start=14, tiles='Stamen Terrain')  #tile 지정
map_osm

map_osm = folium.Map(location=[35.5437411,129.2540956], zoom_start=15, tiles='Stamen Toner')
map_osm

특정 위치에 Marker 찍기

map_osm = folium.Map(location=[35.5437411,129.2540956], zoom_start=14)

#popup : 표기할 팝업 문구 지정 (마우스 클릭시 표기되는 문구).
folium.Marker([35.5437411,129.2540956], popup='울산대학교').add_to(map_osm)
folium.Marker([35.535444, 129.259542], popup='문수월드컵경기장').add_to(map_osm)
map_osm

map_osm = folium.Map(location=[35.5437411,129.2540956], zoom_start=14)

folium.Marker([35.5437411,129.2540956], popup='UNiverty',icon=folium.Icon(color='red',icon='info-sign')).add_to(map_osm) 
#icon='star'/icon_color='blue'/icon='cloud'도 있음.

folium.CircleMarker([35.535444, 129.259542], popup='문수월드컵경기장',radius=50,color='#3186cc',fill_color='#3186cc').add_to(map_osm)

map_osm

profile
공부 기록용

0개의 댓글