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

nod_’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Category: support » feature

Not that I know of. Could be pretty tricky to do actually. maybe someone else has a better answer ?

zzolo’s picture

Version: 7.x-3.x-dev » 7.x-2.x-dev
Status: Active » Closed (works as designed)

Hi @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.

ressa’s picture

Has anybody managed to do this, or got tips on how to do it?

pat redmond’s picture

Status: Closed (works as designed) » Active

I'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.

pat redmond’s picture

Status: Active » Closed (works as designed)

OK, 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!