Bing Maps with pins and cluster loses click handler and has bad performance - bing-maps

I have a Bing map with pins and clusters.
I noticed performance issues and bugs in this combination. I have setup a demo using code from the official docs.
1st issue: Pins click handler are not clickable anymore after zooming
Steps to reproduce:
Load the above demo
Hover over a single pink pin => its clickable (cursor is hand/pointer)
Click on the + button to zoom in
Some of the single pink pins are not clickable anymore (cursor is default)
2nd issue: Really bad performance when the map is initialised
It looks like this is caused to many, many _initiateRequest, _setImage or downloadImage calls within the Bing Maps JavaScript. See this perf screenshot taken with Firefox Performance tool:
This performance hog drops to about the half if no icon param is passed, that is, in the demo this is commented out so that just the default Bing Maps icons are used:
cluster.setOptions({
// commenting this out improves performance
// icon: svg.join(''),
anchor: new Microsoft.Maps.Point(radius, radius),
textOffset: new Microsoft.Maps.Point(0, radius - 8)
});
N.B. in the demo only the cluster has a custom icon setting. The performance gets much, much worse if also all the pins get a custom icon setting. It does not matter whether the icon is SVG or PNG, both are really bad performance and the Bing Maps seems to trigger DOM events and old browsers like IE11 even hang for several seconds.

Try using the experimental branch. There has been a ton of updates added to it which address these issues. You can try it by adding "&branch=experimental" to the map script URL. The main release branch will be updated with the updates in the experimental branch in the next 2 weeks.

Related

TileOverlay requests tiles after it was made invisible [maps 18.0.2]

Note: problem appears when using MapsInitializer.Renderer.LATEST
Goal: I am using several tile overlays in order to switch the data user sees above the map. Several overlays needed to avoid flickering that user sees when we clear the overlay tile cache if using single overlay. For example: showing different weather data depending on the selected time moment.
Steps: When I add a TileOverlay I make it invisible with TileOverlay.isVisible=false right after map.addTileOverlay. Also added some logs to see when the TileProvider actually requests the tiles.
Problem: In the logs I see that overlay requests tiles when I move the map or change a zoom level. Previously the TileOverlay was not requesting tiles if one is set to invisible.
Demo app source code is here https://github.com/olkazmin/googlemaps-tileoverlay-sample.git
Pixel 3a, Android 12
Google Play Services client library version: com.google.android.gms:play-services-maps:18.0.2
Google Play Services version on the device: 22.06.15
compileSdkVersion 31
buildToolsVersion 31.0.0
All was working ok in com.google.android.gms:play-services-maps:17.0.0. Everything works as expected when using MapsInitializer.Renderer.LEGACY

How to solve problems with offline map display?

There is one problem: I made it using maperitive tiles with the required scale of 12-15 (so that the map is available offline), then the task was to connect the resulting offline map to this project: https://github.com/ds4es/real-time-units- gps-tracking (the project is based on transferring data using kafka from a csv file, which contains latitude ,longitude time, to a map with the leaflet plugin, to display the real-time movement of markers on the map), however, this did not work, apparently some are required - something http requests, not just a link to tiles. I want to note that a similar way of writing: file:///home/jonh/openstreetmap/{z}/{x}/{y}.png worked in another project, but unfortunately not in this situation. Attached images below
The 1st figure shows the state of affairs when adding an offline map ( line: MAP_URL_TEMPLATE=' Tiles/{z}/{x}/{y}.png) and, as we can see, only moving labels are displayed, and the map itself is not displayed;
2nd figure Shows the state of affairs when the online map is used, i.e. constantly need internet to display it;
The 3rd picture shows the console, where, before the red line, an offline map was used (Tiles/{z}/{x}/{y}.png). And after the red line, I changed the address to the online map again: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png' and the map started showing up all over again.
How can I connect an offline map? Thanks for answers :)

Scrolling in "RepeatBox" control is not smooth

I have two pages, first page I have a ScrollView control and the other page I used RepeatBox control.
My problem is the ScrollView page scroll is smooth, But the RepeatBox page scrolling is not smooth (i.e. flickering while scrolling).
Could any one help on this? Thanks in advance.
Performance of repeatbox can change according to the objects you used in it. Because it is drawn with rowRender event, it can take more time with different objects. Also, in some old devices, especially for Android, you can see these kind of performance differences in applications.
Maybe you can test with other devices, or you can test with more simple project in order to see if it is always flickering or not.
The problem comes with all images on the visible screen are opening again from the local storage by rowRender method. In the native RepeatBox after image comes on visible area are stored and not again opening from local storage and creates performance problem.

google glass camera parameter settings

I'm working on an app that includes a custom camera application on Glass. I want to be able to hard-set different camera parameters, but I'm having difficulty figuring out which ones I actually have access to.
I tried calling parameters.flatten() and got a whole bunch of options that I thought I would be able to use, but when I tried testing them, nothing happened. (For example, when I tried setting the color effect to sepia, the result was still in normal color). Is there any documentation or code I can look at that will tell me which parameter options I actually have?
There are a few open issues on our issue tracker about camera parameters that do not behave as expected:
Issue 302: GDK: Camera effects not registered or take affect
Issue 303: GDK: Request: Additional camera focus modes (with auto focus)
Issue 304: GDK: Camera scene mode does not register or take affect
You may want to follow those so that you can be updated as the GDK evolves.

MKMapView Cannot Zoom Map

I created a really basic app that just shows an MKMapView and the UserLocation. I'm having problems drawing this base map sometimes (it only shows pieces of the map), and whenever I pinch zoom the map, it fails to redraw, and just shows the blank gray tiles. The console shows this whenever it needs to get a new map tile:
/SourceCache/GoogleMobileMaps/GoogleMobileMaps-263.5/googlenav/mac/Loader.mm:231 server returned error: 502
This looks like a gateway error, but that doesn't make any sense, since I'm using open WiFi for testing. I haven't implemented any region zooming code, I just want to display and zoom the basic map first. I'm using iOS 4.2.1 (8C148), so I'm wondering if this is a problem with the newer iOS versions? Any ideas?
Edit: Works fine now, must just be a problem with Google's servers.
Just started getting the same error. I've searched online and can't see anyone else having the issue (yet). Thought it was something I did, but suspect its at Google's end.
I think that the problem is solved now. It had to be a momentary Google Maps problem.