I have two maps on the printcompser I want to export as an .jpg image. The one map renders fine, but the inserted maps does not render correctly (google image via openlayers ). It renders in the print composer, but once I export it the inserted maps is wrong. Both layers (layers have the same CRS : EPSG 3857 WSG 84 Pseudo Mercator). To illustrate I include both the images from the print composer (correct) and the exported image (wrong). Any ideas would be much appreciated.
Print composer :
Exported image :
Regards
All my problems was resolved by rather using the QuickMapServices plugin rather than Openlayers. Seems like Openlayers and print composer does not work well because Openlayers needs to be set to the actual page size.
Related
I have a GeoTiff file taken by a drone and I want to add it as a layer on my map using .addSource() and it doesn't seem to work.
mapboxMap.addSource("satellite", {
type: "raster",
url: "http://localhost:3000/images/satellite.tif",
});
Is uploading to Mapbox the only way to implement a GeoTiff to my Map?
The .png I tested before worked fine, both files are in the public folder right now.
Thanks!
As the documentation says, the raster type is:
A raster tile source.
Note the tile bit.
If you want a non-tiled raster source, you want to use the image type. I'm not certain if Mapbox GL JS supports TIFF, and whether it supports GeoTIFF. You may need to provide the coordinates explicitly.
We used wgrib2 to convert weather radar data into NetCDF format. We converted it to GeoPackage format using gdal_translate. We created a Color Map on QGIS 3.10 and the GeoPackage appeared as expected.
We would like to display this on the Internet using these files or processed versions of these files. We have Mapbox GL JS as a candidate for that but it is not required. We have not found a way to display the gpkg files we have generated. How can we get it to display?
https://docs.mapbox.com/mapbox-gl-js/guides/
We generated png images using gdaldem color-relief and we also tried the following method
However, when we zoomed in on the map with this method, the quality of the image was rough and it could not be displayed beautifully.
https://docs.mapbox.com/mapbox-gl-js/example/image-on-a-map/
Since the gpkg we generated displays correctly in QGIS, it would be most desirable to be able to display the gpkg on MapBox. However, if that is not possible, we would like to display that data beautifully, even in another format.
We also tried to generate tiles using gdal2tiles.py. It worked as we expected when we created data up to zoom level 10. However, when we created the data for zoom level 11, it took more than 12 minutes. Since our data is generated every 5 minutes, we cannot spend any more time on tile generation.
Mapbox GL JS specialises in displaying vector tiles, but can also display raster tiles. If you can't generate static raster tiles from your GeoPackage data source (because they're too big and change too fast), you'll need some kind of server that can read GeoPackage and serve up raster tiles on demand.
Running GeoServer would be one way to do that. It supports GeoPackage natively and could serve up the requested tiles without having to generate them all in advance.
There is also a NetCDF extension that might let you skip the GeoPackage conversion step.
(What you tried was generating a single raster image, which was probably insufficiently detailed for your needs).
So my problem is, that I have a tileset which geometries are Multipolygons and when I want to display the district names it places multiple labels instead of just one centered. Is there a way to fix this?
Here is a screenshot for clarification
The data comes from a postgis database, I just export it to a CSV and upload it to mapbox.
I have tried converting the Multipolygon into single Polygons but that ended in the same result.
I also played around with the text padding in mapbox studio but with this option the label placement is very off.
Is there possibly a way trough Mapbox GL JS to fix this issue?
You need to generate a separate label layer. You can use geojson-polygon-labels to do this.
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:
In brief, I’m looking for a way to either flatten layers in MapBox, or import a MapBox project into TileMill so I can flatten it into a new tile set.
My problem is this: I’m working with StroyMapJS (a JavaScript library) and it only recognizes the base layer coming from MapBox, with no additional layers. However, I have some vector data that is a critical part of the story that I want included. My thinking is that if I can flatten or merge the layers into a new basemap I would be fine. So, I would either:
Do this directly in MapBox – but I can’t find a feature to do this, or
Import the Terrain MapBox layer into TileMill, add my vector
data, and then export as a new set of tiles and create a new project
from these tiles in MapBox - but I can’t figure out how to bring a
MapBox project into TileMill.
Am I going about this the wrong way or am I mission something?
Thanks
but I can’t figure out how to bring a MapBox project into TileMill.
You would export your markers & overlays as GeoJSON - this will be in the Project UI in the map editor. Then you can import that GeoJSON into TileMill as a datasource.