gpt4 book ai didi

c# - 为什么谷歌地图在几次回复后卡住页面

转载 作者:行者123 更新时间:2023-11-30 18:43:44 27 4
gpt4 key购买 nike

我遇到了最奇怪的问题。我无法弄清楚为什么我正在构建的网站上的谷歌地图在大约 5 或 6 次回发后慢慢卡住页面。我目前在更新面板中使用日历,后退和下一步按钮导致谷歌地图做奇怪的事情。我已经删除了更新面板,它仍然做同样的事情。单击大约 3 次后,标记图标开始缓慢模糊并最终变黑。这让我抓狂。任何想法都会很有帮助。谢谢。有问题的页面的链接是 http://adkrenter.com/properties/106-plum-poppy-north它在 ie 和 firefox 中都这样做。

最佳答案

您的根本问题是每次单击 PrevNext 时,您都会在同一位置向 map 添加之前数量的 3 倍的标记。

如果没有看到更多代码,我无法告诉您为什么会发生这种情况(或如何修复它)(浏览页面源代码很痛苦,所以如果您可以发布一些与您的内容相关的代码正在点击,这可能会有所帮助)

更新

我看了大约7-10次点击后的响应,这是一个巨大的(相对来说,初始响应只有几十KB)168 KB,其中143 KB是JavaScript代码,用于为两者添加相同的标记页面上的 map - 每个 162 次!难怪页面会卡住。

这是响应的一部分:

var GoogleMap1 = new Artem.Web.GoogleMap({"Address":"106 Plum Poppy North, Malta , NY, 12020","BaseCountryCode":null,"ClientID":"ctl05_GoogleMap1","ClientMapID":"GoogleMap1","DefaultAddress":null,"DefaultMapView":0,"Directions":[],"EnableContinuousZoom":false,"EnableDoubleClickZoom":false,"EnableDragging":true,"EnableGoogleBar":false,"EnableInfoWindow":true,"EnableMarkerManager":false,"EnableReverseGeocoding":false,"EnableScrollWheelZoom":false,"EnterpriseKey":null,"Height":"130px","IsStreetView":false,"IsStatic":false,"Key":"ABQIAAAATFt6mjpmHxeLQ689NDV5WhTHwM4h-1LWnzPqjMrWYJQMyFF86hTACw-YJNmRQV0Dk4jcB3zQHvdUsw","Latitude":42.968839,"Longitude":-73.777681,"MapEvents":{},"MarkerEvents":{},"MarkerManagerOptions":{"borderPadding":null,"maxZoom":null,"trackMarkers":null},"PolygonEvents":{},"PolylineEvents":{},"ShowMapTypeControl":false,"ShowScaleControl":false,"ShowTraffic":false,"StreetViewMode":0,"StreetViewPanoID":null,"Width":"190px","Zoom":14,"ZoomPanType":0});
GoogleMap1.addMarker({"Address":"106 Plum Poppy North, Malta , NY, 12020","AutoPan":true,"Bouncy":false,"Clickable":true,"Draggable":false,"DragCrossMove":false,"IconAnchor":{"X":0,"Y":0},"IconSize":{"Height":0,"Width":0},"IconUrl":null,"InfoWindowAnchor":{"X":0,"Y":0},"Latitude":42.968839,"Longitude":-73.777681,"MaxZoom":null,"MinZoom":null,"OpenInfoBehaviour":0,"ShadowSize":{"Height":0,"Width":0},"ShadowUrl":null,"Text":null,"Title":null});
GoogleMap1.addMarker({"Address":"106 Plum Poppy North, Malta , NY, 12020","AutoPan":true,"Bouncy":false,"Clickable":true,"Draggable":false,"DragCrossMove":false,"IconAnchor":{"X":0,"Y":0},"IconSize":{"Height":0,"Width":0},"IconUrl":null,"InfoWindowAnchor":{"X":0,"Y":0},"Latitude":42.968839,"Longitude":-73.777681,"MaxZoom":null,"MinZoom":null,"OpenInfoBehaviour":0,"ShadowSize":{"Height":0,"Width":0},"ShadowUrl":null,"Text":null,"Title":null});
GoogleMap1.addMarker({"Address":"106 Plum Poppy North, Malta , NY, 12020","AutoPan":true,"Bouncy":false,"Clickable":true,"Draggable":false,"DragCrossMove":false,"IconAnchor":{"X":0,"Y":0},"IconSize":{"Height":0,"Width":0},"IconUrl":null,"InfoWindowAnchor":{"X":0,"Y":0},"Latitude":42.968839,"Longitude":-73.777681,"MaxZoom":null,"MinZoom":null,"OpenInfoBehaviour":0,"ShadowSize":{"Height":0,"Width":0},"ShadowUrl":null,"Text":null,"Title":null});
//repeated a few hundred times

