Add marker clustering support to the (kendo) Map control as seen in https://developers.google.com/maps/documentation/javascript/marker-clustering
This functionality already exists in the Telerik Silverlight Map control and it would be great to see similar functionality here.
Here's an example of what I want: http://demos.telerik.com/silverlight/#Map/Cluster
What I am looking for is the same sort of 'pretty' cluster behaviour as when you zoom out of some pins you just see a number of how many pins are below this.
In the example I am trying to replicate is that if a pin in that cluster is red (RAG status) then the top layer symbol should also be red. If this was not a network monitoring system you would ideally see a sea of green markers, if one node/pin went down/red, they the top most image should be red to draw your attention to it and then zoom in.
How can that be done in (KendoUI) Mapping?
I want to change the imagerySet of the bing maps layer code behind when postback? How?
ImagerySet="road" / ImagerySet="aerialWithLabels"......
I'm mapping locations. some times companies have multiple assets at the same address or same Longitude/Latitude. When this is rendered on the map it shows up as one pin and all the rest get lost in the ether. I ran across some Kendo example that is supposed to pad the pins. It doesn't work. How do we get multiple pins to render at the same location or how do we get one pin to show multiple sets of data?
Map code is pretty simple:
<telerik:RadMap RenderMode="Lightweight" runat="server" ID="mapSite" Zoom="4" CssClass="MyMap Rounded" Width="100%" Height="100%">
<DataBindings>
<MarkerBinding DataShapeField="Shape" DataTitleField="SITE_CITY" DataLocationLatitudeField="Latitude" DataLocationLongitudeField="Longitude" />
</DataBindings>
<LayersCollection>
<telerik:MapLayer Type="Tile" Subdomains="a,b,c"
UrlTemplate="https://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png"
Attribution="">
</telerik:MapLayer>
</LayersCollection>
</telerik:RadMap>
Code behind:
Binding code:
Dim res = From x In db.SITEs
Where x.COMPANY.COMPANY_CODE.Equals(Session("Market").ToString)
Select New clsSiteData With {
.Shape = "PinTarget",
.SITE_ID = x.SITE_ID,
.SITE_CODE = x.SITE_CODE,
.SITE_NAME = x.SITE_NAME,
.SITE_ADDRESS_1 = x.SITE_ADDRESS_1,
.SITE_ADDRESS_2 = x.SITE_ADDRESS_2,
.SITE_CITY = x.SITE_CITY,
.STATE_CODE = x.STATE.STATE_CODE,
.POSTAL_CODE = x.SITE_POSTAL_CODE,
.BUILDING_ID = x.SITE_BUILDING_IDENTIFIER,
.PROPERTY_ID = x.PROPERTY_CODE.PROPERTY_CODE,
.Latitude = If(x.SITE_MAP_LAT, 0),
.Longitude = If(x.SITE_MAP_LON, 0)
}
mapSite.DataSource = res.ToList
mapSite.DataBind()
ItemDataBound:
Private Sub mapSite_ItemDataBound(sender AsObject, e As MapItemDataBoundEventArgs) Handles mapSite.ItemDataBound
Dim htmlTemplate AsStringTry
hlAssInv.Visible = CType(ViewState("Asset"), Boolean)
htmlTemplate = getInnerHTML(tblTemplate)
Dim marker As MapMarker = TryCast(e.Item, MapMarker)
If marker IsNothingThenReturnEndIfDim item As clsSiteData = TryCast(e.DataItem, clsSiteData)
marker.TooltipSettings.Content = [String].Format(htmlTemplate,
item.SITE_CODE,
item.SITE_NAME,
item.SITE_ADDRESS_1,
item.SITE_ADDRESS_2,
item.SITE_CITY,
item.STATE_CODE,
item.POSTAL_CODE,
item.BUILDING_ID,
item.PROPERTY_ID,
item.SITE_ID)
Catch ex As Exception
Dim xxx AsString = ex.Message.ToString
End Try
End Sub
Hello,
is it possible to show the Marker Tooltips initially (code behind)?
i didnt find any example.
I'm using OpenStreetMap as the MapLayer
Is there a way to add a search address box?
|
[InvalidOperationException: Fehler während der Serialisierung oder Deserialisierung mit JSON-"JavaScriptSerializer". Die Länge der Zeichenfolge übersteigt den in der maxJsonLength-Eigenschaft festgelegten Wert.]
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +759618
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat) +103
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +178
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +47
Telerik.Web.UI.AdvancedJavaScriptSerializer.Serialize(Object obj) +102
Telerik.Web.UI.RadMap.DescribeComponent(IScriptDescriptor descriptor) +54
Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(Control control) +180
Telerik.Web.UI.RadDataBoundControl.GetScriptDescriptors() +9
System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +164
Telerik.Web.UI.RadDataBoundControl.RegisterScriptDescriptors() +153
Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer) +122
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
Telerik.Web.UI.ControlRenderer.Render(HtmlTextWriter writer) +148
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer) +334
System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer) +58
Telerik.Web.UI.OurUpdatePanel.Render(HtmlTextWriter writer) +264
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
Telerik.Web.UI.PreControlToAjaxify.Render(HtmlTextWriter writer) +147
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +11661639
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +47
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +169
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page) +1016
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +276
System.Web.UI.Page.Render(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +80
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4239
It seems problem just occurs, when there are more then 3024 Markers on the map. Below this count there is now problem.
I allready changed the MaxJsonLength in the web.config. That changed nothing.
Versionsinformationen: Microsoft .NET Framework-Version:4.0.30319; ASP.NET-Version:4.8.4494.0
How can I create a custom shape (polygon) using Json object with coordinates after OnClick event in Javascript?
I've tried the following but I'm getting an error: Uncaught TypeError: a3.slice is not a function
function initialize(sender, eventArgs) {{
How can i make a popup on a layer click with information (name,etc...).
On Telerik Radmap Asp.net
In my maps ItemDataBound event I'm building the markers tooltip. The tooltip has an image in it that also acts as a hyperlink. So this works:
Dim TOOLTIP_TEMPLATE As String = "<a href=""Reports.aspx"" target=""_self""><img src=""Images/inventory.png"" /></a>"
This does not:
Dim TOOLTIP_TEMPLATE As String = "<asp:HyperLink runat=""server"" ImageUrl=""Images/inventory.png"" NavigateUrl=""~/Reports.aspx"" ToolTip=""To Inventory""></asp:HyperLink>"