I'm developing a map app using mapbox_gl package, and trying to edit style layer while app is running.
Generally, style layers are edited using the MapBox style editor. But I want to change the state of the layer depending on the conditions of the app user.
For example, in the MapBox style editor, set a layer to show a red line tracing the road as shown in the image below.
And I want to be able to change this to blue within the app.
But I don't know how to edit the state of the layer. Anyone know how to do this?
Related
So I'm currently working on a feature that uses MapBox package/plugin to display a Map on my app.
What I want to achieve is something like this:
So far from what I've seen in Flutter the addSymbol method only allows you to add images and text.
Does anyone know how to create a marker like the ones showed in the image? Is there any support for this?
I am beginner in mapbox js. I am looking for a way to update a single feature of layer in mapbox JS. I would like to change at any time color of my single feature. I want to manage this manually. Color will depend on a value from DB arrives from socket. There is a function setPaintProperty, but this is for whole layer. Anybody know is there any possibility to change color single feature like this?
I'm starting research to add a user feature to an existing map built in Mapbox GL JS (wrapped in an Angular 2+ application). What I need to do, is allow a user to be able to draw and rotate ellipses and text labels over the top of a map, and be able to save screen captures of the result.
I'm coming into this with no experience in Mapbox or Leaflet, so I have a lot to figure out. My first goal is to determine if I can do this in Mapbox directly (with a plugin?), of if I will need to render a canvas over the top of my map with some third-part drawing library (I have a lot of experience with those).
The obvious advantage to doing this in Mapbox directly would be that we might still be able zoom and pan.
The Mapbox-gl-draw library lets the user author features in a map, but probably not to the extent you need.
If the features the user creates don't need to live "in map space" (ie, the map is static, and the labels are statically positioned over the top, for printing), working directly on a canvas will give you much more flexibility. You'll also have access to a much wider variety of libraries.
I'm using leafletjs with a custom large image where I am serving the tiles from my local server.
I need to display a minimap that shows what is currently visible on screen, what would be best to use in these circumstances?
Is there something already available in leafletjs or do I need to use a plugin or build a custom one?
I saw this one but it seems kind of specific to using a map: https://github.com/Norkart/Leaflet-MiniMap
Dynamic Data Display is a fantastic library that so far has been very useful for me. Thanks go to Mikhail Brinchuk for developing the library.
This posting gives a great tip for adding controls to DynamicDataDisplay charts using xaml that pan and zoom with the chart content: https://dynamicdatadisplay.codeplex.com/discussions/74886
This allows the placement of an image, text, or whatever, on the chart that moves with the chart axes. This is all done in xaml.
How do I add these in the cs code such that I can add controls to the chart (markers, images and such) at run-time? I'm trying to plot some GPS data in one chart using Google maps as the source images. In another chart I'd like to add controls that pan with the data. The above link does this, but I am not able to add it at run-time, nor specify the position in my chart data.