[OpenLayers-Users] Re: popup not conforming to the specified size

Puneet Kishor punk.kish at gmail.com
Wed Mar 7 21:19:58 EST 2012


On Mar 7, 2012, at 8:18 PM, Puneet Kishor wrote:

> I am making a popup like so
> 
> 	contentHTML = "a very long message that I am expecting to wrap around in the 200px wide by 150px tall box, and not get drawn in a very long and shallow box because that would look very silly";
> 	popup = new OpenLayers.Popup.FramedCloud(
> 		"id",
> 		lonlat,
> 		new OpenLayers.Size(200, 150),
> 		contentHTML,
> 		null,
> 		true
> 	);
> 	
> yet, the popup being created is almost 1200px wide by about 70px tall. What gives? I have attached an image to this email. Hopefully it will make it via the email listserv.
> 
> 


interesting... changing the "contentHTML" like so makes for the kind of popup I want. But then, what is the point of specifying the popup size in the constructor?

	"contentHTML": "<div style='width: 200px; height: 150px; padding: 5px;'>" + contentHTML + "</div>"




--
Puneet Kishor


More information about the Users mailing list