[mapserver-commits] r12289 - in trunk/mapserver/mapcache: . include src

svn at osgeo.org svn at osgeo.org
Fri Aug 26 07:14:11 EDT 2011


Author: tbonfort
Date: 2011-08-26 04:14:11 -0700 (Fri, 26 Aug 2011)
New Revision: 12289

Modified:
   trunk/mapserver/mapcache/geocache.xml
   trunk/mapserver/mapcache/include/geocache.h
   trunk/mapserver/mapcache/src/configuration.c
   trunk/mapserver/mapcache/src/service_tms.c
Log:
add SEM_NAME_LEN to darwin
thomas.bonfort | 2011-01-31 18:18:11 +0100 (Mon, 31 Jan 2011)

Modified: trunk/mapserver/mapcache/geocache.xml
===================================================================
--- trunk/mapserver/mapcache/geocache.xml	2011-08-26 11:14:05 UTC (rev 12288)
+++ trunk/mapserver/mapcache/geocache.xml	2011-08-26 11:14:11 UTC (rev 12289)
@@ -314,7 +314,8 @@
       <cache>disk</cache>
 
       <!-- grid: the "name" attribute of a preconfigured <grid> -->
-      <grid restricted_extent="-10 40 10 50">WGS84</grid>
+         <!--<grid restricted_extent="-10 40 10 50">WGS84</grid>-->
+      <grid>WGS84</grid>
       <grid>google</grid>
 
       <!-- metadata
@@ -465,6 +466,8 @@
       <!-- OSGEO TMS -->
       <tms>true</tms>
       
+      <kml>true</kml>
+      
       <!-- OGC WMTS -->
       <wmts>true</wmts>
       

Modified: trunk/mapserver/mapcache/include/geocache.h
===================================================================
--- trunk/mapserver/mapcache/include/geocache.h	2011-08-26 11:14:05 UTC (rev 12288)
+++ trunk/mapserver/mapcache/include/geocache.h	2011-08-26 11:14:11 UTC (rev 12289)
@@ -70,6 +70,7 @@
 typedef struct geocache_request_get_capabilities_wms geocache_request_get_capabilities_wms;
 typedef struct geocache_request_get_capabilities_wmts geocache_request_get_capabilities_wmts;
 typedef struct geocache_request_get_capabilities_tms geocache_request_get_capabilities_tms;
+typedef struct geocache_request_get_capabilities_kml geocache_request_get_capabilities_kml;
 
 typedef struct geocache_request_get_tile geocache_request_get_tile;
 typedef struct geocache_service geocache_service;
@@ -77,6 +78,7 @@
 typedef struct geocache_service_wmts geocache_service_wmts;
 typedef struct geocache_service_gmaps geocache_service_gmaps;
 typedef struct geocache_service_tms geocache_service_tms;
+typedef struct geocache_service_kml geocache_service_kml;
 typedef struct geocache_service_demo geocache_service_demo;
 typedef struct geocache_server_cfg geocache_server_cfg;
 typedef struct geocache_image geocache_image;
@@ -352,6 +354,11 @@
    char *version;
 };
 
+struct geocache_request_get_capabilities_kml {
+   geocache_request_get_capabilities request;
+   geocache_tile *tile;
+};
+
 struct geocache_request_get_capabilities_wms {
    geocache_request_get_capabilities request;
    char *version;
@@ -367,11 +374,11 @@
 /** \defgroup services Services*/
 /** @{ */
 
-#define GEOCACHE_SERVICES_COUNT 5
+#define GEOCACHE_SERVICES_COUNT 6
 
 typedef enum {
     GEOCACHE_SERVICE_WMS = 0, GEOCACHE_SERVICE_TMS, GEOCACHE_SERVICE_WMTS,
-    GEOCACHE_SERVICE_DEMO, GEOCACHE_SERVICE_GMAPS
+    GEOCACHE_SERVICE_DEMO, GEOCACHE_SERVICE_GMAPS, GEOCACHE_SERVICE_KML
 } geocache_service_type;
 
 #define GEOCACHE_UNITS_COUNT 3
@@ -415,6 +422,14 @@
     geocache_service service;
 };
 
+/**\class geocache_service_kml
+ * \brief a KML superoverlay service
+ * \implements geocache_service
+ */
+struct geocache_service_kml {
+    geocache_service service;
+};
+
 /**\class geocache_service_tms
  * \brief a TMS service
  * \implements geocache_service
@@ -453,13 +468,19 @@
 geocache_service* geocache_service_gmaps_create(geocache_context *ctx);
 
 /**
+ * \brief create and initialize a geocache_service_kml
+ * \memberof geocache_service_kml
+ */
+geocache_service* geocache_service_kml_create(geocache_context *ctx);
+
+/**
  * \brief create and initialize a geocache_service_tms
  * \memberof geocache_service_tms
  */
 geocache_service* geocache_service_tms_create(geocache_context *ctx);
 
 /**
- * \brief create and initialize a geocache_service_wtms
+ * \brief create and initialize a geocache_service_wmts
  * \memberof geocache_service_wtms
  */
 geocache_service* geocache_service_wmts_create(geocache_context *ctx);

Modified: trunk/mapserver/mapcache/src/configuration.c
===================================================================
--- trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:14:05 UTC (rev 12288)
+++ trunk/mapserver/mapcache/src/configuration.c	2011-08-26 11:14:11 UTC (rev 12289)
@@ -786,6 +786,11 @@
          config->services[GEOCACHE_SERVICE_WMTS] = geocache_service_wmts_create(ctx);
       }
    }
+   if ((node = ezxml_child(root,"kml")) != NULL) {
+      if(!node->txt || !*node->txt || strcmp(node->txt, "false")) {
+         config->services[GEOCACHE_SERVICE_KML] = geocache_service_kml_create(ctx);
+      }
+   }
    if ((node = ezxml_child(root,"tms")) != NULL) {
       if(!node->txt || !*node->txt || strcmp(node->txt, "false")) {
          config->services[GEOCACHE_SERVICE_TMS] = geocache_service_tms_create(ctx);

Modified: trunk/mapserver/mapcache/src/service_tms.c
===================================================================
--- trunk/mapserver/mapcache/src/service_tms.c	2011-08-26 11:14:05 UTC (rev 12288)
+++ trunk/mapserver/mapcache/src/service_tms.c	2011-08-26 11:14:11 UTC (rev 12289)
@@ -180,7 +180,7 @@
                   return;
                }
                tileset = geocache_configuration_get_tileset(config,tname);
-               if(!tname) {
+               if(!tileset) {
                   ctx->set_error(ctx,404, "received tms request with invalid layer %s", tname);
                   return;
                }



More information about the mapserver-commits mailing list