ThinkGeo.com    |     Documentation    |     Premium Support

Cannot make click events to work

Hi,


I have one click event (client side) defined on a InMemoryMarkerOverlay (view) and on MarkerOverlay (client side) (view).  I have also a click event defined on the map (client side) (view).  The only one working is the map click event....  could you tell me if am I right or if there is something that I should be aware when using click events?   


I have anoter post about html popup not working at all....


 


thanks


 jm.


 


 


 


 





function clickOnMarkerA(e) {

    var x = e;

}



function clickOnMarkerB(e) {

    var x = e;

}


function clickOnMap(e) {

    var x = e;

}



var OnMapCreating = function (map) {
}

var OnMapCreated = function (map) {
    _map.push(map);
    if (_map.length > 0) {
        setTimeout('timeout_trigger()', 0);
    }
}


      @{
                Html.ThinkGeo().Map("Map3", System.Web.UI.WebControls.Unit.Percentage(100), System.Web.UI.WebControls.Unit.Percentage(100))
                .MapBackground(new BackgroundLayer(new GeoSolidBrush(GeoColor.StandardColors.White)))
                 .CurrentExtent(-14148507.181077, 6271924.7354557, -5114687.7715466, 3097880.0780531)
                .MapUnit(GeographyUnit.Meter)
                .MapTools(mapTools =>
            {
                mapTools.OverlaySwitcherMapTool().Enabled(true);
                mapTools.MouseCoordinateMapTool().Enabled(true);
                mapTools.PanZoomBarMapTool().Enabled(true);
                mapTools.LoadingImageMapTool().Enabled(false);
                mapTools.TouchMapTool().Enabled(true);
                mapTools.MouseMapTool().Enabled(true);
                mapTools.KeyboardMapTool().Enabled(true);
                mapTools.ScaleLineMapTool().Enabled(true);
                mapTools.PanZoomMapTool().IsGlobeButtonEnabled(false).Enabled(false);
                mapTools.MiniMapMapTool().Enabled(true);
            })
            .MarkerOverlay(overlay =>
            {
                overlay.Name("MarkerOverlay")
                 .IsBaseOverlay(false)
                 .Columns(col => col.Add(new FeatureSourceColumn("PropertyUseCode", "DOUBLE", 32)))
                     .ZoomLevelSet(zoomlevelSet =>
                     {
                         HtmlString _html1 = new HtmlString("<h3>Property Use: [#PropertyUse#]</h3><h3>Property Type: [#PropertyType#]</h3><h3>Prim Prop Code: [#PrimPropCode#]</h3>");

                         MarkerClassBreak classBreak0 = new MarkerClassBreak(0);

                         MarkerClassBreak classBreak1 = new MarkerClassBreak(1);
                         classBreak1.DefaultMarkerStyle.WebImage = new ThinkGeo.MapSuite.MvcEdition.WebImage(@"/App_Themes/img/Places/High Detail/48x48/Places - High Detail Headquarters.png", 48, 48);
                         classBreak1.DefaultMarkerStyle.WebImage.ImageOffsetX = 0;
                         classBreak1.DefaultMarkerStyle.WebImage.ImageOffsetX = 0;
                         classBreak1.DefaultMarkerStyle.Popup.ContentHtml = _html1.ToHtmlString();
                         classBreak1.DefaultMarkerStyle.Popup.AutoSize = false;
                         classBreak1.DefaultMarkerStyle.Popup.IsVisible = false;
                         classBreak1.DefaultMarkerStyle.Popup.HasCloseButton = false;
                         classBreak1.DefaultMarkerStyle.Popup.Width = 200;
                         classBreak1.DefaultMarkerStyle.Popup.Height = 100;
                         classBreak1.DefaultMarkerStyle.Popup.BorderColor = GeoColor.SimpleColors.Black;

                         MarkerClassBreak classBreak2 = new MarkerClassBreak(2);
                         classBreak2.DefaultMarkerStyle.WebImage = new ThinkGeo.MapSuite.MvcEdition.WebImage(@"/App_Themes/img/Places/High Detail/48x48/Places - High Detail Shipping Docks.png", 48, 48);
                         classBreak2.DefaultMarkerStyle.WebImage.ImageOffsetX = 0;
                         classBreak2.DefaultMarkerStyle.WebImage.ImageOffsetY = 0;
                         classBreak2.DefaultMarkerStyle.Popup.ContentHtml = _html1.ToHtmlString();
                         classBreak2.DefaultMarkerStyle.Popup.AutoSize = false;
                         classBreak2.DefaultMarkerStyle.Popup.IsVisible = false;
                         classBreak2.DefaultMarkerStyle.Popup.HasCloseButton = false;
                         classBreak2.DefaultMarkerStyle.Popup.Width = 200;
                         classBreak2.DefaultMarkerStyle.Popup.Height = 100;

                         MarkerClassBreak classBreak3 = new MarkerClassBreak(3);
                         classBreak3.DefaultMarkerStyle.WebImage = new ThinkGeo.MapSuite.MvcEdition.WebImage(@"/App_Themes/img/Places/High Detail/48x48/Places - High Detail Industrial 2.png", 48, 48);
                         classBreak3.DefaultMarkerStyle.WebImage.ImageOffsetX = 0;
                         classBreak3.DefaultMarkerStyle.WebImage.ImageOffsetY = 0;
                         classBreak3.DefaultMarkerStyle.Popup.ContentHtml = _html1.ToHtmlString();
                         classBreak3.DefaultMarkerStyle.Popup.AutoSize = false;
                         classBreak3.DefaultMarkerStyle.Popup.IsVisible = false;
                         classBreak3.DefaultMarkerStyle.Popup.HasCloseButton = false;
                         classBreak3.DefaultMarkerStyle.Popup.Width = 200;
                         classBreak3.DefaultMarkerStyle.Popup.Height = 100;


                         MarkerClassBreak classBreak4 = new MarkerClassBreak(4);
                         classBreak4.DefaultMarkerStyle.WebImage = new ThinkGeo.MapSuite.MvcEdition.WebImage(@"/App_Themes/img/Places/High Detail/48x48/Places - High Detail CDC Office.png", 48, 48);
                         classBreak4.DefaultMarkerStyle.WebImage.ImageOffsetX = 0;
                         classBreak4.DefaultMarkerStyle.WebImage.ImageOffsetY = 0;
                         classBreak4.DefaultMarkerStyle.Popup.ContentHtml = _html1.ToHtmlString();
                         classBreak4.DefaultMarkerStyle.Popup.AutoSize = false;
                         classBreak4.DefaultMarkerStyle.Popup.IsVisible = false;
                         classBreak4.DefaultMarkerStyle.Popup.HasCloseButton = false;
                         classBreak4.DefaultMarkerStyle.Popup.Width = 200;
                         classBreak4.DefaultMarkerStyle.Popup.Height = 100;


                         MarkerClassBreak classBreak5 = new MarkerClassBreak(5);
                         classBreak5.DefaultMarkerStyle.WebImage = new ThinkGeo.MapSuite.MvcEdition.WebImage(@"/App_Themes/img/Places/High Detail/48x48/Places - High Detail Industrial 2.png", 48, 48);
                         classBreak5.DefaultMarkerStyle.WebImage.ImageOffsetX = 0;
                         classBreak5.DefaultMarkerStyle.WebImage.ImageOffsetY = 0;
                         classBreak5.DefaultMarkerStyle.Popup.ContentHtml = _html1.ToHtmlString();
                         classBreak5.DefaultMarkerStyle.Popup.AutoSize = false;
                         classBreak5.DefaultMarkerStyle.Popup.IsVisible = false;
                         classBreak5.DefaultMarkerStyle.Popup.HasCloseButton = false;
                         classBreak5.DefaultMarkerStyle.Popup.Width = 200;
                         classBreak5.DefaultMarkerStyle.Popup.Height = 100;


                         MarkerClassBreak classBreak6 = new MarkerClassBreak(6);
                         classBreak6.DefaultMarkerStyle.WebImage = new ThinkGeo.MapSuite.MvcEdition.WebImage(@"/App_Themes/img/Places/High Detail/48x48/Places - High Detail Shipping Company Office.png", 48, 48);
                         classBreak6.DefaultMarkerStyle.WebImage.ImageOffsetX = 0;
                         classBreak6.DefaultMarkerStyle.WebImage.ImageOffsetY = 0;
                         classBreak6.DefaultMarkerStyle.Popup.ContentHtml = _html1.ToHtmlString();
                         classBreak6.DefaultMarkerStyle.Popup.AutoSize = false;
                         classBreak6.DefaultMarkerStyle.Popup.IsVisible = false;
                         classBreak6.DefaultMarkerStyle.Popup.HasCloseButton = false;
                         classBreak6.DefaultMarkerStyle.Popup.Width = 200;
                         classBreak6.DefaultMarkerStyle.Popup.Height = 100;


                         MarkerClassBreak classBreak11 = new MarkerClassBreak(11);
                         classBreak11.DefaultMarkerStyle.WebImage = new ThinkGeo.MapSuite.MvcEdition.WebImage(@"/App_Themes/img/Places/High Detail/48x48/Places - High Detail Military Depot - Ammo.png", 48, 48);
                         classBreak11.DefaultMarkerStyle.WebImage.ImageOffsetX = 0;
                         classBreak11.DefaultMarkerStyle.WebImage.ImageOffsetY = 0;
                         classBreak11.DefaultMarkerStyle.Popup.ContentHtml = _html1.ToHtmlString();
                         classBreak11.DefaultMarkerStyle.Popup.AutoSize = false;
                         classBreak11.DefaultMarkerStyle.Popup.IsVisible = false;
                         classBreak11.DefaultMarkerStyle.Popup.HasCloseButton = false;
                         classBreak11.DefaultMarkerStyle.Popup.Width = 200;
                         classBreak11.DefaultMarkerStyle.Popup.Height = 100;

                         ClassBreakMarkerStyle classBreakStyle = new ClassBreakMarkerStyle("PropertyUseCode");
                         classBreakStyle.ClassBreaks.Add(classBreak0);
                         classBreakStyle.ClassBreaks.Add(classBreak1);
                         classBreakStyle.ClassBreaks.Add(classBreak2);
                         classBreakStyle.ClassBreaks.Add(classBreak3);
                         classBreakStyle.ClassBreaks.Add(classBreak4);
                         classBreakStyle.ClassBreaks.Add(classBreak5);
                         classBreakStyle.ClassBreaks.Add(classBreak6);
                         classBreakStyle.ClassBreaks.Add(classBreak11);

                         classBreakStyle.ColumnName = "PropertyUseCode";

                         zoomlevelSet.ZoomLevel01.CustomMarkerStyle = classBreakStyle;
                         zoomlevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                     })
                    .OnClientClick("clickOnMarkerA");

            })
            .DynamicOverlay(overlay =>
            {
            })
            .StaticOverlay(overlay =>
            {
            })
            .HighlightOverlay(overlay =>
            {
            })
            .CustomOverlays(overlays =>
            {
                overlays.WmsOverlay("WMS Overlay")
                                 .WebImageFormat(WebImageFormat.Jpeg)
                                 .Parameters(paras =>
                                 {
                                     paras.Add("LAYERS", "WorldMapKitRL_SPHMCT");
                                     paras.Add("STYLES", "DEFAULT");
                                     paras.Add("SRS", "EPSG:900913");
                                 })
                              .ServerUris(uris =>
                              {
                                  for (int x = 0; x <= 6; x++)
                                  {
                                      uris.Add(new Uri("GEOWMS.USAC.MMM.COM:80/WmsHandler.axd"));
                                      uris.Add(new Uri("GEOWMS.USAC.MMM.COM:81/WmsHandler.axd"));
                                      uris.Add(new Uri("GEOWMS.USAC.MMM.COM:82/WmsHandler.axd"));
                                      uris.Add(new Uri("GEOWMS.USAC.MMM.COM:83/WmsHandler.axd"));
                                      uris.Add(new Uri("GEOWMS.USAC.MMM.COM:84/WmsHandler.axd"));
                                      uris.Add(new Uri("GEOWMS.USAC.MMM.COM:85/WmsHandler.axd"));
                                  }
                              })
                              .TileType(TileType.MultipleTile).TileHeight(256).TileWidth(256)
                              .TransitionEffect(TransitionEffect.Stretching)
                              .WrapDateline(WrapDatelineMode.WrapDateline)
                              .IsBaseOverlay(true);

                InMemoryFeatureLayer CADLayer = new InMemoryFeatureLayer();
                CADLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.FromArgb(100, GeoColor.StandardColors.RoyalBlue);
                CADLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.OutlinePen.Color = GeoColor.StandardColors.Blue;
                CADLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Red), 2);
                CADLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.SymbolPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Green), 1);
                CADLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                CADLayer.DrawingMarginPercentage = 50;
                CADLayer.DrawingQuality = DrawingQuality.HighQuality;

                InMemoryFeatureLayer CADLayer_Property_Line = new InMemoryFeatureLayer();
                CADLayer_Property_Line.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.FromArgb(100, GeoColor.StandardColors.RoyalBlue);
                CADLayer_Property_Line.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.OutlinePen.Color = GeoColor.StandardColors.Blue;
                CADLayer_Property_Line.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Black), 4);
                CADLayer_Property_Line.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.SymbolPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Green), 1);
                CADLayer_Property_Line.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                CADLayer_Property_Line.DrawingMarginPercentage = 50;
                CADLayer_Property_Line.DrawingQuality = DrawingQuality.HighQuality;

                InMemoryFeatureLayer CADLayer_Buildings = new InMemoryFeatureLayer();
                CADLayer_Buildings.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.FromArgb(100, GeoColor.StandardColors.RoyalBlue);
                CADLayer_Buildings.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.OutlinePen.Color = GeoColor.StandardColors.Blue;
                CADLayer_Buildings.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Red), 2);
                CADLayer_Buildings.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.SymbolPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Green), 1);
                CADLayer_Buildings.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                CADLayer_Buildings.DrawingMarginPercentage = 50;
                CADLayer_Buildings.DrawingQuality = DrawingQuality.HighQuality;

                InMemoryFeatureLayer CADLayer_Railroads = new InMemoryFeatureLayer();
                CADLayer_Railroads.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.FromArgb(100, GeoColor.StandardColors.RoyalBlue);
                CADLayer_Railroads.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.OutlinePen.Color = GeoColor.StandardColors.Blue;
                CADLayer_Railroads.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Green), 2);
                CADLayer_Railroads.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.SymbolPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Green), 1);
                CADLayer_Railroads.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                CADLayer_Railroads.DrawingMarginPercentage = 50;
                CADLayer_Railroads.DrawingQuality = DrawingQuality.HighQuality;

                InMemoryFeatureLayer CADLayer_Roads = new InMemoryFeatureLayer();
                CADLayer_Roads.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.FromArgb(100, GeoColor.StandardColors.RoyalBlue);
                CADLayer_Roads.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.OutlinePen.Color = GeoColor.StandardColors.Blue;
                CADLayer_Roads.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Indigo), 2);
                CADLayer_Roads.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.SymbolPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Green), 1);
                CADLayer_Roads.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                CADLayer_Roads.DrawingMarginPercentage = 50;
                CADLayer_Roads.DrawingQuality = DrawingQuality.HighQuality;

                InMemoryFeatureLayer CADLayer_Text = new InMemoryFeatureLayer();
                CADLayer_Text.Open();
                CADLayer_Text.Columns.Add(new FeatureSourceColumn("TEXTSTRING", "STRING", 64));
                CADLayer_Text.Close();
                CADLayer_Text.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimpleTriangleStyle(GeoColor.StandardColors.YellowGreen, 10);
                CADLayer_Text.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("TEXTSTRING", "Arial", 10, DrawingFontStyles.Regular, GeoColor.StandardColors.Blue, 3, 3);
                CADLayer_Text.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                CADLayer_Text.DrawingMarginPercentage = 50;
                CADLayer_Text.DrawingQuality = DrawingQuality.HighQuality;

                InMemoryFeatureLayer CADLayer_Water = new InMemoryFeatureLayer();
                CADLayer_Water.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.FromArgb(100, GeoColor.StandardColors.RoyalBlue);
                CADLayer_Water.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.OutlinePen.Color = GeoColor.StandardColors.Blue;
                CADLayer_Water.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Blue), 2);
                CADLayer_Water.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.SymbolPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Green), 1);
                CADLayer_Water.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                CADLayer_Water.DrawingMarginPercentage = 50;
                CADLayer_Water.DrawingQuality = DrawingQuality.HighQuality;

                InMemoryFeatureLayer CADLayer_Wells = new InMemoryFeatureLayer();
                CADLayer_Wells.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.FromArgb(100, GeoColor.StandardColors.RoyalBlue);
                CADLayer_Wells.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.OutlinePen.Color = GeoColor.StandardColors.Blue;
                CADLayer_Wells.ZoomLevelSet.ZoomLevel01.DefaultLineStyle.OuterPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Brown), 20);
                CADLayer_Wells.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.SymbolPen = new GeoPen(GeoColor.FromArgb(255, GeoColor.StandardColors.Green), 4);
                CADLayer_Wells.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                CADLayer_Wells.DrawingMarginPercentage = 50;
                CADLayer_Wells.DrawingQuality = DrawingQuality.HighQuality;

                InMemoryFeatureLayer CADSurfaceLayer = new InMemoryFeatureLayer();
                CADSurfaceLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(40, GeoColor.StandardColors.DarkSlateBlue), GeoColor.SimpleColors.DarkBlue);
                CADSurfaceLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.City1("PageNumber");
                CADSurfaceLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

                InMemoryFeatureLayer PropertyTypeLayerOwned = new InMemoryFeatureLayer();
                InMemoryFeatureLayer PropertyTypeLayerLeased = new InMemoryFeatureLayer();

                overlays
                    .LayerOverlay("CAD").Name("CAD")
                    .WrapDateline(WrapDatelineMode.WrapDateline)
                        .Layer("CADLayer", CADLayer).Name("CADLayer").IsVisible(true).IsBaseOverlay(false)
                        .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                overlays
                    .LayerOverlay("CADSurface").Name("CADSurface")
                    .WrapDateline(WrapDatelineMode.WrapDateline)
                        .Layer("CADSurfaceLayer", CADSurfaceLayer).Name("CADSurfaceLayer").IsVisible(true).IsBaseOverlay(false)
                        .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                overlays
                      .LayerOverlay("PROPERTYLINE").Name("PROPERTYLINE")
                      .WrapDateline(WrapDatelineMode.WrapDateline)
                          .Layer("CADLayer_Property_Line", CADLayer_Property_Line).Name("CADLayer_Property_Line").IsVisible(true).IsBaseOverlay(false)
                          .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                overlays
                     .LayerOverlay("BUILDINGS").Name("BUILDINGS")
                     .WrapDateline(WrapDatelineMode.WrapDateline)
                         .Layer("CADLayer_Buildings", CADLayer_Buildings).Name("CADLayer_Buildings").IsVisible(true).IsBaseOverlay(false)
                         .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                overlays
                    .LayerOverlay("RAILROADS").Name("RAILROADS")
                    .WrapDateline(WrapDatelineMode.WrapDateline)
                        .Layer("CADLayer_Railroads", CADLayer_Railroads).Name("CADLayer_Railroads").IsVisible(true).IsBaseOverlay(false)
                        .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                overlays
                    .LayerOverlay("ROADS").Name("ROADS")
                    .WrapDateline(WrapDatelineMode.WrapDateline)
                        .Layer("CADLayer_Roads", CADLayer_Roads).Name("CADLayer_Roads").IsVisible(true).IsBaseOverlay(false)
                        .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                overlays
                    .LayerOverlay("WATER").Name("WATER")
                    .WrapDateline(WrapDatelineMode.WrapDateline)
                        .Layer("CADLayer_Water", CADLayer_Water).Name("CADLayer_Water").IsVisible(true).IsBaseOverlay(false)
                        .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                overlays
                    .LayerOverlay("WELLS").Name("WELLS")
                    .WrapDateline(WrapDatelineMode.WrapDateline)
                        .Layer("CADLayer_Wells", CADLayer_Wells).Name("CADLayer_Wells").IsVisible(true).IsBaseOverlay(false)
                        .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                overlays
                    .LayerOverlay("TEXT").Name("TEXT")
                    .WrapDateline(WrapDatelineMode.WrapDateline)
                        .Layer("CADLayer_Text", CADLayer_Text).Name("CADLayer_Text").IsVisible(true).IsBaseOverlay(false)
                        .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);


                overlays.InMemoryMarkerOverlay("EPAMARKERS").IsVisible(false).IsBaseOverlay(false).Id("EPAMARKERS").Name("EPAMARKERS")
                    .ZoomLevelSet(z =>
                    {
                        z.ZoomLevel01.DefaultMarkerStyle.Popup.ContentHtml = "[#FAC_NAME#]
<a href='[#FAC_URL#]'>EPA Fac</a>
<a href='[#LQG_URL#]'>EPA LQG</a>";
                        z.ZoomLevel01.DefaultMarkerStyle.Popup.HasCloseButton = true;
                        z.ZoomLevel01.DefaultMarkerStyle.Popup.Width = 240;
                        z.ZoomLevel01.DefaultMarkerStyle.Popup.Height = 40;
                        z.ZoomLevel01.DefaultMarkerStyle.Popup.BackgroundColor = GeoColor.StandardColors.LightBlue;
                        z.ZoomLevel01.DefaultMarkerStyle.Popup.BorderColor = GeoColor.StandardColors.Black;
                        z.ZoomLevel01.DefaultMarkerStyle.Popup.BorderWidth = 1;
                        z.ZoomLevel01.DefaultMarkerStyle.Popup.IsVisible = false;
                        z.ZoomLevel01.DefaultMarkerStyle.PopupDelay = 250;
                        z.ZoomLevel01.DefaultMarkerStyle.WebImage = new ThinkGeo.MapSuite.MvcEdition.WebImage(@"/App_Themes/img/Symbols_Hazards/32x32/hazard_generic.png", 32, 32);
                        z.ZoomLevel01.DefaultMarkerStyle.WebImage.ImageWidth = 32;
                        z.ZoomLevel01.DefaultMarkerStyle.WebImage.ImageHeight = 32;
                        z.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                    })
                    .OnClientClick("clickOnMarkerB"); 

                overlays
                    .LayerOverlay("PropertyTypeOwned").Name("PropertyTypeOwned")
                    .WrapDateline(WrapDatelineMode.WrapDateline)
                        .Layer("PropertyTypeLayerOwned", PropertyTypeLayerOwned).Name("PropertyTypeLayerOwned").IsVisible(true).IsBaseOverlay(false)
                        .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                overlays
                .LayerOverlay("PropertyTypeLeased").Name("PropertyTypeLeased")
                .WrapDateline(WrapDatelineMode.WrapDateline)
                    .Layer("PropertyTypeLayerLeased", PropertyTypeLayerLeased).Name("PropertyTypeLayerLeased").IsVisible(true).IsBaseOverlay(false)
                    .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

            })
            .OnClientClick("clickOnMap")
            .Render();
            }


