Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#11249 closed (fixed)

blocks in the google-map.js template can not be overriden anymore

Reported by: ludifan Owned by: jbronn
Component: GIS Version: master
Severity: Keywords: gmap template
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


Just a little comment about google map templates:

since the gis/google/google-map.js template is now included in "google-single.js" template, it is now impossible to override the "controls" and "load_extra" blocks (if i'm not mistaken) which was very convenient in the first place.

to avoid this I had to create my own "google-single.js" like this:

{% extends "gis/google/google-base.js" %}
{% block functions %}{% include "world/google-map-ext.js" %}{% endblock %}

with "google-map-ext.js" like for example:

{% extends "gis/google/google-map.js" %}
{% block controls %}
{{ js_module }}.{{ dom_id }}.setUIToDefault();
{{ js_module }}.{{ dom_id }}.setMapType({{ maptype }});
{% endblock %}

This is not really harmful, but I still wanted to point it out...
Or may be I'm missing something ?

Change History (4)

comment:1 Changed 6 years ago by jbronn

  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to jbronn
  • Patch needs improvement unset

Unintended side-effect when I shuffled the templates around in #9955. I'll see what I can do here.

comment:2 Changed 6 years ago by jbronn

  • milestone set to 1.1
  • Status changed from new to assigned

comment:3 Changed 6 years ago by jbronn

  • Resolution set to fixed
  • Status changed from assigned to closed

(In r11124) Fixed #11249, #11261 -- Blocks may now be overridden again google-map.js template; now use GMaps setUIToDefault to use default controls. Thanks to ludifan and Peter Landry for the tickets and patch.

comment:4 Changed 4 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top