code_junkie

How does CSS formatting in a Google Maps bubble work?

Nov 11th, 2011
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <Placemark>
  2. <name />
  3. <description>
  4. <![CDATA[
  5. <div class="MapPopup">
  6. <h6>Concession</h6>
  7. <h4>~Name~</h4>
  8. <p>Description goes here</p>
  9. <a class="Button GoRight FloatRight" href="#"><span></span>View details</a>
  10. </div>
  11. ]]>
  12. </description>
  13. <styleUrl>#masterPolyStyle</styleUrl>
  14. ...Placemarks go here ...
  15. </Placemark>
  16.  
  17. div.MapPopup { background:pink; }
  18.  
  19. <div style="font-family: Arial,sans-serif; font-size: small;">
  20. <div id="iw_kml">
  21. <div>
  22. <h6>Concession</h6>
  23. <h4>BOIS KASSA 1108000 (Mobola-Mbondo)</h4>
  24. <p>
  25. Description goes here</p>
  26. <a target="_blank"><span />View details </a>
  27. </div>
  28. </div>
  29. </div>
  30.  
  31. /*start of myHtml2 variable*/
  32. var myHtml2 = "<div style="background-color:lightgray"><div style="padding:5px"><div
  33. style="font-size:1.25em">Some text</div><div>Some more text<br/>
  34. Yet more text<br/></div><table style="padding:5px"><tr><td><img src="A lake.jpg"
  35. width="75px" height="50px"></td><td>More text<br/>Again, more text<br/><div
  36. style="font-size:.7em">Last text</div></td></tr></table></div></div>"
  37. /*end of variable*/
  38.  
  39. var infowindow2 = new google.maps.InfoWindow({content: myHtml2});
  40. /*mouseover could be 'click', etc.*/
  41. google.maps.event.addListener(marker, 'mouseover', function(){
  42. infowindow2.open(map, marker);
  43. });
Add Comment
Please, Sign In to add comment