Django

Code

Ticket #11249 (closed: fixed)

Opened 10 months ago

Last modified 9 months ago

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

Reported by: ludifan Assigned to: jbronn
Milestone: 1.1 Component: GIS
Version: SVN Keywords: gmap template
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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 ?

Attachments

Change History

06/02/09 23:15:27 changed by jbronn

  • owner changed from nobody to jbronn.
  • needs_better_patch changed.
  • needs_tests changed.
  • needs_docs changed.

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

06/29/09 12:10:33 changed by jbronn

  • status changed from new to assigned.
  • milestone set to 1.1.

06/29/09 12:19:28 changed by jbronn

  • status changed from assigned to closed.
  • resolution set to fixed.

(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.


Add/Change #11249 (blocks in the google-map.js template can not be overriden anymore)




Change Properties
Action