Folium地图标记中的温度数字

时间:2018-09-24 17:25:10

标签: python-3.x folium

我想使用叶片在地图上为一组特定的经度和纬度添加温度,在叶片中我们有标记和弹出窗口,有没有办法添加像所附加的数字?

我有一个用于标记和弹出窗口的简单代码

import os
import folium
m = folium.Map(
    location=[27.6648, -81.5158],
    zoom_start=12,
    #tiles='Mapbox Bright'
)

folium.Marker([27.6648, -81.5158], popup='<i>test mountain</i>').add_to(m)
folium.Marker([27.2648, -81.4158], popup='<b>mountain2 Lodge</b>',icon=folium.Icon(color='red')).add_to(m)
m.save(os.path.join('simple_popups.html'))

我正在得到这样的标记和弹出窗口

我们可以使用叶来实现吗?

1 个答案:

答案 0 :(得分:0)

您可以为此使用DivIcon

Private Sub CommandButton1_Click()
Dim rowNum As Variant
Dim x As Variant
On Error Resume Next

rowNum = Application.InputBox(Prompt:="Please enter the row from where you want to add new empty rows downwards:", _
                                    Title:="Need to add new empty rows?", Type:=1)

                If (VarType(rowNum) = vbBoolean) And (rowNum = False) Then
                MsgBox "You canceled the event!", vbExclamation, "No Input!"

                ElseIf rowNum = 0 Then
                MsgBox "Smallest allowed row number is 7!", vbExclamation, "Invalid Input!"

                ElseIf rowNum < 0 Then
                MsgBox "Negative values are not allowed!", vbExclamation, "Invalid Input!"

                ElseIf rowNum < 7 Then 
        MsgBox "Smallest allowed row number is 7!!", vbExclamation, "Invalid Input!"

        ElseIf rowNum > 99 Then 
        MsgBox "Highest allowed row number is 99!", vbExclamation, "Invalid Input!"

                              End If
                              If rowNum < 7 Or rowNum > 99 Then End



x = Application.InputBox(Prompt:="Please insert the amount of empty rows that you need:", _
                            Title:="Amount of new rows?", Type:=1)


                If (VarType(x) = vbBoolean) And (x = False) Then
                MsgBox "You canceled the event!", vbExclamation, "No Input!"

                ElseIf x = 0 Then
                MsgBox "Smallest amount of new rows is 2!", vbExclamation, "Invalid Input!"

                ElseIf x < 2 Then
                MsgBox "Smallest amount of new rows is 2!", vbExclamation, "Invalid Input!"

                ElseIf x > 10 Then
                MsgBox "Highest amount of new rows is 10!", vbExclamation, "Invalid Input!"

                              End If
                              If x < 2 Or x > 10 Then End

Rows(rowNum & ":" & rowNum + x - 1).EntireRow.Insert Shift:=xlDown

End Sub