mapbox

Mapbox: The list does not work when I try to change the lat/long of the geojson objects

可紊 提交于 2019-12-13 07:29:08
问题 I tried out this code and it works perfectly, until I try to change the position of the markers. For example, in the geojson array, I changed the first variable's properties and when i click it on the list, it only shows the marker (no map). Could anyone see what the issue might be?? Here is the code: http://plnkr.co/edit/ohumVwCE0CqcZOIkzPTa?p=preview var geojson = [{ "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [ 34

Mapbox show Exception and terminate when using mbtiles in ios

喜你入骨 提交于 2019-12-13 06:14:28
问题 I am using MapBox example and I have imported my mbtiles file. I am getting this error: MB Example[8517:c07] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[NSURL initFileURLWithPath:]: nil string parameter' I have checked my mbtile file and its loading on x-code so there no problem with it. 回答1: RMMBTilesSource is indeed using that code. You need to make sure that your OSMBright.mbtiles file is part of the project's target and being added to your bundle

Mapbox GL JS API Set Bounds

ぐ巨炮叔叔 提交于 2019-12-13 05:22:18
问题 I've been trying to get my map (JS below) to be able to auto zoom to the extent of one of the JSON files used for display (there will be a number of separate ones), but I can't seem to figure out how I would achieve that. var map = new mapboxgl.Map({ container: 'map', // container id style: 'mapbox://styles/mapbox/streets-v8', //stylesheet location center: [-79.376828,43.635570], // starting position zoom: 12, pitch: 07, // pitch in degrees bearing: -16.1// bearing in degrees }); map.on(

Leaflet and Mapbox: Styling mapbox markers using L.geoJson?

早过忘川 提交于 2019-12-13 05:18:50
问题 I am trying to style my marker color using Mapbox's simple-style syntax within a L.geoJson function like so: L.geoJson(myData, { pointToLayer: L.mapbox.marker.style, style: function(feature){ return { 'marker-color': '#ffcc00' } } }); According to mapbox docs, you can use L.mapbox.marker.style within L.geoJson for mapbox's default markers, but I can't seem to figure out how to style it with a different color. There was a similar question posted here but I could not get it work in my client

Mapbox markers from geoJSON not appearing in IE9

天大地大妈咪最大 提交于 2019-12-13 04:52:34
问题 I have a map that is loading markers from a local geoJSON file. This works fine in all browsers I have tested (FF, Chrome, Safari, Opera, IE10, IE11) but not in IE9. I added a marker to the map without geoJSON (the yellow bus marker) which does show up fine in IE9. Here is the relevant code: // set up mapbox var map = new L.mapbox.map('map', '########', { tileLayer: { detectRetina: true, minZoom: 2 }, zoomControl: false }); // marker without geoJSON L.marker([-37.9, -77], { icon: L.mapbox

Mapbox GL JS external geojson data does not load, however copying the geojson data into the html code works

牧云@^-^@ 提交于 2019-12-13 04:42:34
问题 On mapbox GL JS map.addSource(), when pointing the data to an external geojson file (located in the same directory as the html file) the data does not appear. However when I copy the geojson data directly into the html file it does appear. I dont think my pathing is incorrect (trees.geojson is in the same folder as heatmap.html), im using Ubuntu 18.04. I would like to keep my geojson data external. Im trying to follow this tutorial: https://docs.mapbox.com/help/tutorials/make-a-heatmap-with

Getting layer features with querySourceFeature

六月ゝ 毕业季﹏ 提交于 2019-12-13 04:25:19
问题 I'm trying to get all features from Mapbox style layer. I found querySourceFeature() method. However, I cannot get exact source. Here simple code block from Mapbox documentation. I don't use GeoJsonSource for styling, I mean I dont add any GeoJsonSouce. So, "source" variable returns "null" and I did not understand what should come instead of GeoJsonSource and "population-source". GeoJsonSource source = style.getSourceAs("population-source"); List<Feature> features = source.querySourceFeatures

Is it possible to create a custom popup for a MGLPolyline?

安稳与你 提交于 2019-12-13 04:25:06
问题 So I have been looking for a way to make an MGLPolyline tapable. One way I have thought about for doing this would be to use that popup thing that MapBox has added to make it show something, but make the popup invisible that way I can still do something (call function) when a certain line is taped. Currently when you add polyline.title then when you tap the bellow function runs, but withough this or setting it to nothing ("") then it does not run func mapView(_ mapView: MGLMapView,

MapBox turn by turn navigation Custom Marker Issue

旧时模样 提交于 2019-12-13 04:07:56
问题 I am using navigation view for my application, I wan to load n number markers on navigation view with different marker images. When I tried to do this with navigation annotation view only destination image is changed others shown as 1,2,3 etc. I tried to load image using this function func navigationMapView(_ mapView: MGLMapView, viewFor annotation: MGLAnnotation) -> MGLAnnotationView? { let reuseIdentifier = "\(annotation.coordinate)" let annotationView1 = MGLAnnotationView(reuseIdentifier: