Services Plugins FAQs

New Features - MapBox

Hi Zeroqode!

One for you @levon

So, I wanted to ask if we could have some additions put into the MapBox plugin. I’ve been testing it recently and hope to eventually use for a new app. I’m also hoping that you guys can put some of these in. Most of them are relatively simple, a couple may be a little more awkward and they’re based around supporting the routing aspect of it.

Tracking
Can we have some options added that come with the ‘Start Location Tracking’ action as referenced here…
https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions
enableHighAccuracy,
timeout,
maximumAge,
custom: auto rotate map to keep route facing ahead.

This would be super useful, maybe just set the map bearing with the heading value every time the location was found. I could do it myself if the next section was implemented although better to have this in the plugin so no delays.

When tracking, is there an option to follow on the map so the map moves as you do?
https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol

Events
“Location found” and “Location not found” events.
Can we have a couple of new events that only get triggered when the ‘Start Location Tracking’ event has been run. They shouldn’t be triggered when the location is not being tracked.
https://docs.mapbox.com/mapbox-gl-js/api/#geolocatecontrol.event:geolocate

Would you be able to create an action called “Set event listener” and have a dropdown inside it with all the different events that can be set on a map? I’ve not checked which ones are available but I assume there are some. When an event is fired, for example ‘moveend’ (if that one exists) then a bubble event is triggered - 'Map event is fired" or something. We can then run workflows on different things like if a user double taps, move/drag has ended, zoom is changed etc…

I’m thinking you’d need to be careful as to not allow for the action to create multiple events of the same type on a map here, because a bubble event may trigger 5 times if you tried to set the same type of event 5 times in your workflow (not that people would do that of course! state it in the documentation part). You may want to not allow duplicate events to be set but you certainly don’t want to remove any that are there by default which may prohibit normal operation of the map.

Clearing a route
The ‘Set directions’ action creates a nice route on the map, but how do you clear it?

Heading
This is bugging me! Exposed states ‘Heading supported’ and ‘GPS enabled’ are both showing no through iPhone (yes through Chrome), which seems a little strange to me. As a result, I can’t get the heading degrees value. There must be a way to make these available, they’re only useful on your phone, how to make those yes!

Multiple waypoints
Ability to add multiple waypoints to a route using the ‘Set directions’ action. Can we make this action work with not only a start and end point, but also multiple points along a route? It might be a better option to have a new action called “Add to route” perhaps? or some other method like allowing lists in the Origin and Destination field, then it would simply be up to the user to manipulate the address lists into the correct order in which they want the points to be plotted on a map.

Routing Profile
Can we set the following as options in the ‘Set directions’ action? The correct route would then be displayed based on the option selected.
driving-traffic,
driving,
walking,
cycling.
https://docs.mapbox.com/help/glossary/routing-profile/

Navigation controls
Can we add all of these?
showCompass,
showZoom,
visualizePitch.
https://docs.mapbox.com/mapbox-gl-js/api/#navigationcontrol

Exposed state
Can you add a ‘Current speed’ state. Value could be whatever the default is, like in meters per second or you could add one for KPH and another for MPH. Calculations for each based on meters per second are below.
KPH = meters per sec * 3.6
MPH = meters per sec * 2.237

Map center exposed states (lat/lng) are not updated when the map moves, instead they only get updated when you click the map once, they should ideally be updated after a map move has ended otherwise you can keep on moving the map around and the cords never get updated unless you finish with a tap/click.

Route options!
This is a big one for me but crucial none-the-less and I can’t do what I want without it.
So, there’s a lot of data when it comes to planning a route, just think of “sat-nav” and return everything you can think of to make a typical sat-nav app work. I don’t know if you’re using the Directions API at any point, but if you are and all the data is available in it, then adding it to the ‘Get data from an external API’ would be great.

  • Directions (instructions) when route is planned, get all the route info back.
  • Route leg options & step manoeuvres object & voice instructions object.
  • Recalculate a route when ‘tolerance’ (which you can set) is past a specified threshold.
    Tolerance being a value which detects by how much you’re ‘off-route’ by and recalculates accordingly.

Bug - (no longer happening after retesting, kept in here for reference)
It looks like bubble’s star rating plugin is interfering with this, not done much testing but just add the star rating element, open up the console and click on it.
I got an error saying “Cannot read property ‘pageX’ of undefined at r.getPosition”

Does this work with the WRLD 3D (or EeGeo) maps?
This would be the icing on the cake if it does!

And are we using map caching options?

Thanks for listening! great plugin and this one has so much potential. One map to rule them all :wink:

Keep us updated, Paul

Hello Paul, thanks for reaching out and feedback!

We’ll take a look at the feedback, to provide a clear response we’ll need to analyze it. Once we check what’s feasible, we’ll then proceed with implementation.

However, first, we’ll work on the bug report, and move towards improvements implementation afterward.

Could you provide more details regarding the issue, like the setup, steps to reproduce the issue, browser tested, OS. Thanks.

We’ll keep you posted, this though will take some time due to other priorities.
Thanks for understanding.
best,
Dumitru.

1 Like

Hi Dumitru,

That’s brilliant, thank you. I’d be quite excited if you guys can get these implemented.

