|
[Maps.ASPX]
Maps.ASPX]
<ej:Map ID="dataMarker" OnClientMarkerSelected="markerSelected" OnClientZoomedOut="zoomedOut" >
</ej:Map>
[JS]
$(window).on('mouseup', function (event) {
if (!$(event.target).hasClass("e-mapSelectedShape mapShape")) {
if (event.target.className == "e-icon1 e-map-home")
window.count = 1;
else if (event.target.className == "e-icon1 nav-inc-Vert e-innerIncrement")
window.count++;
else if (event.target.className == "e-icon1 nav-dec-Vert e-innerDecrement")
window.count--;
var map = $("#dataMarker").data("ejMap");
if (window.count > 1) {
markerCount = map.model.layers[0].markers.length + 1;
for (i = 0; i < markerCount ; i++) {
window.markerSource[i] = [];
window.markerSource[i] = (dataSource[i]);
}
map.model.layers[0].markers = window.markerSource;
}
$("#dataMarker").ejMap("refresh")
window.markerSource = [];
if ((window.latitude && window.longitude ) !== undefined)
$("#dataMarker").ejMap("navigateTo", window.latitude, window.longitude, window.count);
}
});
|
|
[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);
});
|