Moderatorzy: frasun, Artur, sdsyc, Alf/red/
Typy poszły do wątku o grafice w UMPmar_rud napisał(a):Uprasza się o nie zaśmiecanie "mojego" wątku jakimiś typami
http://mapa.ump.waw.pl/ump-www/szukaj.html?q=%s
KrazyIvan napisał(a):Generalnie do etapu jak mapnika zmusić do wygenerowania obrazka wszystko rozumiem, nie wiem jak wskazać skrypty z podanego wyżej linku na własny server (bo nie znam javascriptu i żeby znaleść to musze przeczytać wszystkie ) i jak zmusić mapnika do generowania akurat tych płytek które mi są potrzebne
function init() {
var map = new OpenLayers.Map ("map_div", {
maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
maxResolution: 156543.0399, numZoomLevels: 19, units: 'm',
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326")
} );
var layer = new OpenLayers.Layer.OSM("Moja mapa",
["http://1.tiles.ump.waw.pl/ump_tiles/${z}/${x}/${y}.png"],
{numZoomLevels: 19, 'buffer':0,transitionEffect: 'resize',
attribution: "Data by <a href='http://ump.waw.pl/'>UMP-pcPL</a><br/><img src='http://tiles.ump.waw.pl/lib/status.png'/>"});
map.addLayer(layer);
}
LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so
AddTileConfig /osm_tiles2/ Default
LoadTileConfigFile /etc/renderd.conf
[renderd]
socketname=/var/run/renderd/renderd.sock
num_threads=4
tile_dir=/var/lib/mod_tile ; DOES NOT WORK YET
stats_file=/var/run/renderd/renderd.stats
[mapnik]
plugins_dir=/usr/local/lib/mapnik/input
font_dir=/usr/local/lib/mapnik/fonts
font_dir_recurse=1
[default]
URI=/osm_tiles2/
XML=/root/mapnik/osm.xml
HOST=localhost
;HTCPHOST=proxy.openstreetmap.org
debianMapTest:/etc# cat /etc/apache2/conf.d/mod_tile
LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so
AddTileConfig /osm_tiles2/ Default
LoadTileConfigFile /etc/renderd.conf
debianMapTest:/etc# LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so
bash: LoadModule: command not found
debianMapTest:/etc# AddTileConfig /osm_tiles2/ Default
bash: AddTileConfig: command not found
debianMapTest:/etc# cat /etc/apache2/conf.d/mod_tile
LoadModule tile_module /usr/lib/apache2/modules/mod_tile.so
AddTileConfig /osm_tiles2/ Default
LoadTileConfigFile /etc/renderd.conf
APXS = $(shell which apxs || which apxs2 || echo "need apxs"; exit 1)
$(if $(wildcard $(APXS)),,$(error "cannot find apxs or apxs2"))
builddir = .
top_dir:=$(shell ${APXS} -q exp_installbuilddir)
top_dir:=$(shell /usr/bin/dirname ${top_dir})
top_srcdir = ${top_dir}
top_builddir = ${top_dir}
include ${top_builddir}/build/special.mk
CXX := g++
CXXFLAGS += -Wall
APACHECTL = $(shell which apachectl || which apache2ctl)
EXTRA_CFLAGS = -I$(builddir)
EXTRA_CPPFLAGS += -g -O2 -Wall
all: local-shared-build renderd speedtest render_list render_old convert_meta
install: ${DESTDIR}/etc/renderd.conf
${DESTDIR}/etc/renderd.conf:
cp -u renderd.conf ${DESTDIR}/etc/renderd.conf
clean:
rm -f *.o *.lo *.slo *.la .libs/*
rm -f renderd render_list speedtest render_old convert_meta
make -C iniparser3.0b veryclean
RENDER_CPPFLAGS += -g -O2 -Wall
RENDER_CPPFLAGS += -I/usr/local/include/mapnik
RENDER_CPPFLAGS += $(shell pkg-config --cflags freetype2)
RENDER_LDFLAGS += -g
RENDER_LDFLAGS += -lmapnik -L/usr/local/lib -Liniparser3.0b -liniparser
renderd: store.c daemon.c gen_tile.cpp dir_utils.c protocol.h render_config.h dir_utils.h store.h iniparser3.0b/libiniparser.a
$(CXX) -o $@ $^ $(RENDER_LDFLAGS) $(RENDER_CPPFLAGS)
speedtest: render_config.h protocol.h dir_utils.c dir_utils.h
render_list: render_config.h protocol.h dir_utils.c dir_utils.h
render_old: render_config.h protocol.h dir_utils.c dir_utils.h render_old.c
$(CC) $(EXTRA_CPPFLAGS) -o $@ $^ -lpthread
convert_meta: render_config.h protocol.h dir_utils.c dir_utils.h store.c
iniparser: iniparser3.0b/libiniparser.a
iniparser3.0b/libiniparser.a: iniparser3.0b/src/iniparser.c
make -C iniparser3.0b
MYSQL_CFLAGS += -g -O2 -Wall
MYSQL_CFLAGS += $(shell mysql_config --cflags)
MYSQL_LDFLAGS += $(shell mysql_config --libs)
mysql2file: mysql2file.c
$(CC) $(MYSQL_CFLAGS) $(MYSQL_LDFLAGS) -o $@ $^
deb:
debuild
# Not sure why this is not created automatically
.deps:
touch .deps
#ifndef RENDER_CONFIG_H
#define RENDER_CONFIG_H
#define MAX_ZOOM 18
// MAX_SIZE is the biggest file which we will return to the user
#define MAX_SIZE (1 * 1024 * 1024)
// With directory hashing enabled we rewrite the path so that tiles are really stored here instead
#define DIRECTORY_HASH
#define HASH_PATH "/var/lib/mod_tile"
// TILE_PATH is where Openlayers with try to fetch the "z/x/y.png" tiles from
// this is now only used if DIRECTORY_HASH is undefined
#define TILE_PATH "/var/www/osm_tiles2"
// MAX_LOAD_OLD: if tile is out of date, don't re-render it if past this load threshold (users gets old tile)
// (This is the default value. Can be overwritten in Apache config with ModTileMaxLoadOld.)
#define MAX_LOAD_OLD 5
// MAX_LOAD_MISSING: if tile is missing, don't render it if past this load threshold (user gets 404 error)
// (This is the default value. Can be overwritten in Apache config with ModTileMaxLoadMissing.)
#define MAX_LOAD_MISSING 10
// MAX_LOAD_ANY: give up serving any data if beyond this load (user gets 404 error)
#define MAX_LOAD_ANY 100
// Location of osm.xml file
#define RENDERD_CONFIG "/etc/renderd.conf"
// The XML configuration used if one is not provided
#define XMLCONFIG_DEFAULT "default"
// Maximum number of configurations that mod tile will allow
#define XMLCONFIGS_MAX 10
// Mapnik input plugins (will need to adjust for 32 bit libs)
#define MAPNIK_PLUGINS "/usr/local/lib/mapnik/input"
// Default directory to search for fonts. Recursion can be enabled if desired.
#define FONT_DIR "/usr/local/lib64/mapnik/fonts"
#define FONT_RECURSE 0
// Typical interval between planet imports, used as basis for tile expiry times
#define PLANET_INTERVAL (7 * 24 * 60 * 60)
// Planet import should touch this file when complete
#define PLANET_TIMESTAMP "/planet-import-complete"
// Timeout before giving for a tile to be rendered
// (This is the default value. Can be overwritten in Apache config with ModTileRequestTimeout.)
#define REQUEST_TIMEOUT (3)
#define FD_INVALID (-1)
#define MIN(x,y) ((x)<(y)?(x):(y))
#define MAX(x,y) ((x)>(y)?(x):(y))
#define MAX_CONNECTIONS (2048)
// default for number of rendering threads
#define NUM_THREADS (4)
// Use this to enable meta-tiles which will render NxN tiles at once
// Note: This should be a power of 2 (2, 4, 8, 16 ...)
#define METATILE (8)
//#undef METATILE
//Fallback to standard tiles if meta tile doesn't exist
//Legacy - not needed on new installs
//#undef METATILEFALLBACK
// Metatiles are much larger in size so we don't need big queues to handle large areas
#ifdef METATILE
#define QUEUE_MAX (64)
#define REQ_LIMIT (32)
#define DIRTY_LIMIT (1000)
#define HASHIDX_SIZE 2213
#else
#define QUEUE_MAX (1024)
#define REQ_LIMIT (512)
#define DIRTY_LIMIT (10000)
#define HASHIDX_SIZE 22123
#endif
// Penalty for client making an invalid request (in seconds)
#define CLIENT_PENALTY (3)
#endif
ememek napisał(a):Źle działa wyszukiwarka miast na www.
[...]
Przykłady: Knurów, Radziejów.
ememek napisał(a):Źle działa wyszukiwarka miast na www.
Użytkownicy przeglądający ten dział: Brak zalogowanych użytkowników i 4 gości