Sometimes my map is rendering empty blank spaces in right corner of the map once on clicking the marker icon.
I m using leaflet.js and mapbox.js and this issue occurs only in few cases .
This issue has been fixed in latest version of mapbox(need to update leaftet). Please upgrade your mapbox.
Related
I'd like to add custom markers with text labels on my map. I can use MapViewPins for this, but they "tremble" when map is being moved. Even one MapViewPin behaves like this in official Here example, so it is probably not an optimization issue.
When i load PNG image and use it as a MapMarker, it works perfectly. But i don't know how to add text to a marker.
I am using Here SDK for Flutter (Navigate Edition) 4.12.4.0 with Flutter 3.3.2
GIF below is an example. Cyan circles are MapMarkers, markers with icons and label are MapViewPins. Is there any solution to this problem?
Unfortunately, the MapViewPins, being widgets embedded in the MapView surface, need to be relocated to the fixed coordinates every time the map is interacted with by gestures, which is why you notice this "strange" behavior.
However, what you mention about using MapMarkers would be the best solution but in this case instead of using PNG files, you could use SVG files in which you enter the text you want to display.
There is currently no other way available to do what you mention using the HERE SDK (Navigate Edition).
Here is a link to our most up-to-date HERE SDK (Navigate Edition) documentation: https://developer.here.com/documentation/flutter-sdk-navigate/dev_guide/index.html
I have a map with different levels. Each level takes information from a json file and generates the icons with the layer.setIcon method.
By dragging the map, the icons disappear when are outside the displayed area.
Why?
EDIT:
Okay, I think I see the problem here:
Leaflet.MarkerCluster.LayerSupport
Without this extension, rendering works... why?
That is the default behaviour of Leaflet.markercluster plugin, especially visible on mobile.
More specifically, it has a removeOutsideVisibleBounds option that is enabled by default:
removeOutsideVisibleBounds: Clusters and markers too far from the viewport are removed from the map for performance.
On mobile, anything outside the current map viewport is removed, and re-appears when panning stops. But this means that during pan, you may miss some markers.
See also Leaflet MarkerCluster removeOutsideVisibleBounds not working
Unfortunately, there is no API to customize this behaviour, other than disabling it by passing the option to false:
const mcg = L.markerClusterGroup({
removeOutsideVisibleBounds: false // Disable default behaviour
}).addTo(map);
Demo on mobile: https://jsfiddle.net/4weocd0q/1/embedded/#Result
We are currently using bing maps V8 and am trying to achieve the current bing maps navigation bar mode which looks something like this bing maps navigation bar mode on https://www.bing.com/maps.
These are the properties that I have added to my code
navigationBarMode: navigationBarMode.compact,
navigationBarOrientation: Microsoft.Maps.NavigationBarOrientation.vertical,
showLocateMeButton: true
The first line helped me to get the Map Type drop down and second line is to align the zoom in and out vertically because by default compact mode is setting up the zoom in and out button horizontally and the third line displays the locate me icon.
The problem with this approach is the Birds Eye view is not working as expected once I click the Bird's Eye view the "X" on the top right corner doesn't show up.
Is there any alternate way to achieve the current bing maps navigation bar mode?
Thanks in advance.
This appears to be fixed in the experimental branch of Bing Maps V8. Try adding &branch=experimental to the map script URL in your app and see if the issue is resolved. All fixes in the experimental branch will be pushed into the main release branch near the end of this month.
I have a relatively simple web app, that allows the user to enter two waypoints (from and to locations), then click a button to get the directions itinerary and a map with the route path plotted on the map.
The app was laid out so that the form, the itinerary and the map where in separate "tabs" and the layers could be shown and hidden based on the tab selection.
Oddly, the map would always be zoomed right out to the minimum zoom (entire world view) although the pushpins (waypoints) and route path were correctly plotted, the map bounds were not being honored. If the map was visible, then those route path bounds were honored and the map functioned as expected.
An example of this is here: http://jsfiddle.net/junto/DMR2T/
Click on 'Get Directions' when the map is visible, and the map is zoomed to the correct bounds. Then toggle the map and click 'Get Directions' again. Toggle the map back to visible. You'll see the map has the incorrect zoom level and bounds.
Lastest build of Google Chrome, Safari, Firefox all display this issue. Internet Explorer does not.
Is this a bug?
My guess is that in order to properly compute zooming and bounds, the map needs to know its display size. In order for the map to know that, it needs to be visible. So a workaround would be to move the map off screen rather than hiding it.
See my updated example here: http://jsfiddle.net/ZWzjC/
In my example I simply set a negative left margin, I'm sure there are more clever ways to move something off the screen while maintaining its visibility. I tried using visibility:hidden but that doesn't seem to hide the map correctly. display:none won't work since that causes the map to have 0 dimensions, and that's what .toggle() probably uses internally anyway.
I am trying to create a dygraph(using gviz) in a GWT application. The dygraph shows up as collapsed chart on the top left corner. i can see the slider in that corner.
If i resize the browser window, the chart shows up as expected.
I thought of calling chart.resize(width,height) but get an error chart has no method resize.
Any ideas how to fix it?
When you use GViz, you're most likely using a wrapper, not the real dygraph object.
Does "chart.date_graph.resize(width, height)" work for you?