Sometimes map needs to be altered by a module or a theme but it isn't possible at the moment because Leaflet module renders map itself. For example it's quite tricky to remove from page some leaflet js files added with drupal_add_js(). I propose use Render API and return to theme layer a renderable array not markup. It's a common practice in Drupal core modules.

CommentFileSizeAuthor
#1 build_map-1814028-0.patch4 KBChi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Chi’s picture

Status: Active » Needs review
FileSize
4 KB
gmclelland’s picture

Status: Needs review » Needs work

@Chi - I was going to test your patch, but it no longer applies.

gcb’s picture

Issue summary: View changes
Status: Needs work » Fixed

Nice idea. Worked this into the dev version.

DerTobi75’s picture

Hi,

sorry, for bringing this Issue up again.

Just one question, is it possible that this patch stops the Leaflet Markercluster Module working?

When using the Leaflet Markercluster Module with the latest Dev Version of Leaflet, no clustering librariefiles are loaded, ...

Regards,

Tobi

gcb’s picture

Status: Fixed » Closed (fixed)

@DerTobi75 if you are seeing another issue go ahead and create a separate ticket for it!

This fix is now in a release https://drupal.org/node/2148175