Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#5 | screenshot.jpg | 104.01 KB | g_f |
#4 | overlay.png | 39.85 KB | ifrik |
#4 | settings.png | 38.92 KB | ifrik |
Comments
Comment #1
ifrikIf 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?
Comment #2
ifrikSorry - 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?
Comment #3
g_f CreditAttribution: g_f commentedThanks 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?
Comment #4
ifrikWhen 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.
Comment #5
g_f CreditAttribution: g_f commentedThanks 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.
Comment #6
g_f CreditAttribution: g_f commentedStill 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?
Comment #7
g_f CreditAttribution: g_f commentedThe 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
Comment #8
Iztok CreditAttribution: Iztok commentedPop 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.
Comment #9
Iztok CreditAttribution: Iztok commented-- removed double post --
Comment #10
basvredelingCleaning up the issue queue for #2670484: Stable 7.x-2.0 release.
This needs to be rechecked. @g_f & @Iztok is this still relevant?