-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Add new geocoding provider: Bing #646
Merged
Merged
Changes from 15 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
b4e1702
Add GEOCODING_PROVIDERS setting.
0097084
Add geocoding_providers to qdjango.project model.
fbd085b
Update base settings GEOCODING_PROVIDERS.
c4d0067
Add qdjango utility: get_geocoding_providers.
73f1334
Add geocoding_provider CRUD.
469b402
Change initconfig API REST proeperty group.mapcontrols from list to d…
c9e04b1
Fix for update projects with geocoding_providers empty or None.
2218022
Check for geocoding_providers is empty.
3f493f5
Update geoconding_providers qdjango.project field for backward compat…
04c50f2
Fix test.
5e3aab4
Merge branch 'dev' into Set_geocoding_provider
b62488f
Add sql to migration for change mapcontrol nominatim in geocoding
803aca9
Update mapcontrol structure
bd392a3
Change from 'provider' to 'providers' inside the options of mapcontro…
fc1f9b0
Change from 'provider' to 'providers' inside the options of mapcontro…
9354137
:arrow_up: Client:
volterra79 18c4005
:arrow_up: Client:
volterra79 4600cf7
:arrow_up: Client:
volterra79 a5e397c
Small fix.
b6ed5dd
Typo.
6a58099
Add email exists check on recovery username form.
81b6078
Refactoring and add settings to reset password and user recovery emai…
77fe30d
:sparkles: Change password at first login (#650)
wlorenzetti b7c8443
:sparkles: Add support to qgis `'postgresraster'` layer (#652)
wlorenzetti a2d91ef
Fix get filter layer saved with anonymous user. (#654)
wlorenzetti b85e3ef
Typo
8ac9b33
Fix importing project with RelationReference widget
6260f05
Fix migrations.
524a63a
:arrow_up: Client:
volterra79 f6d32f8
:arrow_up: Client:
volterra79 3609ef4
:arrow_up: Client:
volterra79 90db595
:arrow_up: Client:
volterra79 347b7a6
:arrow_up: Client:
volterra79 8e982b7
Merge branch 'dev' into Set_geocoding_provider
da81786
:arrow_up: Client:
volterra79 536cb10
:arrow_up: Client:
volterra79 bfc45e4
:arrow_up: Client:
volterra79 d0fb196
:arrow_up: Client:
volterra79 33444f3
:arrow_up: Client:
volterra79 4395af0
mispelling
Raruto 54c73c1
:arrow_up: Client:
volterra79 3cdd053
Remove 'Bing' from default value of 'GEOCODING_PROVIDERS' setting.
15be9ac
:arrow_up: Client:
volterra79 60dd474
:arrow_up: Client:
volterra79 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
26 changes: 26 additions & 0 deletions
26
g3w-admin/qdjango/migrations/0115_project_geocoding_providers.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,26 @@ | ||
# Generated by Django 3.2.23 on 2023-11-08 10:35 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('qdjango', '0114_alter_sessiontokenfilter_token'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='project', | ||
name='geocoding_providers', | ||
field=models.TextField(blank=True, null=True, verbose_name='Geocoding providers'), | ||
), | ||
|
||
# Rename map control nominatim in geocoding | ||
migrations.RunSQL( | ||
"UPDATE core_mapcontrol SET name='geocoding' WHERE name='nominatim'" | ||
), | ||
migrations.RunSQL( | ||
"UPDATE qdjango_project SET geocoding_providers='[\"nominatim\"]'" | ||
), | ||
] |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wlorenzetti hiding it can become difficult to use (and discover), I would recommend showing an informational message instead, eg:
Correct me if I'm wrong, only
Nominatim
provider will be activated by default for each project (so it wouldn't send invalid provider configurations to the client anyway):There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Raruto for me is correct not show Bing if a a vendor key for it is not set inside the settings. It could be useful add a description for the find int he form writing a thing like this: "For use Bing geoding is necessary have a Bing API key "
No why? at most you will have a map control without provider in the configuration API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I said that because it complicates development a bit.
API keys (and other server configurations) can also be added on the fly via JS.
If we also have to check the docker configuration it becomes an extra step (a "duplicated" step) which would require a dedicated documentation..
Even on the server side, a sysadmin might even be happy to simply do that:
which is equivalent to the wordy version:
But without the risk to lose them in configuration files.
In essence, let's leave people a little more freedom on how to handle it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Raruto ok I can understand what you are saying me, but the VENDORS_KEYS are used also for other features i.e. base layers .. so I think if better leave one place where to set the VENDOR key.