Turn map on or off on node types with map field

Toddv - January 1, 2008 - 14:46
Project:cck_map
Version:5.x-3.3
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hello,
Great piece of work, thanks!

I have a map field on an Event content type. But not all of my events need maps. In the content type>manage fields>map I do not have the box checked for "show map when no place holders are present". But I still get a map.
Do I need to create another content type, eg: "event without map" or am I missing something? Thanks for any suggestions.
TV

#1

grana - February 1, 2008 - 17:46

Thanks for this module!
I changed a little the code to avoid the problem described above.
Just replace the string on line 222 in cck_map.module with this

if ((count($items[0]) && $items[0]['title']!=0) || $field['widget']['always_display']) {

#2

doomed - March 16, 2008 - 18:16
Status:active» closed

this seems to be fixed on version cck_map-5.x-3.3 .

#3

doomed - March 30, 2008 - 14:10
Version:5.x-3.2-1» 5.x-3.3
Status:closed» active

Actually i'm experiencing the same problem now.

But that piece of code "grana" posted didnt work. With it, the map disappeared from all nodes, even the ones that had a map.

#4

toddwoof - June 4, 2008 - 18:14

I have a similar problem. Using cck_map 5.x-3.3 with Drupal 5.7, PHP 5.2.6.

Display even if no markers are placed is un-checked, so theoretically no map should show in node view unless I add a marker.

I used node-import to import a large number of nodes to a custom content type that includes a map field. The import didn't include any pointer data, so no node should show a map. Here are the symptoms:

If I visit a node that has never been edited, it's fine - no map.
If I add a marker, it's fine - shows the map and marker as expected.
But as soon as I edit one of the nodes, even I don't add any markers or make any other changes - just click edit and then save it - then the map shows up, and I can't make it go away. And if I add a marker then remove it, the map similarly persists.

#5

ceo3141 - June 23, 2008 - 20:12

subscribing [having same problem]

#6

ceo3141 - August 8, 2008 - 17:50

the code snippet above worked for me.

 
 

Drupal is a registered trademark of Dries Buytaert.