New answers tagged

0

Layout the map in actual size(if its a large map), save it as .pdf then use adobe pdf reader to print using its "poster" feature you can print large image/map in regular size paper, it will automatically divide into desired size of paper. that will do as work around solution. hope it help=)


0

You can just use a shell script to run multiple scripts. #!/bin/sh tippecanoe ... tippecanoe ... mapbox upload ... mapbox upload ... mapbox upload is from https://github.com/mapbox/mapbox-cli-py


0

querySourceFeatures only returns features loaded in the current map view, so when you zoom out, you'll have new features and not know about their IDs. You could watch for the moveend and sourcedata events and run querySourceFeatures again on each event.


1

If using Mapbox you could create a custom style within your account which combines the base satellite map with your overlay image into a single style, then use that style with Mapbox Static Images API.


0

I am unsure of the context of your question, a bit more detail would be helpful. This is my best guess at what you would be looking for based on your question. I am assuming your polygon is in a layer, let's give it a layer id of 'polygon-layer' while your bbox is stored in a variable as geojson. I would use queryRenderedFeatures to determine if they ...


0

This appears to be working based on the codepen you posted, as AndrewHarvey noted. Basically you just need to look in your style to find the layerID. In your case the two layers are 'units' and 'percchange'. In the Mapbox example you posted they are 'museums' and 'contours'. The layers, regardless if they are added through GL JS or studio, can be ...


1

I was able to solve this. A key piece that I was missing was switching the coordinates of the point to pixel xy cooordinates, so using the center property of the search result instead of geometry. I used this thread to help find my solution: https://stackoverflow.com/questions/44595633/mapboxgl-querying-rendered-features-after-multiple-geocodes Below is ...


0

https://github.com/mapbox/awesome-vector-tiles#cli-utilities - a curated list of awesome things related to Vector Tiles (CLI, Servers, Clients, etc.) You can generate(serve) VEctor Tiles directly from PostgreSQL database (+PostGIS) using 't-rex' (https://github.com/t-rex-tileserver/t-rex) or 'tegola' (https://github.com/go-spatial/tegola) servers


0

Just adding this as an addendum to the accepted answer: It looks like ST_AsMVT (https://postgis.net/docs/ST_AsMVT.html) actually does support outputting more than just geometries - maybe that's new, I don't know. From the docs: The Mapbox Vector Tile format can store features with a different set of attributes per feature. To make use of this feature ...


2

The getData() function is indeed not very usefull as it return exactly what is stored in the variable geoJson But the main problem is that you are requesting the images using HTTPS from a website (http://freakplaces.com) that is not secured. Change the urls to HTTP and it will work ;) Demo : https://jsfiddle.net/fg3dorpj/


1

Yes using querySourceFeatures to get the GeoJSON from there you can use the draggable point example you've linked to.


0

Not implemented yet see https://github.com/mapbox/mapbox-gl-js/issues/3993. deck.gl does support this currently.


0

The answer in 2019 is: map.once('styledata', loadTiles); //The listener will be called first time the event fires after the listener is registered. map.once('styledata', loadTiles); //The listener will be called first time the event fires after the listener is registered. map.on("styledata", loadTiles); // will fire multiple 3 times, ...


1

why not use wms layer as geoserver can provide wms service var wmsLayer = L.tileLayer.wms('http://localhost:8080/geoserver/ows?', { layers: 'topp:states' }).addTo(map);


0

I figured it out. I was adding each to the map too early overriding the layer control object. Functional code looks like: <div id='map' class='map'> </div> <script> L.mapbox.accessToken = 'REMOVED'; // define map as an object, set centre and zoom level, add basemap layer from mapbox var map = L.mapbox.map('map') .setView([63.168759, -...


1

I'm hesitant to answer this because I've never had the pleasure of working with a GeoPDF, but it's possible to use GDAL/OGR to convert from a GeoPDF to something more sensible. ogr2ogr -f sqlite out.sqlite in.pdf


Top 50 recent answers are included