It would be great to have the option to display the input address as the link to the map.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 0001-Making-code-updates-to-the-simple_gmap-module-to-all.patch | 4.72 KB | jameswoods |
It would be great to have the option to display the input address as the link to the map.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 0001-Making-code-updates-to-the-simple_gmap-module-to-all.patch | 4.72 KB | jameswoods |
Comments
Comment #1
jhodgdonInteresting idea. Consider it requested. :)
Comment #2
jameswoods commentedI had this need too. I have included a patch against the rc1 version.
My patch adds a new setting called "Render the textual address as a link". I tried to follow the coding style as close as possible. I wanted to be as non-invasive as possible, but some small things had to be changed.
I'm pretty new to patching, so I hope this is ok.
I also changed the status of the issue because I submitted the patch.
Comment #3
jhodgdonThanks! I'm on vacation at the moment, but I'll take a look at your patch when I return.
Comment #4
jhodgdonI took at look at this patch today, thanks! I think it needs a bit of work before I would add it to the module:
- Coding standards - if you need to include ' within a quote, use "". Comments should wrap at 80 characters. Indentation is off in at least one place.
- I'd prefer to see the logic that substitutes the address as the link text be done in the pre-processing rather than the tpl.php file. I don't think the tpl file should need to change.
Comment #5
d_mo commentedi modified line 115 of .module:
'link_text' => $link_text != "<address>" ? $item['value'] : $link,so if you type
<address>the field itself become the link. i already saw this kind of approach in other drupal modules. hope it helpsComment #6
jhodgdonI would prefer to see it as '[address]' rather than '
', but this would be an OK approach. The reason is that some text in Drupal is run through functions that remove HTML tags, and <> looks like an HTML tag.
There is another example in the current release (1.0) of this type of approach: for the language code, you can type in 'page' (without the quotes and without a [] on it), which means "use the page's current language".
Comment #7
jhodgdonThis is taken care of (in the new DEV version of the module, which you should be able to download within 12 hours). What I did was make it so that if you entered 'use_address' (without the quotes) in the Link Text field on your display settings, it will use the value of the field rather than requiring static text. I also updated the help on that setting to explain this.
Comment #8
Québec commentedHi,
first, thanks for this cool module: simple, straightforward and effective!
Is the dev version safe enough so to get the «adress as link»? Just to be shure.
Thanks for your time.
Comment #9
jhodgdonYes, the dev version is fine to use. As compared to 7.x-1.0, it just has a fix for this issue and one other at the moment
#1866434: Allow width to be specified in % for responsive designs
Comment #10
Québec commentedThanks!
Works great! And having the adress as link is just perfect!
Comment #11
gliss commentedis it possible, with this new feature, to make the map itself (not the textual address) be a link to google maps? or make this link customizable (editable), so for example, it could be combined with colorbox and open googlemaps in a modal?
Comment #12
jhodgdonMaking the map itself a link would not be possible, since it's a "live" map, and clicking on the map activates Google Maps features, so the whole map couldn't also be a link, right?. But I will add the idea to this other issue, since with a "static" map it would be possible:
#1790250: Add ability to have a static map
Regarding making the link more customizable, you should be able to do that by overriding the theme template simple-gmap-output.tpl.php in your theme.
Also... In the future, if you have a feature request or a question, please start a new issue rather than adding to an issue that has already been marked "fixed" or "closed". That goes for all projects on drupal.org. Thanks!