I have started using Geoserver and PostgreSQL combination to render polygons (more than 4000) on Google Map. Everything seems to be fine. However, when I zoom the map, layers are redrawn very slowly on browser. These polygons are not fixed.I get information about which polygons need to be displayed from a web page and then from PostGresql view. Therefore I have passed viewParams in WMS service of Geoserver.
I use Geowebcache. But the problem I described above does not solve from GeoWebcache. Is there anything that I can try to improve performance?
Thanks.
Related
I want to label stations on my map, and I would like to clusterize the stops at different zoom levels to filter them down. So as you zoom out all you get is the start and end, and then finally a single label start->end.
How do I render a text label on a vector tile ?
I could fetch the stations as a geojson and reload on zoom change if there's no easy way to do this with tiles.
Is there a reason you need to encode your data differently per-zoom-level in the tiles or are you mainly concerned with displaying data differently per-zoom-level? If the latter, I would recommend looking for an approach that focuses more on styling the vector tiles you already have rather than trying to generate those tiles in a more complex fashion. You could try using a zoom function to style your data. If you're using Mapbox Studio, you can also set zoom-specific style rules in the Studio UI, which is the route you'll probably want to go if you're using Leaflet (I see the Leaflet tag in your post but it's not entirely clear what your implementation looks like).
If the former, you may need to use a tool like Tippecanoe. This route will likely be a bit more complex, but gives you fine-grained control over how your vector tiles are generated. Keep in mind that once you've created your tiles using Tippecanoe, you'll still need to style them somehow.
I'm using Leaflet + CartoDB; I've also used Leaflet + Mapbox; and there may also be some Leaflet + GoogleMaps in my future.
My customer asked me this question: where do the Leaflet layers get painted onto the tiles? Is that done by Leaflet? Or by the Tile engine?
Does this change if I'm using a "regular" map engine (such as Mapbox) or if I'm using something like the KML-rendering plugin?
where do the Leaflet layers get painted onto the tiles? Is that done by Leaflet?
By default (unless you're doing something weird), that happens in your web browser, which is compositing DOM elements on top of each other. You can check this by using the developer tools in your browser and inspecting the DOM elements for the tiles, and the <canvas> or <svg> with your vector geometries. They are separate DOM elements, thus your browser is doing the compositing.
Does this change if I'm using a "regular" map engine (such as Mapbox) or if I'm using something like the KML-rendering plugin?
Not really. Mapbox-gl-js uses insane amounts of WebGL, so that means that the brunt of the workload moves from the browser's compositor to a WebGL stack. It still happens in the web browser, albeit in a different part of the browser.
There is no "KML rendering plugin" for leaflet, just KML loading plugins. Vector geometries are still rendered in a <canvas> or <svg> separate from the image tiles for the basemap, then composited.
You can, of course, run your own tile server (with software such as Geoserver, Mapserver, Mapproxy, mapnik+mod_tile, tirex, tilestream, or dozens of others). In that case, you obviously know you are rasterizing your data into tiles.
I have created one QGIS map server for serving map as WMS or WFS feature.
As I am adding the layers in QGIS various thumbnails of QGIS is appearing which I do not want to appear in my map.
Same thing is happening when I am accessing those layers on web via Leaflet. Please help me how to remove these thumbnails.
I am attaching screenshots regarding this problem:
I want to create georeferenced map tiles from raster (jpg map of small area) and display in Leaflet. MapTiler seems to be a prefect solution for my problem, but free version doesn't allow set zoom range, aslo has a watermark.
Is there any free/opensource solution with same funcionality? Im woking on non-profit project, so dont have any budget.
See https://stackoverflow.com/a/13641838/4768502 for a pointer to gdal2tiles.
You can also use other software such as GeoServer, MapServer or MapProxy to serve tiles based on an image or some vector data.
As a console app, I'm creating maps with Bing Maps, with lat/lon and pushpins. Saving as a jpg. Everything is working great. NOW, however, I'd like to draw a polygon layered on said map[s]. It seems this might not be possible; I cannot find the answer. Dynamic via web page it seems is the only way; I need it to happen with a console app.
The custom polygon as well as custom polyline are not supported features on the REST service.
Since you're in a console application and as you're saving the image as JPG file, you can draw your own content onto the image using GDI or other technology to manipulate the image directly. Currently, there is no other way.