Hi
I'd like to show some feature-related information (the attributes of my polygon) by clicking on the polygon. If i activate the according boxes in the behavior-section (Pop Out for Features odr Pop Up for Features), i can only mark a polygon, but no popup or popout appears. Are there any additional settings to do in the views-section to enable pop ups?

CommentFileSizeAuthor
#5 screenshot.jpg104.01 KBg_f
#4 overlay.png39.85 KBifrik
#4 settings.png38.92 KBifrik
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ifrik’s picture

Status: Active » Postponed (maintainer needs more info)

If I understand you correctly you want to add a polygon to the map, but have individual pop-ups for each of the points.
The pop-up information for an item on the map comes from each node - but for a polygon you would only have one node. So each point of the polygon would be linked to the same node - thereby having the same information. (Unless I misunderstand what you are trying to do.)
One way to achieve something like this could be to create additional nodes for each of the points; create a second data overlay with these points and display them on top of the layer with the polygons. Then you can choose to display pop-ups for either only the layer with the points or for both layers.
Whether that's a useful work-around depends of course on your use case.
Does that help as an idea?

ifrik’s picture

Sorry - my previous comment was thinking much to complicated.
Both Pop-up and Tooltips should work in the current 7.x-2.x-dev version. (But not at the same time)
Did you check the tickbox for the layer?
And did you set which fields to use as title and description in the format settings of the data overlay in views?

g_f’s picture

Thanks for your reply!
Your first suggestion is in fact pretty complicated and doesn't really solve the problem. But if i can't fix the problem, i will solve it this way.
All modules and libraries are updated, and there's no problem with the tickboxes (and i don't use tooltips).

Now to the views-part: This settings (structure - views - edit - my data overlay - format settings) doesn't provide a title or a description. I can check 'force using fields' and choose am map to render. So where do i find this settings?

ifrik’s picture

When you click on the Format Settings of your Data Overlay, you should get a window with the £OpenLayers Data Overlay: Style options" - where you set the data source, title and description. You need to add appropriate fields to the view first otherwise you don't have anything to choose from in the drop-down boxes.
I've attached two screenshots.

g_f’s picture

FileSize
104.01 KB

Thanks for the hint, but i guess that's not the problem. I've got the same settings as in your screenshots, and the same fields added. In 'OL - Maps - edit - behavior - Pop Up for Features' i can see my layers and i can choose them. After that i can mark the polygons, but the Pop Up doesn't appear (see screenshot). The same happens after disabling popups and enabling tooltips.

g_f’s picture

Still the same issue. Meanwhile i tried out different views-settings & coordinate systems and i had a look into the popup behavior inc files. The result is always the same (as attached in the post above). Are there any ideas where to search?

g_f’s picture

The errror seems to be a missing definition for the OpenLayers.js-File. There's a JavaScript error when i click on a polygon: "TypeError: this.size is null"

Here's the according part of OpenLayers.js

addPopup:function(a,b){....},removePopup:function(a){...},
getSize:function(){var a=null;null!=this.size&&(a=this.size.clone());return a}
Iztok’s picture

Pop up is also not working for me. Not using polygons but single points.

Tool tip does work (and I am NOT using two of them at the same time). But tool tip blinks if I move the mouse over the marker/icon.

I am displaying two maps on the same page though. No JS errors in the console.

Iztok’s picture

-- removed double post --

basvredeling’s picture

Category: Support request » Bug report
Issue summary: View changes

Cleaning up the issue queue for #2670484: Stable 7.x-2.0 release.

This needs to be rechecked. @g_f & @Iztok is this still relevant?