mapbox

Converting Geojson to Shapefile in Javascript using shp-write

隐身守侯 提交于 2020-06-29 04:18:45
问题 I'm using Mapbox, and I'm trying to convert a Geojson to a zipped shapefile using shp-write. But when I follow the example given on the GitHub page, I'm getting a "ReferenceError: require is not defined" error on this line: var shpwrite = require('shp-write'); This is a jsfiddle in which you can test this. I'm relatively new to JavaScript, and haven't had to use the 'require()' function before. 回答1: The jsfiddle you provided includes several external resources, among which a shpwrite

Mapbox in Android - Black color around GEOTiff raster layers

一个人想着一个人 提交于 2020-06-16 20:47:31
问题 Goal I need to add some aeronautical layers taken from FAA to the map. The layers are provided as GeoTIFF files. Steps Downloaded a GeoTiff file from FAA website. Using QGis app clipped the legend from the file. Actually the issue occurs without this step as well. Reprojected it to EPSG:3857 using GDAL command gdalwarp -q -t_srs EPSG:3857 -dstalpha -of vrt Albuquerque\ SEC\ 104-cut.tif /vsistdout/ | gdal_translate -co compress=lzw /vsistdin/ Albuquerque\ SEC\ 104-north-up-cut.tif . Otherwise

Stylable marker/feature in react-mapbox-gl?

青春壹個敷衍的年華 提交于 2020-06-13 11:31:21
问题 Im using https://github.com/alex3165/react-mapbox-gl My question is how to style the marker or feature component? Feature does not accept children nor style prop. Marker accepts style and children, however it doesnt render anything passed as props and even if I style it with, e.g. {{ background: 'blue' }} it has no any effects on the style. Have I missed something? Thanks 回答1: Marker and Feature are two different components which work in different ways but can both achieve what you are trying

custom event to check if the style image is missing in react native mapbox gl maps

北慕城南 提交于 2020-05-29 08:24:45
问题 I am using react-native-mapbox-gl/maps extensively in my react native app and I wanted to add dynamic style icons to the chart style. The javascript mapbox library has a nice event called styleimagemissing with which we can check which image for a style is missing and construct it. Is there something similar in the react-native mapbox gl library? In other words, I would line to achieve something like this using the react native mapbox-gl library. 回答1: This is implemented in react native

custom event to check if the style image is missing in react native mapbox gl maps

。_饼干妹妹 提交于 2020-05-29 08:24:27
问题 I am using react-native-mapbox-gl/maps extensively in my react native app and I wanted to add dynamic style icons to the chart style. The javascript mapbox library has a nice event called styleimagemissing with which we can check which image for a style is missing and construct it. Is there something similar in the react-native mapbox gl library? In other words, I would line to achieve something like this using the react native mapbox-gl library. 回答1: This is implemented in react native

custom event to check if the style image is missing in react native mapbox gl maps

喜欢而已 提交于 2020-05-29 08:24:18
问题 I am using react-native-mapbox-gl/maps extensively in my react native app and I wanted to add dynamic style icons to the chart style. The javascript mapbox library has a nice event called styleimagemissing with which we can check which image for a style is missing and construct it. Is there something similar in the react-native mapbox gl library? In other words, I would line to achieve something like this using the react native mapbox-gl library. 回答1: This is implemented in react native

custom event to check if the style image is missing in react native mapbox gl maps

我的梦境 提交于 2020-05-29 08:24:03
问题 I am using react-native-mapbox-gl/maps extensively in my react native app and I wanted to add dynamic style icons to the chart style. The javascript mapbox library has a nice event called styleimagemissing with which we can check which image for a style is missing and construct it. Is there something similar in the react-native mapbox gl library? In other words, I would line to achieve something like this using the react native mapbox-gl library. 回答1: This is implemented in react native

Getting uneven click-detection on 3d-objects on mapbox with raycaster

瘦欲@ 提交于 2020-05-17 06:05:41
问题 I am using raycaster in mapbox with 3d-objects. I need to detect the click on the 3d-object.But When I click on the object I get a empty raycaster.intersectObject (array) sometimes and filled array sometimes, rather it should always have the 3d object that I have clicked. I have a simple map as explained here. I have only added the raycasting part to it to keep it as simple as possible. Here is my code. var longitude, latitude, diff, map, destLongitude, destLatitude, distFrmlast = 0; var

Leafletjs - Struggling to get markers to merge at world view

我的梦境 提交于 2020-05-17 06:05:19
问题 I am working on a visualisation that utilises a mapbox choropleth map and leafletjs markers. At the moment, I am struggling on getting the markers to merge together on zoom out at country level. I have tried reading the my code through but I have not been able to find a way to solve this issue. Attached is my code for my map. (function() { window.petMap = { map: '', mapCenter: [36.19109202182454, -95.99853515625001], tileUrl: 'https://api.mapbox.com/styles/v1/sourcetop

How to get unique feature properties from geojson source in Mapbox GL JS?

倾然丶 夕夏残阳落幕 提交于 2020-05-16 01:35:47
问题 I've defined a mapbox geojson source: map.addSource("places", { type: "geojson", data: "http://example.com/myfile.geojson", }); My geojson source file has this structure: { "type": "FeatureCollection", "features": [{ "type": "Feature", "properties": { "icon": "theatre" }, "geometry": { "type": "Point", "coordinates": [-77.038659, 38.931567] }}, { "type": "Feature", "properties": { "icon": "music" }, "geometry": { "type": "Point", "coordinates": [-77.020945, 38.878241] }}, ...] } I would like