Closed (fixed)
Project:
Openlayers
Version:
7.x-2.x-dev
Component:
OL API
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
15 Feb 2011 at 21:06 UTC
Updated:
11 Mar 2013 at 13:48 UTC
Jump to comment: Most recent file
Comments
Comment #1
R.J. Steinert commentedI figured out a solution thanks to $view->old_view
Placing a "Node: nid" argument on the OpenLayers Data Display and placing the following code in the argument to return the nids:
This however does not work if AJAX is enabled... More research necessary.
Comment #2
R.J. Steinert commentedComment #3
R.J. Steinert commentedAnd don't forget to check "Allow multiple terms per argument."
Comment #5
rob70 commentedSame problem here: I can't get pagination to work with Openlayers data. I have a view:page displaying an openlayers map. The same view also has a block displaying node titles only. The view is set to display 50 results, and paginate. In the page template I include the block view as well as the map, and the block view is successfully paginated. The openlayers view however, always shows the same points. When I KPR the view for the map, $view->pager['use_pager'] = false, though it is on for the block.
rjstatic, I tried your node id fix, but old_view was always empty, so no way to pull node ids. Can you elaborate?
I'm attempting to paginate to help IE keep from choking on a large number of markers added to the map. Are there any other solutions?
Thanks in advance, please LMK if I can provide any more data, such as my view.
Comment #6
R.J. Steinert commented@rob70 - I'll be tackling an OL problem this weekend. I'll write you back this weekend when I get my mind back in the OL headspace.
Comment #7
codeitwisely commentedHi ,
I want to paginate my results...
I have a view with 3 displays :Openlayerdata ,page and a block!
I have an exposed filter for the displays OLdata and page ! It's taxonomy term and it works because when i select on the list ,i have the corresponding nodes which are displayed on my map!
However ,i want that in my bloc ,the title of corresponding nodes which appear after filtering on my map ,be displayed in a grid with 3 columns and on the same page.
Arguments can't be used with blocs ...I'm looking for a solution for that for 4 days ...:/
I have also a slider on the footer which i want to display a picture corresponding to the node displayed on the map(it's a CCK of this nodes)...but i don't know how to do everything on the same page and which display type to use...?
Can you help me?
Comment #8
R.J. Steinert commented@rob70 - I didn't get a chance to look at this over the weekend. Attach your View definition here so I can take a look at it.
@janv - It looks like you have a lot of requests there. It would help if you could break each one out in a clear way. I'm not sure if any of the requests have to with adding a pager to a map...
Comment #9
codeitwisely commentedoki so i break my requests!
1 - Display map with nodes from an exposed filter on the view
2 - Display previous nodes title in a grid
3 - Display a block with pictures which is update depending the exposed filter applied to the map!
So you are saying that i don't have to use the view pager ?
What would be the best solution to do that?
best regards
Comment #10
rob70 commented@rjstatic, thanks for offering to look at my view, but I think I'm going to try to implement this solution:
http://drupal.org/node/1043164#comment-4520428
@jaynv, you should have a look at that as well. it seems to achieve much of what you require.
as I have two area where I need to display the same results... a map and a block view.
@rjstatic, since you seem to be deep into this of late, can you shed some light on why paging isn't supported with the OpenLayers Data view type?
Comment #11
rob70 commentedEnabled standard paging support by changing line 24 in openlayers_views.views.inc to
'use pager' => TRUE,
Which now allows my the Openlayers data to use it's own pager, or even a Block on the same view's pager.
Seems to be working fine, but haven't fully tested.p
Comment #12
R.J. Steinert commented@rob70 The issue arises because of the structure of mechanisms. When looking at an OpenLayers module generated map, you are looking at a Dataset generated by a View inside of a "Preset" defined by OpenLayers which is inside of a View used for displaying. So, when you attach a pager to the View being used to Display the Preset which contains the dataset generated by another View, you have a disconnect. The pager in the View used for displaying the concoction has no way of communicating what page it's on to the View used for collecting the data to be displayed.
I just happen to find this strange old_view property on the View object being used for Display and used it as a bridge to communicate which page of data to deliver. I'm not sure of the origins of old_view but I hear down the grapevine that the Views team is making more properties and methods private on views objects so I wouldn't be surprised if this disappears/has disappeared. I'll guess that way the OpenLayers module is architected is definitely not something the merlinofchaos expected Views to be used with one view delivering another view a dataset.
Comment #13
codeitwisely commentedi tried 'use pager' => TRUE,but it seems not to work :/
any others ideas for pagination?
Comment #14
pixelsweatshop commented#11 works like a charm.
Comment #15
mgiffordOk, so this seems pretty silly, but here's a patch against the git repo.
Is this a workaround, or is this how it's supposed to work?
EDIT: It does work to add back in the pagination.
Comment #16
zzolo commentedCommitted to 7.x. Please provide a patch and reopen for D6, if desired.
Comment #18
aaronbaumanI opened a new issue because #15 seems to have regressed:
#1062650: How to paginate results using the Views pager?