Hi Rik,
I've tried putting a map view into a views field in a view, and although it works the view starts giving strange errors, and it appears as though all clustering on all maps on the site is broken.

Not sure if the below helps but its the error I get. It happens when saving changes in views. Then I have to press 'back' to save the change to the view.

Please PM me if you'd like me to send you a URL to look at - I'd rather not post it publicly during dev.

Many thanks!

[{"command":"settings","settings":{"basePath":"\/","pathPrefix":"","ajaxPageState":{"theme":"seven","theme_token":"s_W9585R00RWzOWj2w90_C8hXxnSFmkiddAqdMJqk2U"},"cufonSelectors":[{"selector":"nav li a","options":{"enabled":1,"fontFamily":"KG Ten Thousand Reasons"}},{"selector":"h1, h2, h3","options":{"enabled":1,"fontFamily":"Lietz LindauHamburg"}},{"selector":".group-stall-admin label:not(#edit-field-available-varieties-und div label, .group-stall-admin .form-checkboxes label)","options":{"enabled":1,"fontFamily":"KG Ten Thousand Reasons"}}],"lightbox2":{"rtl":0,"file_path":"\/(\\w\\w\/)public:\/","default_image":"\/sites\/all\/modules\/lightbox2\/images\/brokenimage.jpg","border_size":10,"font_color":"000","box_color":"fff","top_position":"","overlay_opacity":"0.8","overlay_color":"000","disable_close_click":1,"resize_sequence":0,"resize_speed":400,"fade_in_speed":400,"slide_down_speed":600,"use_alt_layout":0,"disable_resize":0,"disable_zoom":0,"force_show_nav":0,"show_caption":1,"loop_items":0,"node_link_text":"View Image Details","node_link_target":0,"image_count":"Image !current of !total","video_count":"Video !current of !total","page_count":"Page !current of !total","lite_press_x_close":"press \u003Ca href=\u0022#\u0022 onclick=\u0022hideLightbox(); return FALSE;\u0022\u003E\u003Ckbd\u003Ex\u003C\/kbd\u003E\u003C\/a\u003E to close","download_link_text":"Download Original","enable_login":false,"enable_contact":false,"keys_close":"c x 27","keys_previous":"p 37","keys_next":"n 39","keys_zoom":"z","keys_play_pause":"32","display_image_size":"","image_node_sizes":"()","trigger_lightbox_classes":"","trigger_lightbox_group_classes":"","trigger_slideshow_classes":"","trigger_lightframe_classes":"","trigger_lightframe_group_classes":"","custom_class_handler":0,"custom_trigger_classes":"","disable_for_gallery_lists":true,"disable_for_acidfree_gallery_lists":true,"enable_acidfree_videos":true,"slideshow_interval":5000,"slideshow_automatic_start":true,"slideshow_automatic_exit":true,"show_play_pause":true,"pause_on_next_click":false,"pause_on_previous_click":true,"loop_slides":false,"iframe_width":600,"iframe_height":400,"iframe_border":1,"enable_video":0},"ip_geoloc_menu_callback":"ip-geoloc-current-location","ip_geoloc_refresh_page":false},"merge":true},{"command":"viewsSetForm","output":"\u003Cform action=\u0022\/admin\/structure\/views\/ajax\/display\/clone_of_stall_listings\/block_2\/css_class\u0022 method=\u0022post\u0022 id=\u0022views-ui-edit-display-form\u0022 accept-charset=\u0022UTF-8\u0022\u003E\u003Cdiv\u003E\u003Cdiv class=\u0022views-override clearfix container-inline\u0022\u003E\u003Cdiv class=\u0022form-item form-type-select form-item-override-dropdown\u0022\u003E\n \u003Clabel for=\u0022edit-override-dropdown\u0022\u003EFor \u003C\/label\u003E\n \u003Cselect id=\u0022edit-override-dropdown\u0022 name=\u0022override[dropdown]\u0022 class=\u0022form-select\u0022\u003E\u003Coption value=\u0022default\u0022\u003EAll displays\u003C\/option\u003E\u003Coption value=\u0022block_2\u0022\u003EThis block (override)\u003C\/option\u003E\u003C\/select\u003E\n\u003C\/div\u003E\n\u003C\/div\u003E\u003Cdiv class=\u0022scroll form-wrapper\u0022 id=\u0022edit-options\u0022\u003E\u003Cdiv class=\u0022form-item form-type-textfield form-item-css-class\u0022\u003E\n \u003Cinput type=\u0022text\u0022 id=\u0022edit-css-class\u0022 name=\u0022css_class\u0022 value=\u0022clearfix\u0022 size=\u002260\u0022 maxlength=\u0022128\u0022 class=\u0022form-text\u0022 \/\u003E\n\u003Cdiv class=\u0022description\u0022\u003EThe CSS class names will be added to the view. This enables you to use specific CSS code for each view. You may define multiples classes separated by spaces.\u003C\/div\u003E\n\u003C\/div\u003E\n\u003C\/div\u003E\u003Cdiv class=\u0022clearfix\u0022\u003E\u003Cdiv class=\u0022form-buttons\u0022\u003E\u003Cinput type=\u0022submit\u0022 id=\u0022edit-submit\u0022 name=\u0022op\u0022 value=\u0022Apply\u0022 class=\u0022form-submit\u0022 \/\u003E\u003Cinput type=\u0022submit\u0022 id=\u0022edit-cancel\u0022 name=\u0022op\u0022 value=\u0022Cancel\u0022 class=\u0022form-submit\u0022 \/\u003E\u003C\/div\u003E\u003C\/div\u003E\u003Cinput type=\u0022hidden\u0022 name=\u0022form_build_id\u0022 value=\u0022form-DF2h1IG2ZiqLxooX37BLC531fbgyEJTjemn6icBGlf0\u0022 \/\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022form_token\u0022 value=\u0022eipSr8ljQYS39Dy_RP6xTu6hQ1M4MRe8zDuGLA0ksv4\u0022 \/\u003E\n\u003Cinput type=\u0022hidden\u0022 name=\u0022form_id\u0022 value=\u0022views_ui_edit_display_form\u0022 \/\u003E\n\u003C\/div\u003E\u003C\/form\u003E","title":"Discover block: CSS class","url":"http:\/\/stallspot.co.nz\/admin\/structure\/views\/ajax\/display\/clone_of_stall_listings\/block_2\/css_class"}]

