38 questions
1
vote
0
answers
48
views
How to simplify Leaflet's focusing if I need any combination of latLng and bounds?
I keep struggling with keeping track of center (with zoom) and bounds in parallel while (re)combining them as I collect further markers and shape bounds to focus on map.
What I wish is to have a ...
2
votes
1
answer
148
views
Django-leaflet trying to load a bunch of js files from a non-existent static/src directory
I'm using Django-leaflet in my project. When loading a page it's trying to load a bunch of js files from a static/src directory.
static/src/core...
static/src/geometry...
static/src/control...
static/...
0
votes
1
answer
280
views
Django-leaflet: map getBounds returning [object Object]
I am using django-leaflet to display a map in a template, where the goal is to only display the coordinates of the visible area of the map when the user moves the map.
For this I'm using the getBounds(...
0
votes
1
answer
519
views
How to get a reference to the already loaded leaflet map in Djano's admin page using Django-leaflet
I'm trying to add markers to the leaflet map loaded in Django's admin pages with data retrieved from an ajax call. However I cannot get a reference to the map that I can use in my template used to ...
1
vote
0
answers
2k
views
How to set leaflet map layer selected as default
In my Django app I have a leaflet map with two layers "active_event_layer" and "inactive_event_layer". I can select which layer I want to see in the top right menu. But when the ...
0
votes
1
answer
895
views
How to set bounds to django leaflet map?
In my django app I have a CenterModel with a location (Point) field and a RouteModel with a geom (Linestring) field. I am using django-leaflet to represent those geometric fields in the views (UI). I ...
0
votes
2
answers
2k
views
How to add ''draw a marker" Control to leaflet Map and capture event?
I want to create a map with leaflet and give the user the opportunity to add a marker to that map from the user interface. The user shuld mark a point(market to th map). Then when the point is set I ...
0
votes
1
answer
398
views
Uncaught TypeError: L.GeometryField is not a constructor django-leaflet
I am trying to post a geolocation to postgres database on Django-leaflet. I encounter Uncaught TypeError:L.GeometryField is not a constructor. I am using ajax
<script>
var csrftoken = &...
0
votes
2
answers
881
views
Django-leaflet has reversed LngLat instead of LatLng
While trying to put a marker on django-leaflet, my marker reverses (Lat, Lng) to (Lng,Lat) in GeoDjango admin using django-leaflet. How can I correct admin.py widget form to Lat, Lng coordinates?
...
0
votes
1
answer
397
views
specific leaflet layer style to change dynamically based on django tags
Potion of my html code do do style
<script type="text/javascript">
function our_Layers (map, options){
var datasets = new L.GeoJSON.AJAX("{% url 'owner' %}",{
...
0
votes
1
answer
121
views
Invalid Geojson Object Django-leaflet [django]
This is the geojson object I am trying to render on Django with django-leaflet and django-geojson.
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {...
0
votes
1
answer
816
views
How can I change the django-leaflet openlayers canvas?
I have a django-leaflet widget, but the widget shows some imagery instead of openlayers map, how can i change this on modelform?
from django import forms
from django.contrib.gis.forms import ...
1
vote
2
answers
1k
views
Display multiple polygon on Django admin
I have a model with a gis_models.GeometryField.
class MyModel(django.db.models):
area = gis_models.GeometryField(null=True, blank=True)
I'm displaying this model on Django admin but i'm using ...
0
votes
1
answer
2k
views
Display on a map objects matching a queryset with Django
I have a Django app, where each user can add a product with multiple possible metrics (width, height and length combination). A user must also specify in which city this product is located.
Users can ...
0
votes
1
answer
1k
views
"How to load map using leaflet in templates? "
It works in ![django default admin site form] (https://i.sstatic.net/RqIWN.jpg) but not on .
i tried passing attributes on leafletwidget, load leaflet_tags . it's not working or as i am new, could't ...
0
votes
0
answers
533
views
leaflet_map not working when used in a extended template django
I am using django-leaflet to display on my website and It works fine and displays the map on browser when I include the leaflet_map in the base template but when I use leaflet_map on a template that ...
0
votes
1
answer
788
views
how to add leaflet-geosearch control in django admin
beginner in programming, for a django(2.1) project i have added a leaflet-geosearch control on a map. It works fine but my need is to have this control in admin(LeafletGeoAdmin). I absolutely don't ...
1
vote
0
answers
262
views
Passing leaflet map object to a event
i am using leaflet to display map in django template. i give latitude, longitude and radius and filter results based on that and try to add marker to map. how ever i couldnt create map markers since i ...
1
vote
0
answers
329
views
problems in constructing webmap using django leaflet with the data in database
I have done my leaflet program using django-leaflet but the map is not displaying anything in output
Here is the code
models.py
from django.db import models
from django.contrib.gis.db import ...