I build a macro with the Gmap builder UI. Copy the code, paste it into a node body field. Map appears in the body, but lines, shapes, and markers do not appear.

I am using a clean install of Drupal 6.19. Using views + gmap to display markers does work. Using hook_gmap I can see that the "lines" value of the $map array is being set, however, the map does not display any data.

In a semi related note, I am trying to add lines to maps manually through hook_gmap() for Gmaps in views. Following the array structure from the Gmap builder, I added the following code but it does not work either:

$map['line'] = "25,25 + -53.80065082633021,-69.609375";

Any thoughts on this matter would be greatly appreciated.

Comments

theabacus’s picture

Update: If hook_gmap() is declared in a separate module, all markers/lines are removed from map. See example below:

	function test_gmap($op, $map) {
		switch($op) {
			case "pre_theme_map":
				return $map;
			break;
		}
	}

However, if you make test_gmap() identical to gmap_gmap() it works. It appears that the hook function requires certain parameters...

Also, the map behaviors checkbox list disappears if you use the test_gmap() function above.

johnv’s picture

Status: Active » Closed (won't fix)

Closing this very old issue. Please reopen if it is still valid.