Opened 8 years ago

Closed 7 years ago

Last modified 5 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:

Description

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 8 years ago by jbronn

Owner: changed from nobody to jbronn

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

comment:2 Changed 7 years ago by jbronn

milestone: 1.1
Status: newassigned

comment:3 Changed 7 years ago by jbronn

Resolution: fixed
Status: assignedclosed

(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 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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