Well 
  
 I found that having the two kind of markers inside the same map does not work at all…  could you confirm? 
  
 thanks 
  
 jm.

 Hello Jean-marie,


 
In “MarkerOverlay” or “InMemoryMarkerOverlay”, it is necessary to have some markers in them. In the other words, you must add some features in “MarkerOverlay” or “InMemoryMarkerOverlay”. As following codes:

       @{
            Html.ThinkGeo().Map("Map1", new System.Web.UI.WebControls.Unit(100, System.Web.UI.WebControls.UnitType.Percentage), 510)
                .MapBackground(new BackgroundLayer(new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF"))))
                .CurrentExtent(-14148507.181077, 6271924.7354557, -5114687.7715466, 3097880.0780531)
                .MapUnit(GeographyUnit.Meter)
                .MapTools(mapTools =>
                {
                     … … …
                })
                .MarkerOverlay(overlay =>
                {
                    overlay.Name("MarkerOverlay")
                     .IsBaseOverlay(false)
                     .Columns(col => col.Add(new FeatureSourceColumn("PropertyUseCode", "DOUBLE", 32)))
                         .ZoomLevelSet(zoomlevelSet =>
                         {
                           … … …
                         })
                         .Feature(new Feature((new RectangleShape(-14148507.181077, 6271924.7354557, -5114687.7715466, 3097880.0780531)).GetCenterPoint(), new System.Collections.ObjectModel.Collection<string>() { "PropertyUseCode:1" }))
                        .OnClientClick("clickOnMarkerA");

                })



Regards,
 
Gary

Hi Gary, 
  
 Of course!  in my case I am loading the markers using an Ajax call to the controller…  The question was all about having two kind of Marker overlays like         “MarkerOverlay” or “InMemoryMarkerOverlay” at the same time inside the same map…? 
  
 thanks 
  
 jm.

Hi Jean,


Yes, the “MarkerOverlay” and “InMemoryMarkerOverlay” can be displayed at the same time inside a same map, It seems like that there are two overlays (PropertyTypeOwned and PropertyTypeLeased) above “MarkerOverlay” and “InMemoryMarkerOverlay”, so it didn't work, you can move these overlays to beneath of “MarkerOverlay” and “InMemoryMarkerOverlay”. Please try the following code,



                    overlays
                        .LayerOverlay("PropertyTypeOwned").Name("PropertyTypeOwned")
                        .WrapDateline(WrapDatelineMode.WrapDateline)
                            .Layer("PropertyTypeLayerOwned", PropertyTypeLayerOwned).Name("PropertyTypeLayerOwned").IsVisible(true).IsBaseOverlay(false)
                            .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                    overlays
                    .LayerOverlay("PropertyTypeLeased").Name("PropertyTypeLeased")
                    .WrapDateline(WrapDatelineMode.WrapDateline)
                        .Layer("PropertyTypeLayerLeased", PropertyTypeLayerLeased).Name("PropertyTypeLayerLeased").IsVisible(true).IsBaseOverlay(false)
                        .TileType(TileType.SingleTile).TransitionEffect(TransitionEffect.Stretching);

                    overlays.InMemoryMarkerOverlay("EPAMARKERS").IsVisible(true).IsBaseOverlay(false).Id("EPAMARKERS").Name("EPAMARKERS")
                        .ZoomLevelSet(z =>
                        {
                            z.ZoomLevel01.DefaultMarkerStyle.Popup.ContentHtml = "[#FAC_NAME#]
<a href='[#FAC_URL#]'>EPA Fac</a>
<a href='[#LQG_URL#]'>EPA LQG</a>";
                            z.ZoomLevel01.DefaultMarkerStyle.Popup.HasCloseButton = true;
                            z.ZoomLevel01.DefaultMarkerStyle.Popup.Width = 240;
                            z.ZoomLevel01.DefaultMarkerStyle.Popup.Height = 40;
                            z.ZoomLevel01.DefaultMarkerStyle.Popup.BackgroundColor = GeoColor.StandardColors.LightBlue;
                            z.ZoomLevel01.DefaultMarkerStyle.Popup.BorderColor = GeoColor.StandardColors.Black;
                            z.ZoomLevel01.DefaultMarkerStyle.Popup.BorderWidth = 1;
                            z.ZoomLevel01.DefaultMarkerStyle.Popup.IsVisible = false;
                            z.ZoomLevel01.DefaultMarkerStyle.PopupDelay = 250;
                            z.ZoomLevel01.DefaultMarkerStyle.WebImage = new ThinkGeo.MapSuite.MvcEdition.WebImage(@"/Content/images/city.png", 32, 32);
                            z.ZoomLevel01.DefaultMarkerStyle.WebImage.ImageWidth = 32;
                            z.ZoomLevel01.DefaultMarkerStyle.WebImage.ImageHeight = 32;
                            z.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
                        })
                        .Feature(new Feature((new RectangleShape(-14148507.181077, 6271924.7354557, -5114687.7715466, 3097880.0780531)).GetCenterPoint(), new System.Collections.ObjectModel.Collection<string>() { "PropertyUseCode:1" }))
                        .OnClientClick("clickOnMarkerB");


Regards,


Edgar