|
[Map.aspx]
<ej:Map ID="drillDown" runat="server" Background="White" OnClientZoomedIn="zoomedIn" OnClientMarkerSelected="markerSelected" OnClientZoomedOut="zoomedOut">
<Layers>
<ShapeSettings Fill="#C3E6ED" StrokeThickness = "0.5" Stroke = "white" HighlightColor = "#63B7B7" HighlightStroke = "white" ValuePath = "name"/>
<SubLayers>
<ej:ShapeLayer ShapeDataPath = "country" ShapePropertyPath = "name" MapItemsTemplate = "labeltemplate" ShowMapItems = "true" >
<BubbleSettings ShowBubble = "true" ValuePath = "Sales" MinValue = "20" MaxValue = "30" Color = "#379F64"></BubbleSettings>
<ShapeSettings Fill = "#9FD0D3" StrokeThickness = "0.2" Stroke = "white" HighlightColor = "#63B7B7"></ShapeSettings>
</ej:ShapeLayer>
</SubLayers>
</ej:ShapeLayer>
</Layers>
</ej:Map>
[JS]
$(window).on('mousewheel', function (event) {
var map = $("#MainContent_drillDown").data("ejMap");
window.markerSource = [];
if (window.zoomedLevel == 1)
map.model.layers[0].markers = initalDataSource;
else
map.model.layers[0].markers = dataSource;
map.model.layers[0].markerTemplate = "template";
$("#MainContent_drillDown").ejMap("refresh");
if ((window.latitude && window.longitude) !== undefined)
$("#MainContent_drillDown").ejMap("navigateTo", window.latitude, window.longitude, window.zoomedLevel);
});
|