Reputation: 177
I am trying to add multiple bubbles on maps using jHERE jQuery (http://jhere.net/). I tried use this code:
$(window).on('load', function() {
$('#mapContainer').jHERE({zoom: 5});
$('#mapContainer').jHERE('bubble', [52.500556, 13.398889], {closable: false, content: 'Abc: 100'});
$('#mapContainer').jHERE('bubble', [51.500556, 13.398889], {closable: false, content: 'Def: 100'});
});
But only one / last bubble generated on the maps. How to add multiple bubbles on maps?
Thank You!
Upvotes: 3
Views: 240
Reputation: 117334
By default the autoClose
-option of the InfoBubbles-component is set to true
(only a single InfoBubble may be open at a time).
You must set this option to false
.
Add this after the creation of the map, but before the creation of the InfoBubbles:
$('#mapContainer').jHERE('originalMap',
function(map,here){
var b=new here.map.component.InfoBubbles();
map.addComponent(b);
b.options.set("autoClose", false);});
Demo: http://bin.jhere.net/c0b57694d70d50840528
Upvotes: 1