I was wondering if there is an easy way to fit all the markers one the created image of MapBox static api?
I mean something that does the same as
map.fitBounds()
in the non static version?
Static Maps only have a center and image size but you can create a static image that fits your markers' extent with the geo-viewport plugin:
https://www.mapbox.com/mapbox.js/example/v1.0.0/static-map-from-geojson-with-geo-viewport/
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 are trying to create a polygon programmatically in typescript using mapbox gl. But starting height and ending height of the polygon will be different to create a slope. Please let me know is there any way to achieve this requirement.
Mapbox GL JS does not support 3D shapes with sloping surfaces. You could use something like three.js (via ThreeBox) to achieve it.
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.
I'm using Google static maps API to create terrain textures. Is there a way to hide the contour lines that are shown with some zoom levels? E.g., I need a way to change the following request to hide the contour lines:
https://maps.googleapis.com/maps/api/staticmap?center=48.412236,15.480091&zoom=15&size=500x300&sensor=false&maptype=terrain&style=feature:water|visibility:off&style=element:labels|visibility:off
thx,
Jureen
I am trying to overlay an image in bing map and then mask certain parts of the image.I tried the below link and I could overlay the image. However my next step is to mask.I want the image of a particular region and not a entire rectangular image.
http://blogs.bing.com/maps/2013/05/22/image-overlays-with-bing-maps-javascript/
Any inputs on this? Does Bing Map have coordinate based masking.
Thanks!