mapbox

How does one make circles using a for-loop with Leaflet?

血红的双手。 提交于 2019-12-12 02:19:00
问题 I'm not sure why my for-loop for adding circles to a leaflet layer isn't working. Here's my code: var linkDistance = $('#linkDistance').val(); var nodesCount = 8; var bandwidth = "10 GB/s"; // gps coords for 505 Marquette var rootLongitude = 35.088878; var rootLatitude = -106.65262; var mymap = L.map('mapid').setView([rootLongitude, rootLatitude], 13); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk

Adding custom icon and marker data together using Mapbox

对着背影说爱祢 提交于 2019-12-12 01:59:30
问题 I am new to mapbox and I have a simple question. I have made a feature layer and a list of custom icons. How do I add the two together? My feature layer is formatted as below: L.mapbox.featureLayer({ "type": "Feature", "geometry": { "coordinates": [ '.$long.','.$lat.' ], "type": "Point" }, "properties": { "title": "'.$business_name.'", "description": "'.$address_1.', '.$address_2.', '.$address_3 .', '.$postcode .'" } }).addTo(map); And example of my custom marker is below var accomodation = L

Only factor methods can have swift_name attribute Mapbox

a 夏天 提交于 2019-12-12 01:44:20
问题 I'm using cocoa pods and map box was working fine but I installed an update and this message appeared: Now I can't run my project. I'm using map box iOS sdk 3.3.4. What should I do to fix this issue? 回答1: According to apple documentation: The Swift compiler automatically imports Objective-C code as conventional Swift code. There may be edge cases in your code that are not automatically handled. If you need to change the name imported by Swift of an Objective-C method, enumeration case, or

highlighting polyline features in mapbox-gl.js

淺唱寂寞╮ 提交于 2019-12-12 01:36:49
问题 I am trying to use the following code to highlight features under the mouse pointer. The difference between my geojson data and the geojson data used in the linked example is that the example is made up of polygons whereas my geojson is made up of polylines. I have tried to modify the code accordingly in order that lines are highlighted however it does not work. My geojson is accessible here: http://iskandarblue.github.io/mapbox/data/prototype2.geojson Any advice on what needs to be changed?

Mapbox iOS SDK - visibleFeaturesAtPoint returns empty array

 ̄綄美尐妖づ 提交于 2019-12-12 01:21:38
问题 I am trying the MGLMapView.visibleFeaturesAtPoint but am always getting back an empty array. Can someone tell me what I am doing wrong here? Posted below is my code which is basically the adding the marker example (https://www.mapbox.com/ios-sdk/examples/marker/) but using the same point to get visible features at the marker point. import Mapbox class ViewController: UIViewController, MGLMapViewDelegate { override func viewDidLoad() { super.viewDidLoad() let mapView = MGLMapView(frame: view

Is there a way to get information out of a mapbox popup when clicked on?

独自空忆成欢 提交于 2019-12-11 20:08:19
问题 I currently have a mapbox app that displays a popup for each marker once clicked which is great. What I want however, is the information within the popup to be sent to a seperate div within the app, so the data is displayed at the bottom of the screen instead of within a popup on the map. So it looks something like the image below, but at the bottom of the page instead and with only the essential data such as name, description etc. The code below is what I am using to generate the markers. So

Image getting stretched when creating MBTiles using TileMills to use as an Image on Whirly Globe Framework

可紊 提交于 2019-12-11 19:23:12
问题 I am struck with issue . I want to use My personal Image as an image on whirly globe.I used a Jpeg file and changed into .tiff file and added to Tile Mills as a Layer (Following the rules specified in the crash course of tile mills).Now i am facing an issue while exporting the image as MbTiles . I looked into this Link for taking reference on what should be 'Dimensions' of the image to be used on whirly globe. Right now i have an image whose dimensions are 10184X7638. But this image is not

Persistent layers after style change in Mapbox gl js

你。 提交于 2019-12-11 17:56:01
问题 Is it possible to change map style from Streetview to satellite retaining all manually drawn layers (geojson shapes)? e.g. Let's say we have a circle on Streetview map and want to show the same circle in street view mode. After we change map style to satellite we have to add the circle again. Is there any possibility to avoid that? I want to find the possibility do not process something that was processed already again, to exclude listening for style changes and adding layers again. Is any

How to add/remove markers with MAPBOX android SDK

删除回忆录丶 提交于 2019-12-11 17:28:32
问题 I am adding markers using the recommend way by adding the marker to the map style as a new layer List<Feature> symbolLayerIconFeatureList ..... @Override public void onMapReady(@NonNull final MapboxMap mapboxMap) { symbolLayerIconFeatureList = new ArrayList<>(); symbolLayerIconFeatureList.add(Feature.fromGeometry( Point.fromLngLat(-57.225365, -33.213144))); symbolLayerIconFeatureList.add(Feature.fromGeometry( Point.fromLngLat(-54.14164, -33.981818))); symbolLayerIconFeatureList.add(Feature

Mapbox how to set up the menu so that only the “visible” layers are in an “On” state

浪尽此生 提交于 2019-12-11 17:17:45
问题 I have created a menu that allows me to toggle layers on and off. When the map initially displays, I want only two layers to be turned on. I have been able to turn off the layers i want off during the initial display using: map.on('load', function() { map.setLayoutProperty('id', 'visibility', 'none'); }); However, after several attempts, I haven't been able to have the menu display the layers that are off in a toggled "Off" state. You can find the current map here (If you toggle the first two