def create_gs_thumbnail(layer, overwrite=False):
 params = {'layers': layer.typename.encode('utf-8'), 'format': 'image/png8', 'width': 200, 'height': 150, 'TIME': '-99999999999-01-01T00:00:00.0Z/99999999999-01-01T00:00:00.0Z'}
 if (None not in layer.bbox):
  params['bbox'] = layer.bbox_string
 p = '&'.join((('%s=%s' % item) for item in params.items()))
 thumbnail_remote_url = ((ogc_server_settings.PUBLIC_LOCATION + 'wms/reflect?') + p)
 thumbnail_create_url = ((ogc_server_settings.LOCATION + 'wms/reflect?') + p)
 create_thumbnail(layer, thumbnail_remote_url, thumbnail_create_url, ogc_client=http_client, overwrite=overwrite)

def create_gs_thumbnail ( layer , overwrite = False ) : params = { 'layers' : layer . typename . encode ( 'utf-8' ) , 'format' : 'image/png8' , 'width' : 200 , 'height' : 150 , 'TIME' : '-99999999999-01-01T00:00:00.0Z/99999999999-01-01T00:00:00.0Z' } if ( None not in layer . bbox ) : params [ 'bbox' ] = layer . bbox_string p = '&' . join ( ( ( '%s=%s' % item ) for item in params . items ( ) ) ) thumbnail_remote_url = ( ( ogc_server_settings . PUBLIC_LOCATION + 'wms/reflect?' ) + p ) thumbnail_create_url = ( ( ogc_server_settings . LOCATION + 'wms/reflect?' ) + p ) create_thumbnail ( layer , thumbnail_remote_url , thumbnail_create_url , ogc_client = http_client , overwrite = overwrite )
create a thumbnail with a geoserver request .