Hi
I currently have tooltips displaying on my top layer but when I drill down one layer, the tooltips for the second layer don't display.
Here is my map code:
@(Html.EJ().Map("maps") .ZoomSettings(zm => { zm.EnableZoomOnSelection(true); }) .ClientSideEvents(eve => { eve.OnRenderComplete("onLoad"); eve.ShapeSelected("OnDrilled"); }) .Layers(lr => { lr.LayerType(LayerType.Geometry) .EnableMouseHover(true) .ShapeSettings(sp => { sp.Stroke("black") .Fill("#C3E6ED") .HighlightColor("#63B7B7") .SelectionColor("#207BB2") .StrokeThickness(0.5); }) .ShapeData(districtMapData).Add(); lr.LayerType(LayerType.Geometry) .EnableSelection(true) .ShapeDataPath("name") .EnableMouseHover(true) .ShapePropertyPath("PR_NAME") .ShowMapItems(false) .DataSource(provinceDatasource) .ShapeSettings(sp => { sp.Fill("#C3E6ED") .StrokeThickness(0.5) .AutoFill(false) .Stroke("white") .HighlightColor("#63B7B7") .HighlightStroke("white") .ValuePath("name") .ColorValuePath("name") .EqualColorMappings(cm => { cm.Value("Gauteng").Color("#D84444").Add(); cm.Value("Obama").Color("#316DB5").Add(); }) ; }) .ShapeData(provincialMapData) .ShowTooltip(true) .TooltipTemplate("template") .Add(); lr.LayerType(LayerType.Geometry) .EnableSelection(true) .EnableMouseHover(true) .ShapeDataPath("name") .ShapePropertyPath("Q11_DC_NAM") .DataSource(districtDatasource) .ShowMapItems(false) .ShapeSettings(sp => { sp.Stroke("black") .Fill("#C3E6ED") .AutoFill(false) .HighlightColor("#63B7B7") .SelectionColor("#207BB2") .StrokeThickness(0.5) .ValuePath("name"); }) .ShapeData(districtMapData) .ShowTooltip(true) .TooltipTemplate("template") .Add(); }) )
function OnDrilled(event) {
if (event.model.baseMapIndex === 1) {
var mapObj = $("#maps").data("ejMap");
mapObj.model.enableAnimation = true;
mapObj.option("baseMapIndex", 0);
var button = document.getElementById("button1");
$(button).css('background-color', '#0F77B7');
$(button).fadeIn(500);
var title = document.getElementById("title");
$(title).css("display", "none");
}
}
Any help will be appreciated.
Regards,
Matthias
@(Html.EJ().Map("maps") .ZoomSettings(zm => { zm.EnableZoomOnSelection(true); }) .ClientSideEvents(eve => { eve.OnRenderComplete("onLoad"); eve.ShapeSelected("OnDrilled"); }) .Layers(lr => { lr.LayerType(LayerType.Geometry) .EnableSelection(true) .EnableMouseHover(true) .ShapeDataPath("name") .ShapePropertyPath("Q11_DC_NAM") .DataSource(districtDatasource) .ShowMapItems(false) .ShapeSettings(sp => { sp.Stroke("black") .Fill("#C3E6ED") .AutoFill(false) .HighlightColor("#63B7B7") .SelectionColor("#207BB2") .StrokeThickness(0.5) .ValuePath("name"); }) .ShapeData(districtMapData) .ShowTooltip(true) .TooltipTemplate("template") .Add(); lr.LayerType(LayerType.Geometry) .EnableSelection(true) .ShapeDataPath("name") .EnableMouseHover(true) .ShapePropertyPath("PR_NAME") .ShowMapItems(false) .DataSource(provinceDatasource) .ShapeSettings(sp => { sp.Fill("#C3E6ED") .StrokeThickness(0.5) .AutoFill(false) .Stroke("white") .HighlightColor("#63B7B7") .HighlightStroke("white") .ValuePath("name") .ColorValuePath("name") .EqualColorMappings(cm => { cm.Value("Gauteng").Color("#D84444").Add(); cm.Value("Obama").Color("#316DB5").Add(); }) ; }) .ShapeData(provincialMapData) .ShowTooltip(true) .TooltipTemplate("template") .Add(); }) )