[OpenLayers-Users] One Popup situation resolved, New troubles w/ panmapifoutofview

smithfield willsmithfield at gmail.com
Thu Feb 5 15:06:39 EST 2009


For the record, that worked like a champ.  Problem solved and case closed.  I
would have never figured that out.  Thanks!



Christopher Schmidt-2 wrote:
> 
> On Thu, Feb 05, 2009 at 06:49:41AM -0800, smithfield wrote:
>> I did try both.  If I could have figured it out, I wouldn't have asked
>> again
>> on this board.  As you are well aware, the documentation is lacking for
>> openlayers.  
> 
> For the record, this is not the way to endear yourself to me. 
> 
>   
> 
>> popup.panMapIfOutOfView=true;
>>                 popup.setContentHTML(content);
>> 		popup.setBackgroundColor("white");
>>                 popup.setOpacity(.95);
>>                 map.addPopup(popup);	
>> 		popup.autoSize(true);
> 
>                 ^^ Same problem.
> autoSize is a *property*, not a function. Properties are set as the
> panMapIfOutOfView option is set. Because your 'size' was null, it was
> being set to a reasonable default in the browser, but the OL JavaScript
> didn't know what was going on.
> 
> Put 'popup.autoSize' before setContentHTML, and it all works.
> 
>   http://crschmidt.net/mapping/ol-list/1233847445-popup.html
> 
> Regards,
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/One-Popup-situation-resolved%2C-New-troubles-w--panmapifoutofview-tp2270359p2276960.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list