You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37-3Lines changed: 37 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,11 +126,11 @@ if __name__ == "__main__":
126
126
##### `Map()` Parameters
127
127
128
128
-**lat**: The latitude coordinate for centering the map.
129
-
-**lng**: The longitutde coordinate for centering the map.
129
+
-**lng**: The longitude coordinate for centering the map.
130
130
-**zoom**: The zoom level. Defaults to `13`.
131
131
-**maptype**: The map type - `ROADMAP`, `SATELLITE`, `HYBRID`, `TERRAIN`. Defaults to `ROADMAP`.
132
-
-**markers**: Markers array of tuples having (**lat**, **lng**, infobox, icon). Defaults to `None`.
133
-
- or **markers**: a list of dicts containing **icon, lat, lng, infobox**.
132
+
-**markers**: Markers array of tuples having (**lat**, **lng**, infobox, icon, label). Defaults to `None`.
133
+
- or **markers**: a list of dicts containing **lat**, **lng**, infobox, icon, label.
134
134
- or **markers**: Markers dictionary with icon urls as keys and markers array as values.
135
135
-**varname**: The instance variable name.
136
136
-**style**: A string containing CSS styles. Defaults to `"height:300px;width:300px;margin:0;"`.
@@ -223,6 +223,40 @@ Here's an example snippet of code:
223
223
Which results in something like the following map:
224
224
<imgwidth="1439"alt="screen shot 2015-07-29 at 2 41 52 pm"src="https://cloud.githubusercontent.com/assets/8108300/8969650/13b0de7a-3602-11e5-9ed0-9f328ac9253f.png">
225
225
226
+
### Label
227
+
228
+
Here's an example snippet of code:
229
+
```python
230
+
231
+
Map(
232
+
identifier="labelsmap",
233
+
lat=37.4419,
234
+
lng=-122.1419,
235
+
markers=[
236
+
{
237
+
'lat': 37.4500,
238
+
'lng': -122.1350,
239
+
'label': "X"
240
+
},
241
+
{
242
+
'lat': 37.4419,
243
+
'lng': -122.1419,
244
+
'label': "Y"
245
+
},
246
+
{
247
+
'lat': 37.4300,
248
+
'lng': -122.1400,
249
+
'label': "Z"
250
+
}
251
+
]
252
+
)
253
+
254
+
```
255
+
256
+
Which results in something like the following map:
257
+
258
+
<imgwidth="271"alt="Map showing markers with labels"src="https://user-images.githubusercontent.com/708882/92332217-a3363280-f041-11ea-975c-0ac9413ada68.png">
259
+
226
260
### Fit all markers within bounds
227
261
228
262
Allow users to easily fit all markers within view on page load
0 commit comments