mapbox-marker

Multiple markers - Same coordinates

China☆狼群 提交于 2021-02-06 12:56:10
问题 I'm having some troubles trying to display 2 different markers placed at exactly the same coordinates. The case is: we are displaying stores, and some of them are placed at the same building (ie. a mall), so, they are different stores but shares the same ubication/coordinates. Our json source content looks like this: { "properties" : { "id" : "1", "name" : "Store 1" }, "geometry" : { "coordinates" : [-70.66667, -33.45], "type" : "Point" } }, { "properties" : { "id" : "2", "name" : "Store 2" }

Multiple markers - Same coordinates

本秂侑毒 提交于 2021-02-06 12:55:03
问题 I'm having some troubles trying to display 2 different markers placed at exactly the same coordinates. The case is: we are displaying stores, and some of them are placed at the same building (ie. a mall), so, they are different stores but shares the same ubication/coordinates. Our json source content looks like this: { "properties" : { "id" : "1", "name" : "Store 1" }, "geometry" : { "coordinates" : [-70.66667, -33.45], "type" : "Point" } }, { "properties" : { "id" : "2", "name" : "Store 2" }

What is the best way to add markers on MapBox?

廉价感情. 提交于 2021-01-25 06:55:29
问题 As most of you know, mapbox.addMarker() is deprecated! I tried to figure the new way to add markers which are using Symbol Layer I'm using this code, it is working for me! but it re-define the Style of the map every time I want to add a marker here is the code: //Add Marker to the Map public void addMarker(@NonNull LatLng point) { Feature feature = Feature.fromGeometry(Point.fromLngLat(point.getLongitude(), point.getLatitude())); mapboxMap .setStyle(new Style.Builder() .fromUri("mapbox:/

How to rotate car marker image in Mapbox 3.6?

天涯浪子 提交于 2019-12-13 16:53:22
问题 I want to rotate marker image as per the route direction.I had implemented map using Map box SDK. Coordinates & directions are fetched through webservice. I tried imageForMarker but it didnt work. Implemetation is as follow func mapView(_ mapView: MGLMapView, imageFor annotation: MGLAnnotation) -> MGLAnnotationImage? { let img = imageRotatedByDegrees(oldImage: UIImage(named: "car")!, deg: CGFloat(self.bearing)) return MGLAnnotationImage(image: img, reuseIdentifier: "car") } func

NativeScript: addMarkers outside of onMapReady

落花浮王杯 提交于 2019-12-13 02:50:53
问题 I'm new in NativeScript, and I'm playing with maps, using Mapbox. I want add markers, programmatically from a function when tap a buttom, to map. XML ` <Button text="GET" tap="getRequest" /> <<<-- BUTTON! <ContentView> <map:MapboxView accessToken= token mapStyle="streets" zoomLevel="13" showUserLocation="false" disableRotation= "true" disableTilt="false" mapReady="onMapReady"> </map:MapboxView> </ContentView>` JS `function onMapReady(args) { args.map.addMarkers([ { id: 1, lat: -35.30505050,

Mapbox GL - my basic, default marker won´t show up on the map

柔情痞子 提交于 2019-12-11 05:12:42
问题 lately, I started fiddling with MapBox and right now, I am trying to add the marker to the map. Not as easy as it seems. I am trying to add basic, default marker with code copypasted straight out of "Mapbox GL" reference guide. Still, it won´t show up. This is the code I use, it cant get simpler that this... var marker = new mapboxgl.Marker().setLngLat([45.702117, 42.395926]).addTo(map); Does anybody have an idea why it doesnt work? Whole "not working scenario" can be seen at http://www

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

How can I show the count of points in the particular latitude and longitude in Mapboxgl?

旧时模样 提交于 2019-12-08 10:20:00
问题 I want to show the marker as well as the number of points available in a particular latitude and longitude. I expect something Similar as above. But i have added another 2 layers to show different color and number on it. If I do this way, I am getting "undefined" error while showing popup. Since the data takes from the other layer. If it takes from layer "locations" it works as expected. But when we have multiple occurences popup content shows "undefined". Below is my implementation output