Configuration: Added menu entries in configuration panel for adding custom maps and icons to be re-used by content types and views. Does not support multiple layers yet (working on that and some other features).

Map merging: Separate geofields with the same underlying map can be shown on the same map instance (and can be distinguished using different markers). Example: Have a HQ geofield and a multivalued regional offices geofield, all will be shown on the same map with different pins. Also supports multivalued textfield for popup.

Leaflet config options

Comments

hse’s picture

StatusFileSize
new33.14 KB

Forgot to git add leaflet.settings.php in patch.

dasjo’s picture

Status: Needs review » Needs work

wow, big patch here.

sorry i can't review functionality right now, just noting that your patch contains various coding-style errors.

make sure that you follow coding standards. helpers available: Dreditor, PAReview.sh and Coder.

pribeh’s picture

Wicked. I'm going to test this tomorrow. Thanks for jumping on this by hse.

pribeh’s picture

I got several failed hunks applying patch:

Hunk #4 FAILED at 157.
1 out of 4 hunks FAILED -- saving rejects to file leaflet.drupal.js.rej
patching file leaflet.formatters.inc
Hunk #3 FAILED at 47.
1 out of 5 hunks FAILED -- saving rejects to file leaflet.formatters.inc.rej
patching file leaflet.info
Hunk #1 succeeded at 3 with fuzz 1.
patching file leaflet.module
Hunk #2 FAILED at 79.
1 out of 3 hunks FAILED -- saving rejects to file leaflet.module.rej
hse’s picture

dasjo & all: I'll try to clean up the style to follow Drupal standards. Maybe I can split it in smaller features like the map merging etc. Unfortunately I developed it just before levelos added support for icons, so I had to re-adapt and lost some momentum...

pribeh: I just tried it and was able to apply it to 7.x-1.x without failures:

git clone --branch 7.x-1.x http://git.drupal.org/project/leaflet.git
git apply leaflet-settings.patch

(there are some whitespace warnings though).

hse’s picture

StatusFileSize
new37.82 KB

Ok here we go. Cleaned up style violations, checked with Coder on show at or above minor, no remarks.

$ git clone --branch 7.x-1.x http://git.drupal.org/project/leaflet.git
[...]
$ git apply -v leaflet-settings-1446418.patch
Checking patch leaflet.drupal.js...
Checking patch leaflet.formatters.inc...
Checking patch leaflet.info...
Checking patch leaflet.module...
Checking patch leaflet.settings.inc...
Applied patch leaflet.drupal.js cleanly.
Applied patch leaflet.formatters.inc cleanly.
Applied patch leaflet.info cleanly.
Applied patch leaflet.module cleanly.
Applied patch leaflet.settings.inc cleanly.
guictx’s picture

Works great here!

Compatibility with the views submodule - http://drupal.org/node/1338326 - would be great.

Also, custom icons for taxonomy terms.

Thanks.

dan_metille’s picture

Agree with @guictx about views submodule compatibility.

Any commit soon?

dasjo’s picture

Status: Needs work » Needs review
arosboro’s picture

patch in #6 does not apply cleanly to 7.x-1.x dev. It would be nice to be able to add custom markers per content/type or taxonomy term

Use git checkout e57f585f257e47b12cfce8a7010eed7883f64ccb to apply the patch

revagomes’s picture

I'm not sure if this patch covers custom markers per field like term reference field for example so here goes a link to a path I posted that can be useful here also:

#1812748: How do I create a Leaflet view with custom icons per field criteria?

levelos’s picture

Issue summary: View changes
Status: Needs review » Needs work

I don't even know if this is still applicable, but it needs work regardless.