mapbox

Trouble using Leafletjs MarkerClusterGroup and filters with Mapbox

孤人 提交于 2019-12-04 17:36:50
I've tried Mapbox and their API to create an interactive map. The purpose is to fetch points in a geojson file, and display them on the map. They have to be filtered by their marker-icon and grouped depending on the zoom applied. I had no trouble using the MarkerClusterGroup plugin with leaflet and Mapbox, but I can't get the filters to work. This is my code : https://gist.github.com/KuneStudio/5985864 And this is the content of my json with the points : https://gist.github.com/KuneStudio/5985858 The markers are displaying correctly, the cluster part too, but I can't get the filters to work...

react-map-gl without API key using osm tiles

北战南征 提交于 2019-12-04 15:29:17
Is it possible? This tells me it is, but dont know why it defines and API key. but I cannot get it to work with react-map-gl StaticMap class. The property I can see from that class is just mapStyle which would take a standard Mapbox vector tiles path/name. Does it take an object? My code does not give me an error or show the tiles I request. <DeckGL> <StaticMap mapStyle= {{ "version": 7, "sources": { "simple-tiles": { "type": "raster", "tiles":["http://a.tile.openstreetmap.org/{z}/{x}/{y}.png", "http://b.tile.openstreetmap.org/{z}/{x}/{y}.png"], "tileSize": 256 }, "power": { "type": "vector",

How can i use MapBox on Android [closed]

谁都会走 提交于 2019-12-04 08:25:22
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . How can i display MapBox tiles on Android ? I tried using it with OSMDroid, and Nutiteq with no success. Is there a android library for MapBox ? For example i used this code to implement MapBox on OSMDroid : http://blog.spatialnetworks.com/post/2012/07/using-mbtiles-on-android-with-osmdroid XYTileSource

Mapbox GL JS: ignore map click event if marker is clicked

与世无争的帅哥 提交于 2019-12-04 07:40:30
I have a marker in the map. I want to change its state when it is clicked and change it back when other place on the map is clicked. The problem is that map.on("click", console.log) is also fired upon clicking the marker. I want to see only the marker clicked event, because map click invokes state rollback. <!DOCTYPE html> <html> <head> <meta charset='utf-8' /> <title></title> <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> <script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.js'></script> <link href='https://api.tiles.mapbox.com/mapbox

Loading geojson markers into mapbox setting custom icon image

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 05:10:48
问题 I'm new to mapbox/leaflet and I think it's a pretty basic problem I'm fighting the last two days and though I've tried several ways I can't wrap my head around it. I'm loading markers via geojson: var ma_3 = L.mapbox.featureLayer().loadURL('./data/marathon/marker3x.geojson'); and then try to change properties like size or color according to the title used in the geojson data: ma_3.on('ready', function(layer) { this.eachLayer(function(marker) { if (marker.toGeoJSON().properties.title ===

How to calculate the distance of a polyline in Leaflet like geojson.io?

馋奶兔 提交于 2019-12-04 04:41:57
I am working on a map with Mapbox and Leaflet and I am supposed to let the user draw polygons and calculate and show the are of that polygon and I also need to let the user draw a polyline and show the distance of the polyline. I have figured out the polygon area feature but I cannot figure out how to calculate the distance of a polyline. My code is as follows: loadScript('https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-draw/v0.2.2/leaflet.draw.js', function(){ loadScript('https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-geodesy/v0.1.0/leaflet-geodesy.js', function(){ var

Mapbox: libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

一世执手 提交于 2019-12-04 04:35:14
问题 I've been implementing Mapbox as whilst working on Android, I get errors on iOS after installing via CocoaPods ... I was getting framework not found Mapbox but after Following an answer over at target overrides the FRAMEWORK_SEARCH_PATHS build settings about adding $(inherited) to framework search paths that resolved it but then there were following issues on build relating to libc++abi.dylib: terminating with uncaught exception of type NSException (lldb) My podfile is as follows: # Uncomment

Mapbox-gl typing won't allow accessToken assignment

廉价感情. 提交于 2019-12-04 01:30:27
I'm using the mapbox-gl library with TypeScript, and I've installed its community sourced type definitions with @types/mapbox-gl . When I try to import and set an accessToken to use the library, my TypeScript compiler throws this error: TS2540: Cannot assign to 'accessToken' because it is a constant or a read-only property. So I pulled up the .d.ts file and the variable in question looks extremely assignable (seen here: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/mapbox-gl/index.d.ts ): declare namespace mapboxgl { let accessToken: string; ... This is my code: import *

MapBox water/land detection

你。 提交于 2019-12-03 21:23:12
I am starting to use the MapBox iOS SDK . Is there any possible way to query the MapView by a coordinate and get back the terrain-type (water, land) as a result? I've been reading the API doc for quite a while now, but could not figure it out. I know that there are (interim) solutions available to use a Google webservice, but I need this to work offline. I am not bound to MapBox (but I like it) though, thank you for any hint! No need to delve into runtime styling (see my other answer, false lead): very simple method using mapView.visibleFeatures(at: CGPoint, styleLayerIdentifiers: Set<String>)

iOS and Basic offline app [closed]

懵懂的女人 提交于 2019-12-03 20:09:36
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I know about mapxbox/routeme and routeme but I need something basic. I need a basic map with all the countries and the only details it would be the name of the countries and the borders. Can I do that with mapbox? Is there any easier way to do that? The app should be offline and