mapbox, tabbed infowindow on marker doesn't read the variables - infowindow

Using Mapbox instead of Google, I'm building up a menu in the map that shows tabbed infowindow on every marker. The problem is that no matter which marker I'm on, the infowindow is always the same (from only one of the markers), as if it doesn't read the variable content var p = marker.feature.properties;
Anyone please have a look at this demo Thank you
[the system wont allow me to reply to the reply I got, so here's my reply:]
Thanks for the link. It's a different approach. The menu is missing and I can't really integrate the two scripts:

This was an error in that particular example: see the fixed version that correctly binds the right tooltip to the right marker.

Related

Create a menu on avatar click

I've been searching for quite a while now, and I don't know if I'm not searching the correct term, but I want to make a menu that displays over the current screen when you click on your avatar.
Like this one from Google:
Or this one from Facebook:
I tried using showMenu(), but this one requires that I use PopUpMenuItem() which is, but it does not allow customizing the whole menu. For what I understand, I have to draw a Material() widget or Stack() over the current screen, but I have no knowledge on that.
What you need is an OverlayEntry. They're tricky, and there are packages that help you manage overlays more easily. Please check these:
https://pub.dev/packages/modals
https://pub.dev/packages/flutter_portal

Is there a way to keep displaying alternative routes on map, drawn using drawRoutes() method, on clicking any of alternative route in mapbox android?

I have displayed a list of direction routes on map, using "draw Routes()" method of Navigation "Mapbox Map" class. I have added start navigation method after it and providing it with first route in list. The navigation route is displayed in blue color and rest all other routes are in gray color, acting as alternative route.
My Query is, as soon as I click on gray color alternative route or nearby position from alternative routes on map, the alternative routes get disappeared. I want to keep displaying the alternative route or else want to disable the click listener on alternative route, so that they don't disappear. Is there a way to achieve this functionality?
Please help me out with the same.
Note: added spaces in words mentioned in quotes to avoid typing errors.
I see you are new here and i would like to help you!
Could you please share the code in which you implement the example you describe? It is very helpful for other developers if they can reproduce the behaviour.
This would help a lot, and saves time when trying to answer your question! As a nice side effect, you would not receive negative votes!

Opening a popup on layer option click in leafletjs

I will be trying to show a set of options using the layerGroup functionality to filter out the markers. I need to show a popup when an option is selected from a layer which will prompt the user to enter a number based on which i will be showing the markers. Is there a possible way?
In the above sketch, there' s a sample filter at the top right which i intend to show using the layers but the thing is on selecting the 'Location' option i have to show a popup that will prompt the user to enter a location number and on that basis the markers should be placed on the map.
I guess there would be multiple ways of achieving this, depending on what behaviour exactly you want to get.
E.g. you could use a "dummy" layer (with name "Location" probably?), that you can add in the Layers Control (I guess that is the "sample filter at the top"?). Then listen for this dummy layer for being added to the map, and launch your modal ("popup") at this time. Then when the user enters the necessary information, you can programmatically add the corresponding markers to the map.
If you need further help, please add more details on what behaviour you try to get, or start your implementation and post new questions, so that you already have a start of what you are trying to achieve and people can elaborate on it.

UX for letting user drag a Google map marker and enter form fields

I want to allow the user to specify the location of something by dragging a marker onto the map. And I also want to let them enter some information about that spot.
The problem is that this makes a very complex form. Can this be done in one step? Or do I have to make them choose location first, and then in a second form take the form-field input?
How would you guys go about doing this? Are there any good tutorials for this sort of thing out there?
Thanks,
Alex
What do you mean in one step?I implemented this by adding a floating form in the side of a map and adding two hidden(or not?) fields that populated with the coords of the draggable marker.I really don't see any other way except maybe if you embed the form in the info window of the draggable marker
Cheers

How to disable Bird's eye angled view in Bing Maps control version 7

For business use Microsoft charge extra for use of the Bing Maps birds eye angled view, so my client has ask that I disable this option. In verion 6.3 of the control this was easy, there is a map option that can be used to do this: enter link description here
However, I can't find how to do this using the API with version 7 of the control. The current menu has Birds eye as an option with check boxes show labels and show angled view. Ideally I'd like to disable the option from the menu so that users are only able to view road and aerial views. So it looks like I have two options available:-
1) Hide the show angled view check box somehow with css. The issue here is that I can't get to the HTML content using the IE developer toolbar of firebug as it only displays when selected.
2) Attach to the map maptypechanged event and if birds eye map selected set it back to the map type it used to be.
Both of the above are far from ideal. Does anyone have a suggestion for the best way of doing this?
Sample code:
map = new Microsoft.Maps.Map(document.getElementById('myMap'),
{
credentials: 'Your Bing Maps Key',
disableBirdseye:true
});
here are some working examples from the iSDK:
http://www.bingmapsportal.com/isdk/ajaxv7#CreateMapWithMapOptions14
API Reference:
And here is the MSDN:
http://msdn.microsoft.com/en-us/library/gg427603.aspx
disableBirdseye
boolean
A boolean indicating whether to disable the bird’s eye map type. The default value is false. If this property is set to true, bird’s eye will be removed from the map navigation control and the birdseyeMapTypeId is disabled. Additionally, the auto map type will only display road or aerial.
This property can only be set when using the Map constructor.
You're correct in stating that there is no way currently using the v7 API to disable individual map styles. A possible Option #3 which is less hackish, but requires a bit more work, is to set the showMapTypeSelector property of the MapOptions to false, which would have the effect of hiding the entire map style selection dropdown. Then create your own custom navigation menu that only includes links to those styles you want to allow the user to choose.