Fix ux - #9
Open
michalstepniewski wants to merge 6 commits into
Open
Conversation
vevurka
reviewed
Mar 31, 2017
| {% endif %} | ||
| {% endif %} | ||
|
|
||
| <!-- 2017.03.18 not to see recnt edits, find a smarter way |
| geocoder_for_magic_key = Geocoder( | ||
| sources=settings.OMGEO_SETTINGS_FOR_MAGIC_KEY) | ||
|
|
||
| geocoder_for_magic_key = Geocoder([['omgeo.services.Google', {'settings': {'api_key': 'GST7YMc0AM9UOsEqAYatIS9GOghnYnwZIip_GQypG1c915E7QT9tDFcpOh9bZgKZQoc3YSyaagDIZhkZHn5vHSnvC5N7'}}]]) |
| geocoder_for_magic_key = Geocoder([['omgeo.services.Google', {'settings': {'api_key': 'GST7YMc0AM9UOsEqAYatIS9GOghnYnwZIip_GQypG1c915E7QT9tDFcpOh9bZgKZQoc3YSyaagDIZhkZHn5vHSnvC5N7'}}]]) | ||
|
|
||
| def _omgeo_candidate_to_dict(candidate, srid=3857): | ||
|
|
| return _geocode_without_magic_key(request, address) | ||
|
|
||
|
|
||
| def depolonize(address): |
Member
There was a problem hiding this comment.
please use Unidecode or more general method to achieve this.
| candidates = [candidates[0]] | ||
| # if candidates[0].locator_type != 'POI': | ||
| # candidates = [candidates[0]] | ||
| # print (candidates) |
| # see many candidates. | ||
| if candidates[0].locator_type != 'POI': | ||
| candidates = [candidates[0]] | ||
| # if candidates[0].locator_type != 'POI': |
| data-has-boundaries="{{ has_boundaries }}" | ||
| data-has-polygons="{{ has_polygons }}" | ||
| data-bounds="{{ request.instance.map_extent_as_json }}"> | ||
| data-bounds="{{ request.instance.map_extent_as_json }}"><!--change map_extent_as_json --> |
Member
There was a problem hiding this comment.
is it TODO or something in comment? If it is please - mark it as TODO.
vevurka
reviewed
Mar 31, 2017
| def _geocode_with_magic_key(address, key): | ||
| # See settings.OMGEO_SETTINGS_FOR_MAGIC_KEY for configuration | ||
| pq = PlaceQuery(query=address, key=key) | ||
| address = depolonize(address) |
Member
There was a problem hiding this comment.
why we should depolonize an address actually?
vevurka
requested changes
Mar 31, 2017
vevurka
left a comment
Member
There was a problem hiding this comment.
Please ensure that your code has a good quality - pep and remove debug messages.
vevurka
reviewed
Mar 31, 2017
| geocoder_for_magic_key = Geocoder( | ||
| sources=settings.OMGEO_SETTINGS_FOR_MAGIC_KEY) | ||
|
|
||
| geocoder_for_magic_key = Geocoder([['omgeo.services.Google', {'settings': {'api_key': 'GST7YMc0AM9UOsEqAYatIS9GOghnYnwZIip_GQypG1c915E7QT9tDFcpOh9bZgKZQoc3YSyaagDIZhkZHn5vHSnvC5N7'}}]]) |
Member
There was a problem hiding this comment.
actually, why there is a key hardcoded? it should be in settings.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.