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
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ When working with this table in the admin panel, we want to see a map with objec
64
64
65
65
To enable the display of `Location` objects on the map in the Django admin panel, you need to make changes to the model class in the` models.py` file and to the `admin.py` file.
66
66
67
-
Add the django_admin_geomap.GeoItem "mixin" class to the inheritance list of the `Location` class and define two properties:` geomap_longitude` and `geomap_latitude`.
67
+
Add the `django_admin_geomap.GeoItem` "mixin" class to the inheritance list of the `Location` class and define two properties:` geomap_longitude` and `geomap_latitude`.
68
68
These properties should return the longitude and latitude of the object as a string.
69
69
70
70
```python
@@ -83,7 +83,7 @@ class Location(models.Model, GeoItem):
83
83
returnstr(self.lat)
84
84
```
85
85
86
-
In the `admin.py` file, when registering a model, you need to use the`django_admin_geomap.ModelAdmin` class.
86
+
In the `admin.py` file, when registering a model, you need to use the`django_admin_geomap.ModelAdmin` class.
87
87
88
88
```python
89
89
# admin.py
@@ -166,9 +166,9 @@ class Location(models.Model, GeoItem):
166
166
returnself.geomap_popup_view
167
167
```
168
168
169
-
### New object marker icon
169
+
### New object icon
170
170
171
-
The `geomap_new_feature_icon` property of the`django_admin_geomap.ModelAdmin` class sets the path to the marker icon when adding a new object.
171
+
The `geomap_new_feature_icon` property of the`django_admin_geomap.ModelAdmin` class sets the path to the marker icon when adding a new object.
172
172
173
173
```python
174
174
# admin.py
@@ -180,7 +180,7 @@ class Admin(ModelAdmin):
180
180
181
181
### Zoom level and center of the map when displaying a list of objects
182
182
183
-
You can change the zoom level and position of the center of the map by setting the properties `geomap_default_longitude`,` geomap_default_latitude` and `geomap_default_zoom` in the class`django_admin_geomap.ModelAdmin`.
183
+
You can change the zoom level and position of the center of the map by setting the properties `geomap_default_longitude`,` geomap_default_latitude` and `geomap_default_zoom` in the class`django_admin_geomap.ModelAdmin`.
184
184
185
185
By default, the center of the map is located at the point with coordinates "0.0", "0.0" and the scale is "1".
0 commit comments