Regarding more steps to reproduce that bug, it looks like it was something to do with my setup at the time which caused it, and I’ve been unable to replicate it on any browser so this one can be crossed off the list.

It seems to be behaving fine now. I’ve tested all my star rating elements and nothing is producing any errors or seems to be conflicting anywhere.

Regards,
Paul

I’m going to add things to this post “as and when I find issues” with anything. One thing I have just noticed is that when you run the “Set directions” action after you have changed the map style, no route is drawn onto the map.

You can change the map style to anything, Street, Satellite, Outdoors etc
When it’s changed, then at any point after that you try to run the “Set directions” action, it will no longer draw the route on the map.

If at any point you want to see a demo app then I’ll give the Editor URL so you can see the actions.

Hello Paul.

After analyzing the plugin feedback you’ve provided and how it is positioned on the market we acknowledged that plugin could be a thing in long term perspective and be used as one solution to rule them all.
However, we can only improve so far. So it was decided to implement a couple of features at a time, and see how it goes from there and the response from community.
Would you be able to provide a couple of listed features, you’ll need in day to day situations so we could move to implement those first?
Thanks for understanding and support. :slight_smile:

Also as priority we’ll provide bug fixes first, before implementing something new.

Regards,
Dumitru.

Hi Dumitru,

Understood, that sounds like a sensible approach. Thanks for taking the time to reply back.
So the items listed below are the ones which are causing me problems right now.

I hope these are ok…

  • Route options - return all data when a route is planned, so we can use it for various things like displaying directional icons, distances to next turns, distances of each road, voice directions etc.

  • Tracking - option to allow the map to move as you do when the “Start Location Tracking” action runs. Can be a checkbox to disable/enable it. Optionally, if it’s possible to keep the map facing in the direction to which you’re travelling then it will become very useful indeed.

  • Exposed states - Fix the Map center exposed state so it updates after a move has ended and not on a click of the map which is what it’s doing at the moment. Return speed when tracking is active would also be very beneficial.

I know you only mentioned “a couple” so feel free to leave the last entry off the list if need be, although that Map center state update is a real pain if the only way to update it is to click the map.

Very much appreciated, thanks again for all your efforts.

Paul

1 Like

On a side note…

New version of MapBox GL JS just came out by the way (v1.4.0)
https://docs.mapbox.com/mapbox-gl-js/overview/

I noticed you’re using a really old version of the library. I’m pretty much using all the element actions in an app I’m creating at the moment so would be happy to test the latest version of the library if you ever planned to upgrade it.

<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.0/mapbox-gl.css' rel='stylesheet' />

Paul

Hello, Paul!

Again, thanks for provided information we’re on track to start implementing the features so updating the library should come in handy, to maintain the up to date functionalities.

Regards
Dumitru.

1 Like

Brilliant, thanks for the update.

How’s the dev work coming along Dumitru?

Hi Paul!

Sorry, we’re still providing a couple of fixes and support regarding issues for other products, as I said early this is our priority.
However implementation should be on track in next couple of days, so we’ll provide an update regarding the plugin status next week.
Thanks for understanding.

Regards,
Dumitru.

Ok, no worries, just thought I’d ask that’s all :slight_smile:
Thanks for replying.

1 Like

Hi, Paul!

Regarding the implementation of features request. We started the development process with the ones you’ve mentioned the most needed.

The map facing directions for Tracking feature and voice directions for Route Options will be out of scope.
As for the rest, should be feasible. :slight_smile: The availability of the update with the estimate of implementation, testing and deploying around next week.
Should any impediments occur, we’ll notify.

Thanks for understanding.

Regards,
Dumitru

1 Like

That’s great, thanks very much for the update.

Hello Paul!

Thanks for patience, though we’re still implementing the requests, sorry for delay from us due to unforeseen consequences the update will be available at a later date.
Sorry about it and thanks for understanding.
We’ll definitely be back to you, asap.

Best,
Dumitru.

Hi there, no problems thanks for the update.

Thanks again, very much appreciate all your hard work with this.

Regards,
Paul

Hi Paul!

Happy to announce we pushed the update to live, Route options, Tracking, and Exposed states features were added.

Update 11/6/19

  • Improvements - expose now speed state, added API call for retrieving route details.

Please check the latest version of plugin for the update and give it a spin. Also the feedback regarding the update is appreciated.
The demo setup - https://bubble.io/page?type=page&name=mapbox-map&id=zeroqode-demo-08&tab=tabs-1

Thanks for support and understanding.

Regards,
Dumitru.

That’s great!! I don’t think I’ve ever been more excited about a plugin before!
Thanks ever so much for this, I shall give it a good test and as always, give some feedback in the next couple of days.

Paul

1 Like

I’m loving this but a quick question about it…
Is this GUI always visible? Is there an option to make it not visible?

image

Edit: Ignore this, I’ll write something up which includes some ideas about this and other things soon.

Hi Paul!

Then we added the on screen UI, forgot to add a toggle switcher for it. We pushed a quick update, with possibility to customize the look of on screen UI.
See the latest update for new plugin proprieties.

image(12)

Thanks for feedback.

Regards,
Dumitru.