Hi everyone,
I'm hoping to get some pointers and general direction for a task I've set myself. (I'm a beginner, learning along the way so you cannot provide too much information!)
I've got a website (which isn't public right now) that uses openlayers for two types of pages. One is a general map view showing many wkt fields (each one is a node), the next is a specific node display that you get to after clicking on one of those wkt lines. You would use it like this: After checking out the details of each node - a typical viewer would want to go back to the general map view where they were last looking. (Via the 'back' button presumably) However, currently when you do that it returns you to the default map position instead.
What I want to do is take the permalink that Openlayers creates for each map position and temporarily store it, then use it for either a "return to previous view" button or tell the browser that this was the last page viewed for the 'back' button to work normally.
What I need help with is:
- All of the above! But failing that;
- How to approach the problem?
- Similar examples to learn from?
Finally, is this a good place to ask this type of question, or better off somewhere else?
Thanks for any help at all!
Miles
Comments
I don't see that...
...with Permalink and Ajax exposed filters enabled. Don't know what makes the difference, though I noticed that exposed filters using Ajax do make a big difference in general behavior.
...if necessary
...the solution that comes to my mind is to have OnenLayers manipulate the URL constantly, and inject the current Permalink constantly into the Browser's URL line. Haven't tried that, though.
My progress
Thanks Karsten,
Your first comment I'm still digesting, I'm not entirely sure what you mean , but I'll poke around with those key words and see what shows up.
In fact I've had some success with this. I've managed to have the permalink data saved in a cookie. (By playing with the popup behaviour which the site uses - I'm guessing this could/should be done with a custom behaviour).
My next task which you can probably imagine is more generally Drupal related. That is to stick a button at the top of a custom content type that reads the cookie and creates the required url on the fly. Any pointers for the easiest way to do this would be appreciated! (I'm not sure how specific or otherwise this is to my site, but currently there is a 'local tasks' menu which I think comes through ctools and ideally I would add an extra menu item to that which would be the 'return to map' button. If that helps??)
Thanks again...
simple but hard way
I have used openlayers not module but direct way.
I embed javascript code using openlayers on block definition.
That make us use permalink on openlayers map.
It may be difficult for newbie because you need to know how you program openlayers.
Hiroshi