Geographic Information Systems Asked by Adithya on February 3, 2021
I am using MapProxy 1.12 and Mapnik 3 for map creation.
Plain tiles are genererating, no map. Some tiles are showing 404 error(The requested tile is outside the bounding box of the tile map.).
sample.yaml
services:
tms:
use_grid_names: true
origin: 'sw'
layers:
- name: district
title: District Layer
sources: [dist_cache]
caches:
dist_cache:
grids: [distgrid]
sources: [dist_tms]
sources:
dist_tms:
type: mapnik
mapfile: /var/www/Mapfiles/district.xml
layers: district
transparent: true
grids:
distgrid:
base: GLOBAL_GEODETIC
srs: 'EPSG:32643'
bbox: [291627,904686,958569,1426831]
origin: 'sw'
bbox_srs: 'EPSG:32643'
globals:
district.xml
<?xml version="1.0"?>
<Map background-color="blue" srs="+proj=utm +zone=43 +datum=WGS84 +units=m +no_defs" buffer-size="128" minimum-version="0.7.2">
<Style name="District_style_line">
<Rule>
<MaxScaleDenominator>6600000000</MaxScaleDenominator>
<PolygonSymbolizer fill="#ebb1af"/>
<LineSymbolizer stroke="rgb(0,0,0)" stroke-width="0.98" stroke-linejoin="round"/>
</Rule>
</Style>
<Style name="District_style_text">
<Rule>
<MaxScaleDenominator>6600000</MaxScaleDenominator>
<TextSymbolizer face-name="DejaVu Sans Bold" size="8" fill="black" wrap-width="10" avoid-edges="false" placement="interior">[name]</TextSymbolizer>
<MinScaleDenominator>2000000</MinScaleDenominator>
</Rule>
</Style>
<Layer name="District_Boundary" srs="+proj=utm +zone=43 +datum=WGS84 +units=m +no_defs">
<StyleName>District_style_line</StyleName>
<StyleName>District_style_text</StyleName>
<Datasource>
<Parameter name="dbname">dummydb</Parameter>
<Parameter name="extent">291627,904686,958569,1426831</Parameter>
<Parameter name="geometry_field">the_geom</Parameter>
<Parameter name="host">localhost</Parameter>
<Parameter name="password">password</Parameter>
<Parameter name="port">5432</Parameter>
<Parameter name="srid">32643</Parameter>
<Parameter name="table">select name,the_geom from districts</Parameter>
<Parameter name="type">postgis</Parameter>
<Parameter name="user">testuser</Parameter>
</Datasource>
</Layer>
map.js (openlayer2)
var layer = new OpenLayers.Layer.TMS('TMS district', 'http://localhost:8080/tms/', {layername: 'district/distgrid', type: 'png', isBaseLayer:true,transitionEffect:"resize" });
map.addLayer(layer);
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP