6

I've found problem by myself at the end. The reason why it didn't work is because my tiles were created using gdal2tiles and they were created using TMS scheme while examples at http://tileserver.maptiler.com/#nasa/ol3 works only for tiles generated using MapTiler which renders tiles following XYZ schema. Difference between those 2 types is well explained ...


5

The following XML template can be used in GDAL for Planet Labs mosaics: <GDAL_WMS> <!-- Planet Labs --> <Service name="TMS"> <ServerUrl>https://tiles.planet.com/v0/mosaics/color_balance_mosaic/${z}/${x}/${y}.png</ServerUrl> <SRS>EPSG:3857</SRS> <ImageFormat>image/png</...


5

Using a tiled web service allows you to pre-render the tiles. This will make accessing them later on very fast. It works best if the data does not change but if, then GeoServer would simply re-render them appropriately. GeoServer comes with GeoWebCache which makes this easy to setup and initialise.


4

Answer to all your needs is Geoserver and OpenLayers. You can turn all your Geotiffs into WMS in any projection you need. GeoServer has GeoWebCache, which will allow you to very easily cache tiles and serve them to Openlayers. Geoserver will let you serve out Polygons and Points too. It support almost all modern out put formats like GML, KML etc. all of ...


4

your question is too big to be answered in one post and I think it is not clear enough. I assume currently you have some predefined images on the server for different areas and depending on what user want to see you load one image or another. To be more dynamic (like this http://openlayers.org/dev/examples/wms.html) one possibility is to configure a WMS ...


4

I dont think there is an easy and simple method. I also found qtiles did not work. Qgis Server is probably the easiest route, because it all uses the same styling system. However it does involve an awful lot of software. mapserver, tilecache may be easier to install in some situations, i get the impression it has less dependencies. the simplist way might ...


4

If your interested in using a microservice that you can run yourself, instead of a library check out https://github.com/trailbehind/StaticMapService/. You can install background layers into it, then post GeoJSON and get back map images. You mentioned facebook preview images, and that's exactly what I wrote it for. The image url points at a public web server, ...


4

Your Tile Map service uses a zoom offset of 1, i.e. the entire world fits in 4 tiles when {z} value is 2 (unfortunately your service does not provide the tile at zoom 1 where the entire world would have fit a single tile). Tile showing 1/4 of the world with X = 0, Y = 0 and Z = 2: Usually the entire world fits in 4 tiles when {z} value is 1. Therefore you ...


4

I notice that you are using leaflet v 0.7x. This is rather old and leaflet 1.x is recommended. The -y option is only available in leaflet 1.x. In the older version you need to use the option tms: true (see here): var county = L.tileLayer('http://localhost:9090/geoserver/gwc/service/tms/1.0.0/sf%3Aroads@EPSG%3A4326@png/{z}/{x}/{-y}.png', { tms: true })...


3

Answering my own question, here's the solution I went with: roll-your-own in python. The map in question uses scale-dependent rendering, so, I wanted to do a different render for each 'z' (integer TMS zoom level, 10 thru 17 in this case). Overall workflow, once for each zoom level: 1) render from qgis to tif with a worldfile (i.e. the tif will have ...


3

You need to convert the coordinates in your JSON object to also be 'unprojected', just like your base image. First loop through the points object and change the coordinates in each point from [x,y] to whatever is returned by map.unproject([x,y]). Then add the JSON object to the map.


3

To give an answer to this: You can set relative paths, this is no problem. But the URL has to look like this (without the dollar signs). var map = L.map('map_canvas'); map.setView([50, 10.0], 6); var layer = L.tileLayer('data/map/{z}/{x}/{y}.png', { maxZoom: 16 }); map.addLayer(layer); where data is a subdirectory of the current directory, where ...


3

You are running into the limit of multiple connections to one server. According to standards the HTTP 1.1 RFC limits persistent connections to 2 per server. This means that at one time a browser should parallel download/receive only two files from the same server. This limit was set in the early days of the internet, and thankfully most browsers ignore ...


3

You can try this: OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5; // this will help in avoiding the pink tiles in the first place. OpenLayers.Util.onImageLoadError = function(){ this.src = "images/yourImage.png"; };


3

If you are in doubt, apply a zoom level option of --zoom 8-12 and check all resulting output folders. It always worked for me with this option.


3

As Bugmenot says WMTS or TMS will be faster than WMS as you only have to draw each tile once instead of the whole map each time. Other things to consider (since they will speed up tile rendering too): make sure that your PostGIS table has indexes for any attribute you using in the style (as well as a spatial index of course). only render the polygons ...


3

The client is responsible for taking the template and filling in the zoom, x & y values before calling the server. So all the server sees is a URL that looks like: http://a.tile.openstreetmap.org/0/0/0.png which is a simple request for an image. So the simplest possible tile server is just an ordinary Apache (or Nginx) server with a series of folders ...


3

I think you need to add a grid specification to your tiles source, e.g.: sources: gisdb_tms: type: tile url: http://localhost:1234/styles/positron/%(z)s/%(x)s/%(y)s.png transparent: true grid: webmercator


2

Yes, it should be possible to do this using the GDAL_WMS driver from GDAL. There is even an example at that page that points to another ArcGIS REST instance. However, I have not been able to make the concept work against this particular VBMP server. Against a slew of other ArcGIS servers with global-mercator output, no problem. I believe I do not have ...


2

I think you should run maptiler again. Maptiler can project your data, you should take the first option in maptiler "Google Maps Compatible". It will project your data to EPSG:3857. In EPSG:4326 your data will look very warped, in EPSG:3857 won't have any problems with leaflet + you will be able it combine it with OSM, Google etc. I don't remember if you ...


2

Unfortunately, TMS is not in the list of layer types supported by Tilemill. CSV ESRI shapefile GeoJSON KML GeoTIFF SQLite PostGIS A workaround is to use tilemill-reference-layer. It's limited to maps hosted at MapBox though. Another option would be to download the tiles you're interested in and convert it to supported formats though that one could get very ...


2

From the GeoWebCache docs it seems that it has been superseded by WMTS but that GeoWebCache (i.e. most GeoServers) should be able to handle a request for TMS tiles. That said I've never tried it my self.


2

A brief google search has lead me to this page which says: ...in the API V3, with the MapType object, you write your own .getTile() method: http://code.google.com/apis/maps/documentation/v3/reference.html#MapType Sample: http://maps.forum.nu/v3/gm_customTiles.html Further Research has lead me to this feature request on Google Code. According to ...


2

I just came across this Python library by Sean Gillies that makes this easy. https://github.com/mapbox/mercantile The following will get you the tile at the specified lng/lat. """ pip install mercantile """ lng, lat, zoom = -122.14, 47.75, 12 print(mercantile.tile(lng, lat, zoom)) # Tile(x=658, y=1428, z=12) The tiles method will get a list of tiles ...


2

You need to convert your points (in pixel coordinates) to geographic coords. Use the method containerPointToLatLng().


2

What you serve is not a TMS service acording to Openlayers specification. They expect a service which can be questioned for tiles similar to WMS. Unfortunately, your tiles follw the OGC naming convention, and not OSM-like. See my answer here to number the tiles correctly: GDAL2Tiles: MapTiles from BSB/KAP are Switched EDIT I finally managed to load the ...


2

I've found a working solution based on OL v. 3.7 here is an example with a popup http://mappe-t.comune.modena.it/prove/demo_ol3/tms_ol3_with_popup.html basically to render correctly a TMS layer generated with GDAL2TILES on openlayers 3, is necessary to create a custom tileImage source, this is my working code: /* CONFIGURATION PARAMETERS DESUMED FROM ...


2

I've found a working solution based on openlayers version 3.7 Here is a working example: http://mappe-t.comune.modena.it/prove/demo_ol3/tms_ol3_with_popup.html basically is necessary to create a custom TileImage source this is my code /* CONFIGURATION PARAMETERS DESUMED FROM gdal2tiles generated file http://mappe.comune.modena.it/ortofoto/2014/...


2

In the meantime I created a small python-based library that can create simple static images. You can find it on github: https://github.com/komoot/staticmap


2

I find simple solution: plugin TileCover for QGIS run plugin: select zoom level: result: Then needed features selected via spatial query.


Only top voted, non community-wiki answers of a minimum length are eligible