GoogleMap2.addMarker({"Address":"106 Plum Poppy North, Malta , NY, 12020","AutoPan":true,"Bouncy":false,"Clickable":true,"Draggable":false,"DragCrossMove":false,"IconAnchor":{"X":0,"Y":0},"IconSize":{"Height":0,"Width":0},"IconUrl":null,"InfoWindowAnchor":{"X":0,"Y":0},"Latitude":42.968839,"Longitude":-73.777681,"MaxZoom":null,"MinZoom":null,"OpenInfoBehaviour":0,"ShadowSize":{"Height":0,"Width":0},"ShadowUrl":null,"Text":null,"Title":null});
GoogleMap2.addMarker({"Address":"106 Plum Poppy North, Malta , NY, 12020","AutoPan":true,"Bouncy":false,"Clickable":true,"Draggable":false,"DragCrossMove":false,"IconAnchor":{"X":0,"Y":0},"IconSize":{"Height":0,"Width":0},"IconUrl":null,"InfoWindowAnchor":{"X":0,"Y":0},"Latitude":42.968839,"Longitude":-73.777681,"MaxZoom":null,"MinZoom":null,"OpenInfoBehaviour":0,"ShadowSize":{"Height":0,"Width":0},"ShadowUrl":null,"Text":null,"Title":null});
GoogleMap2.addMarker({"Address":"106 Plum Poppy North, Malta , NY, 12020","AutoPan":true,"Bouncy":false,"Clickable":true,"Draggable":false,"DragCrossMove":false,"IconAnchor":{"X":0,"Y":0},"IconSize":{"Height":0,"Width":0},"IconUrl":null,"InfoWindowAnchor":{"X":0,"Y":0},"Latitude":42.968839,"Longitude":-73.777681,"MaxZoom":null,"MinZoom":null,"OpenInfoBehaviour":0,"ShadowSize":{"Height":0,"Width":0},"ShadowUrl":null,"Text":null,"Title":null});
GoogleMap2.addMarker({"Address":"106 Plum Poppy North, Malta , NY, 12020","AutoPan":true,"Bouncy":false,"Clickable":true,"Draggable":false,"DragCrossMove":false,"IconAnchor":{"X":0,"Y":0},"IconSize":{"Height":0,"Width":0},"IconUrl":null,"InfoWindowAnchor":{"X":0,"Y":0},"Latitude":42.968839,"Longitude":-73.777681,"MaxZoom":null,"MinZoom":null,"OpenInfoBehaviour":0,"ShadowSize":{"Height":0,"Width":0},"ShadowUrl":null,"Text":null,"Title":null});
GoogleMap2.addMarker({"Address":"106 Plum Poppy North, Malta , NY, 12020","AutoPan":true,"Bouncy":false,"Clickable":true,"Draggable":false,"DragCrossMove":false,"IconAnchor":{"X":0,"Y":0},"IconSize":{"Height":0,"Width":0},"IconUrl":null,"InfoWindowAnchor":{"X":0,"Y":0},"Latitude":42.968839,"Longitude":-73.777681,"MaxZoom":null,"MinZoom":null,"OpenInfoBehaviour":0,"ShadowSize":{"Height":0,"Width":0},"ShadowUrl":null,"Text":null,"Title":null});
//repeated a few hundred times

GoogleMap2.load();

我不熟悉 .NET 和 C#,所以除此之外我真的帮不上什么忙,因为我不知道这个“更新面板”是如何工作的。但问题似乎出在服务器上 - 它正在发回同一个标记,其计数似乎呈几何级数增长 - 传入的标记数量是先前标记数量的 3 倍。

关于c# - 为什么谷歌地图在几次回复后卡住页面,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6092581/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com