Is it possible to provide some additional documentation or examples on how to use the RMT option:

"You can pull the bodies of the markers from a callback instead of defining them inline. This is a performance feature for advanced users"

Will such a 'callback' be a drupal URL which contains PHP code which returns only HTML, or perhaps JS code?

Comments

nvl.sateesh’s picture

Hi,
For anyone who is looking on how this works and how to configure it.

RMT callback allows you to show custom information in the bubble (the popup that opens when you click on a marker). If you are using a gmap view, you can either show one of the fields in the bubble or use RMT.

If you want to use RMT, just provide the callback path where the information is present. Let's say you want to show the entire node content of the node that you are showing on the map, then you can select the NID field as the RMT field and "node" the RMT callback path. The module will combine them and form "node/786" (where 786 is example node id).

So, when clicked on the marker the bubble gets the information from the path "node/786" and displays.

If you are having problems with relative path, you have have to apply this patch: https://drupal.org/node/2049115

Make sure that you turn off the bubble option when RMT is selected.

Giuseppe’s picture

That was very helpful. However calling "node/786" loads the entire page (header, footer, sidebars..): what should I do to load the content only?

podarok’s picture

devad’s picture

That was very helpful. However calling "node/786" loads the entire page (header, footer, sidebars..): what should I do to load the content only?

1. Create additinal view (page) with Node ID as argument. View path: bubble/%. Add as many fields as you want to display in the bubble. You can use all views power to design them.

2. Create page--bubble.tpl.php file:

<?php print render($page['content']); ?>

3. Create html--bubble.tpl.php file:

<?php print $page; ?>

4. Back to the Gmap view. Check "Enable GMap RMT for markers". Select the NID field as the RMT field and "bubble" as RMT callback path (without slashes). The module will combine them and form "bubble/nid" paths (ex. bubble/123).

5. Place both tpl.php files in your theme folder and don't forget to clear caches.

jfeltkamp’s picture

Thanks so much for #1 and #4.
Solved my problem.

devad’s picture

You're welcome JFeltkamp.

fyberoptik’s picture

Great solutions, I changed mine slightly so only the view was printed.

print render($page['content']['system_main']);

Thanks @JFeltkamp!