Closed (works as designed)
Project:
Openlayers
Version:
7.x-2.x-dev
Component:
OL Behaviors
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Feb 2012 at 08:43 UTC
Updated:
29 Aug 2012 at 04:21 UTC
Hi.
Using views, is it possible to view the result of a view, in an openlayers map, as the title and not as marker?
I want that, if my views result shows "London", in the map I don't have a marker that, if I click on it, I obtain a popup with London, but I want that in the map the system displays directly "London".
Is it possible?
Thanks,
Sergej
Comments
Comment #1
nod_Not that I know of. Could be pretty tricky to do actually. maybe someone else has a better answer ?
Comment #2
zzolo commentedHi @sergio.durzu. This does sound like a nice feature, but probably out of the scope of this module for now. You could probably do something like this manually by using the module's Behaviors and utilizing the OpenLayers library API, but it can be tricky to manually place markers.
Feel free to re-open if you ahve more questions.
Comment #3
ressaHas anybody managed to do this, or got tips on how to do it?
Comment #4
pat redmond commentedI've been trying to do this, or what sounds like this, too.
Instead of placing a marker, I want to place the title of the node. For example, if the node title is 'London', then rather than a marker the word 'London' is displayed.
The title of the node seems to be available to the map - it appears in the pop-up box. So I assume there is a way to display it on the map?
If necessary, as a short term solution, is it possible to use a token to specify the image for each location? That way I can use an image with text on it.
Comment #5
pat redmond commentedOK, I've figured it out. Here's how I did it, in case someone else stumbles upon this too:
Under admin/structure/openlayers/styles clone the style you are using. You could also create a new style, but this is slightly simpler.
Scroll down to the 'Label' field, and enter the token for the field you want to display. I used {title}, but you can use any of the fields provided by your view.
Define an offset, so that your text isn't displayed directly over your marker.
Make sure your map is using the style you have just created. Now you should have that text display on the map!