|  |  |  | Grits Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
GritsWms; gchar * grits_wms_fetch (GritsWms *wms,GritsTile *tile,GritsCacheType mode,GritsChunkCallback callback,gpointer user_data); void grits_wms_free (GritsWms *wms); GritsWms * grits_wms_new (const gchar *uri_prefix,const gchar *uri_layer,const gchar *uri_format,const gchar *prefix,const gchar *extension,gint width,gint height);
Provides an API for accessing image tiles form a Web Map Service (WMS) server. GritsWms integrates closely with GritsTile. The remote server must support the EPSG:4326 cartographic projection.
typedef struct {
	GritsHttp *http;
	gchar *uri_prefix;
	gchar *uri_layer;
	gchar *uri_format;
	gchar *extension;
	gint   width;
	gint   height;
} GritsWms;
gchar * grits_wms_fetch (GritsWms *wms,GritsTile *tile,GritsCacheType mode,GritsChunkCallback callback,gpointer user_data);
Fetch a image coresponding to a GritsTile from a WMS server.
void                grits_wms_free                      (GritsWms *wms);
Free resources used by wms and cancel any pending requests.
| 
 | the GritsWms to free | 
GritsWms * grits_wms_new (const gchar *uri_prefix,const gchar *uri_layer,const gchar *uri_format,const gchar *prefix,const gchar *extension,gint width,gint height);
Creates a GritsWms for some layer on a WMS server. The returned GritsWms stores information about the images so it does not need to be entered each time a images is fetched.
| 
 | the base URL for the WMS server | 
| 
 | the layer the images should be fetched from (wms LAYERS) | 
| 
 | the format the images should be fetch in (wms FORMAT) | 
| 
 | prefix to use for local files | 
| 
 | file extension for local files, should correspond to uri_format | 
| 
 | width in pixels for downloaded images (wms WIDTH) | 
| 
 | height in pixels for downloaded images (wms HEIGHT) | 
| Returns : | the new GritsWms |