Unplanned
Last Updated: 06 Dec 2022 09:18 by ADMIN
Michal
Created on: 22 Nov 2022 16:01
Category: Map
Type: Bug Report
4
OnShapeClick does not trigger for every bubble when the bubble layers are created dynamically

Hello,

i am came into scenario, where user wants multiple "colored" bubbles, the only option in current version is:
- use multiple bubble layers

But only ONE of the layer(the last one?) is firing the OnShapeClick event.

Expected:
Clicking on any "bubble"/shape should always fire the event OnShapeClick()

Is there any workaround, or idea how to force event to fire?

Dynamic loading of multiple colored layers/bubbles, but same problem is when you "statically" put 2 or more layers on map:

<TelerikMap Center="@Center"
			MinZoom="3" Height="80vh"
			Zoomable="true" Pannable="true" 
			Zoom="7" 
			OnMarkerClick="@( (args) =>  OZRowCmd((CrmMapOrgModel)args.DataItem,15))"
			OnShapeClick="@( (args) =>  OZRowCmd((CrmMapOrgModel)args.DataItem,15))"
	>
		<MapLayers>

			<MapLayer Type="@MapLayersType.Tile"
				  Attribution="@Attribution"
				  Subdomains="@Subdomains"
				  UrlTemplate="@UrlTemplate">
			</MapLayer>

			@if (MarkerList != null) foreach (var it in MarkerList)
				{
				
					@if (it.MarkerType == (int)MapLayersType.Marker)
					{
						<MapLayer Type="@MapLayersType.Marker"
				  Data="@MarkerData1.Where(x=>x.MarkerType==it.MarkerType)"
				  LocationField="@nameof(CrmMapOrgModel.LatLng)"
				  TitleField="@nameof(CrmMapOrgModel.CisloOrgNazev)"
				  />
				
					}
					@if (it.MarkerType == (int)MapLayersType.Bubble && MarkerData1.Any(x => x.MarkerType == it.MarkerType & x.StavTr == it.StavTr))
					{
						<MapLayer Type="@MapLayersType.Bubble"
				  Data="@MarkerData1.Where(x=>x.MarkerType==it.MarkerType & x.StavTr==it.StavTr)"
				  LocationField="@nameof(CrmMapOrgModel.LatLng)"
				  
				  ValueField="@nameof(CrmMapOrgModel.MarkerValue)" MinSize=@it.MinMarkerValue MaxSize=@it.MaxMarkerValue
				  >
							<MapLayerBubbleSettings>
								<MapLayerBubbleSettingsStyle >

									<MapLayerBubbleSettingsStyleFill Color="@it.MarkerColor"></MapLayerBubbleSettingsStyleFill>
									<MapLayerBubbleSettingsStyleStroke Color="@it.MarkerStrokeColor"></MapLayerBubbleSettingsStyleStroke>
								</MapLayerBubbleSettingsStyle>
							</MapLayerBubbleSettings>
						</MapLayer>
					}
				}

		</MapLayers>
	</TelerikMap>
3 comments
ADMIN
Hristian Stefanov
Posted on: 06 Dec 2022 09:18

Hi Michal,

Thank you for clarifying things. Now I understand better, and I'm reproducing the described behavior on my machine.

That is a confirmed bug not related to the other one. Indeed, that issue occurs when there are multiple dynamic bubbles.

You are automatically subscribed, as a creator, to receive email notifications for status updates.

Lastly, as a small gesture of gratitude for the effort and the newly reported bug, I added Telerik points to your account.

Regards,
Hristian Stefanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Michal
Posted on: 29 Nov 2022 10:52

Hello Hristian,

 it is not the same, what you are referring:

2) new feature: Change color OnClickXXXX = " Ability to change the color of the shape on click"

vs

1) bug: OnClickXXXX event NOT WORKING on ALL Bubble layers as expected(but only on the ONE of all)


My described scenario is for point 1) it should work on ALL(bubble) layers. Iam not tested behaviour of other layers, only bubble is confirmed.

Did it helped a little?

ADMIN
Hristian Stefanov
Posted on: 29 Nov 2022 09:41

Hi Michal,

We already have an item for an enhancement that will cover your needs: Ability to change the color of the shape on click. That said, I'm marking this one as a "Duplicate".

In the meantime, if an alternative approach appears, I will post it as a comment on the above items.

Let me know if there are any additional details.

Regards,
Hristian Stefanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.