Closed (outdated)
Project:
Simple Google Maps
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
29 May 2012 at 20:22 UTC
Updated:
23 Jan 2025 at 17:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jhodgdonSee
#1486502: Adding a <br/> in the text output of the address
Comment #2
allie mickaI understand your interest in limiting scope for this module, but it seems dirty to mandate 2 fields when 1 will do, while imposing formatter-specific requirements on your field data.
What I'm asking for is the ability to create a field that contains information that is meaningful on its own and can be used in a variety of displays. And then I'm asking for this module to add value to that data by allowing administrators to present it as a map. This is much more in keeping with the philosophy behind fields, widgets and formatters than creating a field that is only useful for one formatter.
Would you reject a patch that consolidates a multi-line field lines and nominates this formatter for those field types?
Comment #3
jhodgdonI'd probably accept such a patch. :)
Comment #4
GemVinny commentedIs there any progress with this? Or does it still need doing?
Multiple pins would be great too :)
Comment #5
jhodgdonI have no immediate plans to add the multi-line feature, so yes, if someone wants it to be done, it still needs to be done.
Regarding multiple pins, I do not think that is possible within the scope of how this module works, and in any case it would be a separate issue (and maybe a duplicate of one already filed and marked "won't fix"? you could try a search).
Comment #6
drupov commentedModifying the 'field_types' key in the 'simple_gmap' array in hook_field_formatter_info should be enough?
I made a patch for that. This works for me. Please review.
Ah, and don't forget to clear cache after applying the patch.
Comment #7
jhodgdonNo, that would only *maybe* work if the multi-line field was plain text, but both text_long and text_with_summary can be HTML-formatted. This formatter will not work properly with those fields. It also probably needs to do something sensible with line breaks, when it forms the URLs for maps and iframes.
Comment #8
-Mania- commentedIn case anyone else is looking for something similar I found a pretty neat way of using your own fields without touching the Google Maps field.
I'm using the Address Field module to gather address details but you could use your own custom fields too. I then use Rules to populate the Simple Google Maps field with all the relevant address information whenever the node is saved. Afterwards you can hide the Google Maps field (CSS or with permissions) as it's not really needed anymore. This way you have full control and don't have to copy-paste address details around.
Thanks for the super awesome module! I get so excited when I find a simple Drupal module that just works.
Comment #9
jhodgdonRelated issue was filed for 7.x so I am changing the title so they are the same.
Comment #10
smustgrave commentedWe have a D10+ ticket for this feature