Skip to content
Permalink
Browse files

some fixes to get ruleset up and running

  • Loading branch information
tomhel committed May 9, 2016
1 parent 43c3732 commit 62a2e07c355178964d2eeea9284ef5221445a178
Showing with 8 additions and 0 deletions.
  1. +1 −0 include/mapcache.h
  2. +5 −0 lib/configuration.c
  3. +2 −0 lib/configuration_xml.c
@@ -899,6 +899,7 @@ mapcache_ruleset *mapcache_configuration_get_ruleset(mapcache_cfg *config, const
void mapcache_configuration_add_image_format(mapcache_cfg *config, mapcache_image_format *format, const char * key);
void mapcache_configuration_add_source(mapcache_cfg *config, mapcache_source *source, const char * key);
void mapcache_configuration_add_grid(mapcache_cfg *config, mapcache_grid *grid, const char * key);
void mapcache_configuration_add_ruleset(mapcache_cfg *config, mapcache_ruleset *ruleset, const char * key);
void mapcache_configuration_add_tileset(mapcache_cfg *config, mapcache_tileset *tileset, const char * key);
void mapcache_configuration_add_cache(mapcache_cfg *config, mapcache_cache *cache, const char * key);

@@ -271,6 +271,11 @@ void mapcache_configuration_add_grid(mapcache_cfg *config, mapcache_grid *grid,
apr_hash_set(config->grids, key, APR_HASH_KEY_STRING, (void*)grid);
}

void mapcache_configuration_add_ruleset(mapcache_cfg *config, mapcache_ruleset *ruleset, const char * key)
{
apr_hash_set(config->rulesets, key, APR_HASH_KEY_STRING, (void*)ruleset);
}

void mapcache_configuration_add_tileset(mapcache_cfg *config, mapcache_tileset *tileset, const char * key)
{
tileset->config = config;
@@ -244,6 +244,7 @@ void parseRuleset(mapcache_context *ctx, ezxml_t node, mapcache_cfg *config)
APR_ARRAY_PUSH(ruleset->rules, mapcache_rule*) = clone_rule;
}
}
mapcache_configuration_add_ruleset(config,ruleset,ruleset->name);
}

void parseGrid(mapcache_context *ctx, ezxml_t node, mapcache_cfg *config)
@@ -803,6 +804,7 @@ void parseTileset(mapcache_context *ctx, ezxml_t node, mapcache_cfg *config)
if(rule) {
mapcache_rule *rule_clone = mapcache_ruleset_rule_clone(ctx->pool, rule);
if(rule->visible_extent) {
rule_clone->visible_limits = apr_pcalloc(ctx->pool, sizeof(mapcache_extent_i));
mapcache_grid_compute_limits_at_level(grid,rule_clone->visible_extent,rule_clone->visible_limits,tolerance,i);
}
APR_ARRAY_PUSH(gridlink->rules, mapcache_rule*) = rule_clone;

0 comments on commit 62a2e07

Please sign in to comment.
You can’t perform that action at this time.