mapbox

Find co-ordinates where LineString intersects a Polygon border in turfjs

不羁的心 提交于 2019-12-10 18:27:14
问题 Is there a way in Turfjs to determine the co-ordinates at which a LineString intersects with the border of a polygon? There's a number of ways to find out if a point is within a polygon and a number of ways to find out if a point is on a line and so on, but I can't seem to figure out a way to ask "at what point does this line intersect this polygon's border" . I could enumerate the points in the polygon using a line intersection algorithm to find that point but I was wondering if there's a

Mapbox,leaflet: Increase marker size on Zoom

微笑、不失礼 提交于 2019-12-10 18:13:41
问题 How can I increase the size of all markers when we zoom in the map? I know we can use map.on('zoomend', function() {}); and change the icon size inside the function.But I have a lot of markers and looping through all of them and changing them individually doesn't seem like a good idea. 回答1: There is nothing wrong with looping through a set of markers on every zoomend event. Why doesn't it sound like a good idea? An alternative to looping through markers is to extend the L.Marker class to do

Using Leaflet.AwesomeMarkers plugin with Font Awesome 5?

我们两清 提交于 2019-12-10 17:51:11
问题 How do I upgrade to Font Awesome 5 for the leaflet plugin Leaflet.awesome-markers? This plugin has not been updated on github for some time and uses font awesome v4. This is for an app that uses mapbox, leaflet and leaflet awesome markers with font awesome v4 and works correctly. I've tried to upgrade to Font Awesome 5 like so: app.scss @import url('webfonts/font-awesome-pro-5.0.1.css'); @import url('webfonts/fa-solid-900.ttf'); @import url('webfonts/fa-solid-900.woff'); @import url('webfonts

Unable to use Mapbox “Create an Upload” api to upload data file

≯℡__Kan透↙ 提交于 2019-12-10 17:35:31
问题 I am trying to upload my local json file to mapbox using their upload api. I am following below steps: Retrieve S3 credentials to stage the file Use an S3 client, like the AWS SDK, to upload a file to S3 using those credentials Create an upload using the staged file's URL Retrieve the upload's status as it is processed into a tileset Once the upload is complete, use the tileset ID like you'd use any other tileset. I completed steps 1 and 2 but getting following error on steps 3: The remote

Adding direction arrow to current location on Mapbox (iOS)

試著忘記壹切 提交于 2019-12-10 14:47:50
问题 I have an app that uses Mapbox to present a map with the user location, it looks like this: I want to add a direction arrow to the current location marker that shows you the direction you're walking to, like that: Does anybody know how can I add this arrow using Mapbox iOS SDK ? Thanks! 回答1: With Mapbox Maps SDK for iOS v3.6.3 or newer it’s possible to add an always-on heading indicator using MGLMapView.showsUserHeadingIndicator. With this setting enabled, the user location annotation will

Error parsing XML: unbound prefix for mapbox

核能气质少年 提交于 2019-12-10 14:27:49
问题 I'm trying to use mapbox in my android application. I use android studio 0.8.0. I've included this line in my build.gradle file compile ('com.mapbox.mapboxsdk:mapbox-android-sdk:0.4.0@aar'){ transitive=true } compile ('com.cocoahero.android:geojson:1.0.0@aar'){ transitive=true } But when I'm using it in my xml file, it has a namespace error. the mapbox namespace causes that. any idea what might cause that? <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas

Adding data to a displayed map on mapbox

痞子三分冷 提交于 2019-12-10 11:46:52
问题 I know how to display a map now from this here. But what I want to do is now add data to it, sort of like what this link does here. Eventually I need to call a python function that returns this data that gives coloring to a particular area which looks like this: [{'type': 'scattermapbox', 'mode': 'markers', 'text': ['Census Tract:304.01<br> Predicted Growth Rank:1.0<br> Year: 2017 '], 'marker': {'size': 1, 'color': ['rgba(247, 251, 255, 255)'], 'colorscale': [[0.0, 'rgba(8, 48, 107, 255)'],

Retrieve data from mapbox geocoder

谁说胖子不能爱 提交于 2019-12-10 11:26:23
问题 i only need the mapbox geocoding autocomplete without the map (to put the result with lat/lng in another request) I managed to put it totally alone without the map using this : <template> <div id='geocoder' class='geocoder'></div> </template> <script> import MapboxGeocoder from '@mapbox/mapbox-gl-geocoder' require('../../node_modules/@mapbox/mapbox-gl-geocoder/dist/mapbox-gl-geocoder.css') mapboxgl.accessToken = '<your access token here>'; var geocoder = new MapboxGeocoder({ accessToken:

How can I Open Multiple Popups in Leaflet Marker at a time

雨燕双飞 提交于 2019-12-10 10:33:45
问题 Map` like this: L.Map = L.Map.extend({ openPopup: function(popup) { this._popup = popup; return this.addLayer(popup).fire('popupopen', { popup: this._popup }); } }); But I am using leaflet. Is there anyway to extent like so that i can prevent closing my marker popup? L.mapbox.accessToken = constant.accessToken; var map = L.mapbox.map('map', 'mapbox.streets', {zoomControl: true}); 回答1: Update Dec 2017 Leaflet popup options have been extended to include { autoClose: false } which has the

Message from debugger: Terminated due to memory issue

China☆狼群 提交于 2019-12-10 01:52:43
问题 My app working with Geojson file. I use MapBox SDK to add MGLPolyline to map. But the problem is my file too large, so that the app crash and got the error: Message from debugger: Terminated due to memory issue . I faced with 66234 objects at first loop. I tried to chunk the array to new array but not success. Please help me to solve the prolem. Here is my code for draw on map and here is my test project on github use Xcode 8.1 If have any different 3rd party which can solve my prolems is