javascript - Google Maps custom info window -


http://plnkr.co/edit/vcsnt1roifc0n64mgzrp

}); var node=document.createelement('div');   node.innerhtml= '';//set chart url   self.infowindow.setoptions({content:node,map:self.map});  }; } 

line 126: trying draw custominfo window (in have html) polygon layer. can't manage work once stage above; causing map not load. appreciated.

===

line 108

// polygon outlines self.polygon2 = new google.maps.fusiontableslayer({   suppressinfowindows: true,   query: {     from: self.outlineftid,     select: self.outlinecolumn   },   styleid: 2,   templateid: 2 });  // generate new polygon window self.infowindow = new google.maps.infowindow(); google.maps.event.addlistener(self.polygon1, 'click', function(e) {}); //call drawvisualization when infowindow ready google.maps.event.addlisteneronce(self.infowindow, 'domready', function() {  }); 

it works far here... when add following breaks:

//create content infowindow   var node=document.createelement('div');   node.innerhtml= 'hello';//set chart url   self.infowindow.setoptions({position:e.latlng,content:node,map:self.map});  }); } 

cusomize info window this, can write html in description variable in case, write html of own need.

var description = '<h3>'+j.name+'</h3>'                 + '<div>'                 + '<p><b>map:</b> open society map, <a href="#" onclick="abcd(\''                 + mapopengeneral + '\')">'+j.name+" "+'map</a></p>'                 + '</div>';           var infowindow = new google.maps.infowindow({                 content : description             });           google.maps.event.addlistener(marker,                     'mouseover', function() {                         infowindow.open(map, marker);                     }); 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -