Download & Extend

Turn map on or off on node types with map field

Project:cck_map
Version:5.x-3.3
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

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

Comments

#1

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

Status:active» closed (fixed)

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

#3

Version:5.x-3.2-1» 5.x-3.3
Status:closed (fixed)» 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

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

subscribing [having same problem]

#6

the code snippet above worked for me.

nobody click here