-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from nossas/feat/add-markers-in-leaflet-map
Feat: Adiciona ponto A e ponto B entre a linha no Mapa
- Loading branch information
Showing
6 changed files
with
212 additions
and
53 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
app/contrib/frontend/maps/migrations/0002_auto_20231005_1254.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Generated by Django 3.2 on 2023-10-05 12:54 | ||
|
||
import colorfield.fields | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('maps', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='maps', | ||
name='lineColor', | ||
field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da borda'), | ||
), | ||
migrations.AddField( | ||
model_name='maps', | ||
name='pointA', | ||
field=models.FileField(blank=True, null=True, upload_to='maps/icons/'), | ||
), | ||
migrations.AddField( | ||
model_name='maps', | ||
name='pointB', | ||
field=models.FileField(blank=True, null=True, upload_to='maps/icons/'), | ||
), | ||
migrations.AlterField( | ||
model_name='maps', | ||
name='geojson', | ||
field=models.FileField(blank=True, null=True, upload_to='maps/geojson/'), | ||
), | ||
] |
33 changes: 33 additions & 0 deletions
33
app/contrib/frontend/maps/migrations/0003_auto_20231005_1327.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 3.2 on 2023-10-05 13:27 | ||
|
||
import colorfield.fields | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('maps', '0002_auto_20231005_1254'), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameField( | ||
model_name='maps', | ||
old_name='pointB', | ||
new_name='point_a', | ||
), | ||
migrations.RenameField( | ||
model_name='maps', | ||
old_name='pointA', | ||
new_name='point_b', | ||
), | ||
migrations.RemoveField( | ||
model_name='maps', | ||
name='lineColor', | ||
), | ||
migrations.AddField( | ||
model_name='maps', | ||
name='line_color', | ||
field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da linha'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,12 @@ | |
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/tomickigrzegorz/[email protected]/dist/css/autocomplete.min.css"/> | ||
{% endaddtoblock %} | ||
|
||
<div id="map" data-maps-geojson="{{ instance.geojson.url }}"></div> | ||
<div id="map" | ||
data-maps-geojson="{{ instance.geojson.url }}" | ||
{% if instance.point_a %}data-maps-icons-point-A="{{ instance.point_a.url }}"{% endif %} | ||
{% if instance.point_b %}data-maps-icons-point-B="{{ instance.point_b.url }}"{% endif %} | ||
data-maps-linecolor="{{ instance.line_color }}"> | ||
</div> | ||
|
||
{% addtoblock "js" %} | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script> | ||
|
29 changes: 29 additions & 0 deletions
29
app/contrib/frontend/migrations/0004_auto_20231005_1254.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generated by Django 3.2 on 2023-10-05 12:54 | ||
|
||
import colorfield.fields | ||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('frontend', '0003_alter_button_font'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='button', | ||
name='background_color', | ||
field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor de fundo'), | ||
), | ||
migrations.AlterField( | ||
model_name='button', | ||
name='border_color', | ||
field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da borda'), | ||
), | ||
migrations.AlterField( | ||
model_name='button', | ||
name='color', | ||
field=colorfield.fields.ColorField(blank=True, default=None, image_field=None, max_length=25, null=True, samples=[('#FFFFFF', 'white'), ('#000000', 'black')], verbose_name='Cor da fonte'), | ||
), | ||
] |