mapbox

Unable to upload local json file to mapbox using tileset Uploads API

泄露秘密 提交于 2019-12-07 07:56:28
I am following steps given in this Mapbox Uploads API documentation for uploading my local json file to Mapbox through API. I've created C# console app for that. I am able to get Mapbox temporary s3 credentials but when I try to upload file to s3 using those temporary mapbox credentials, I get following error: The AWS Access Key Id you provided does not exist in our records. Below is my console app code: class Program { static void Main(string[] args) { var getS3AccessDetailsUrl = @"https://api.mapbox.com/uploads/v1/{my_mapbox_username}/credentials?access_token=my_mapbox_access_token"; var res

Draw a line between two markers map-box react-native?

故事扮演 提交于 2019-12-07 06:27:08
问题 I was able to achieve creating a marker (annotation) on the map using the below code in react-native . import React, { Component } from 'react'; import { Platform, StyleSheet, Text, View } from 'react-native'; import MapboxGL from '@mapbox/react-native-mapbox-gl'; import Mapbox from '@mapbox/react-native-mapbox-gl'; const columbusCircleCoordinates = [ -73.98197650909422, 40.768793007758816 ]; Mapbox.setAccessToken('your access key'); export default class App extends Component {

Parametric equation to place a leaflet marker on the circumference of a circle is not precise?

醉酒当歌 提交于 2019-12-07 00:18:16
问题 I am working on an application where I have the center of a circle and the radius and I am plotting the circle with the help of Leaflet. I placed a marker on the north most end of the circumference and made it draggable. var circle = L.circle(coords, radius).addTo(map); convertRadiusToLatitude = parseInt(response.radius)/111111; var coordsOnRadius = [parseFloat(response.lat) + convertRadiusToLatitude, parseFloat(response.long)]; var markerOnRadius = L.marker(coordsOnRadius, {draggable: true})

Mapbox Android determine zoom level that contain all markers

泄露秘密 提交于 2019-12-06 18:51:54
问题 Is there a way to determine a zoom level so that all of my markers can fit in the zoom level? i am using mapbox 0.4.0 I think the answer is similar to this, but I can't find the android version [https://www.mapbox.com/mapbox.js/example/v1.0.0/markers-only-at-zoom-level/] 回答1: With the latest SDK version the existing answer does not work anymore. Instead, use this: LatLngBounds latLngBounds = new LatLngBounds.Builder() .include(new LatLng(<marker 1 latlng position>)) .include(new LatLng(

Mapbox GL JS refresh layer

。_饼干妹妹 提交于 2019-12-06 16:26:51
I'm using Chroma.js to style a Mapbox choropleth map. I do this by storing in a variable dataStyleProp a single property of the source -- in this case the data are population and the properties are "free", "slave", "white", and "total"). Then I use dataStyleProp to build the Chroma.js color scale. What I would like to do is: Select the value for dataStyleProp from a radio button on the HTML page, Pass that value to the Chroma script, Then refresh the map to show the new choropleth. I've managed to do 1. and 2. but can't get 3. to work. I've tried map.update and map.resize to try to force the

mapboxgl.js versus leaflet.js

喜欢而已 提交于 2019-12-06 14:28:37
I am about to start a web application with the main purpose of displaying a mapbox map, toggle layers and display data based on interactions with the map. I'm wondering should I be using mapboxgl.js AND leaflet.js, mapboxgl.js OR leaflet.js. Everyone keeps saying leaflet is amazing but wondering if mapboxgl gives you the same functionality and performance? I keep reading conflicting things on the internet Would really appreciate the help A few words to clarify the difference: mapboxgl uses browsers' WebGL technology, therefore it requires a modern enough browser, and uses more client computing

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

萝らか妹 提交于 2019-12-06 13:45:59
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}); Update Dec 2017 Leaflet popup options have been extended to include { autoClose: false } which has the required effect : var my_marker = L.marker([my_lat, my_lng], {icon: my_icon}) .addTo(map) .bindPopup('My Popup

how to customise cluster icon in mapbox-gl?

痴心易碎 提交于 2019-12-06 12:15:59
I want to implement clustering in my map. I found example of simple clustering from Mapbox Cluster Example but My code is here , where marker ==> {marker-symbol} is from studio. but it is not working. Is it possible to achieve output of cluster? Solved By following code var layers = [ [150], [20], [0] ]; layers.forEach(function(layer, i) { map.addLayer({ "id": "cluster-" + i, "source": "markers", "type": "symbol", "layout": { "text-field": "{point_count}", "text-font": [ "Arial Unicode MS Bold" ], "text-size": 13, "text-anchor": "bottom", "icon-image": "emptyMarker", "icon-size": 0.25 },

Trouble using Leafletjs MarkerClusterGroup and filters with Mapbox

巧了我就是萌 提交于 2019-12-06 12:15:05
问题 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

Do embedded GeoJSON styles work with Mapbox GL?

孤街浪徒 提交于 2019-12-06 11:19:33
Is it possible to utilize the built-in properties attribute of a GeoJSON data source to automatically style a Mapbox GL map without having to pre-specify a style? I have a use case where I dynamically load in GeoJSON LineString data that needs to be a particular color and it already has style data built in: {"properties": {"color": "#ffff33"... Right now, I have a rather inelegant setup where the relevant color is parsed out, translated into a style, and added to the map upon every load: $scope.patternPropToStyle = function(props) { var id = 'pattern' + props.pid; var style = { "id": id, "type