Comments

Funksmaname’s picture

I'm starting to wonder whether the views field was the cause - once created I couldn't get to the field settings until i turned off javascript for views at which point I saw an error which was related to 'views field view' module. A patch was committed to the latest dev which I installed. I then excluded the field from the view, but the clustering is still not working... it was earlier and this is the only thing I've been working on since... Any ideas appreciated as always :)

Funksmaname’s picture

removing the field (rather than excluding it) has restored cluster support!
Very strange. Please let me know if you need any info to narrow down the issue.

I was using the views field in an attachment view.

Might it be because two map views were being shown on the same page? maybe that confuses clusters?

Thanks Rik!

rdeboer’s picture

Hey Funk,
Can you confirm that having only one map on the page does not give you an issue?
Is it only a problem when using the Leaflet Marker clustering? If it happens for plain Leaflet maps with clustering switched off switch to Google for a sec to see if it too has the issue.
Rik

Funksmaname’s picture

Creating a view page with the map as a field shows a map only the first result.
Creating a block display (1 result) of that view and putting it on a page with an existing map removes the clustering support for the top map, though both maps appear to be functioning other than clustering.
Removing the block restores cluster support for the first map.

rdeboer’s picture

Title: using a map in a 'global:views' field breaks things » Can only get one Leaflet map with MarkerCluster per page
Project: IP Geolocation Views & Maps » Leaflet Markercluster

Looks like a Leaflet Markercluster issue.
Reassigning to that queue.

Funksmaname’s picture

Title: Can only get one Leaflet map with MarkerCluster per page » Leaflet MarkerCluster disabled on all maps if more than one map is shown per page
rdeboer’s picture

Some more info.
Observed the following when using IP Geolocation Views and Maps on a View that has both Page (map) + Attachment (map) displays

1) when switching marker clustering on for the Page ONLY it works correctly on BOTH the Page and Attachment maps
2) any other combination (off/on, on/on, off/off) results in NO clustering happening in neither Page nor Attachment maps

Rik

itamair’s picture

I solved this as explained in this issue: https://drupal.org/node/2038659

rdeboer’s picture

Status: Active » Closed (outdated)