Available in the Full Version
Map - Bing Maps
This sample demonstrates how to use imagery tiles from Bing Maps as a background content in the igMap control.
This sample uses CTP (Community Technical Preview) features. The API and behavior may change when these features are released with full support.
This sample is designed for a larger screen size.
On mobile, try rotating your screen, view full size, or email to another device.
This sample demonstrates how to use imagery tiles from Bing Maps as a background content in the igMap control.
Code View
Copy to Clipboard
<!DOCTYPE html> <html> <head> <title></title> <!-- Ignite UI for jQuery Required Combined CSS Files --> <link href="http://cdn-na.infragistics.com/igniteui/2024.1/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet" /> <link href="http://cdn-na.infragistics.com/igniteui/2024.1/latest/css/structure/infragistics.css" rel="stylesheet" /> <script src="http://ajax.aspnetcdn.com/ajax/modernizr/modernizr-2.8.3.js"></script> <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> <script src="http://code.jquery.com/ui/1.11.1/jquery-ui.min.js"></script> <!-- Ignite UI for jQuery Required Combined JavaScript Files --> <script src="http://cdn-na.infragistics.com/igniteui/2024.1/latest/js/infragistics.core.js"></script> <script src="http://cdn-na.infragistics.com/igniteui/2024.1/latest/js/infragistics.dv.js"></script> <style> #tooltipTable { font-family: Verdana, Arial, Helvetica, sans-serif; width: 100%; border-collapse: collapse; } #tooltipTable td, #tooltipTable th { font-size: 9px; border: 1px solid #269bc9; padding: 3px 7px 2px 7px; } #tooltipTable th { font-weight: bold; font-size: 11px; text-align: left; padding-top: 5px; padding-bottom: 4px; background-color: #269bc9; color: #ffffff; } </style> </head> <body> <!-- Target element for the map --> <div id="map"></div> <script src="/js/map-helper.js" type="text/javascript" ></script> <script src="/data-files/world-cities.js"></script> <script> $(function () { $("#map").igMap({ width: "700px", height: "500px", windowRect: { left: 0.1, top: 0.1, height: 0.7, width: 0.7 }, // specifies imagery tiles from BingMaps backgroundContent: { type: "bing", key: mapHelper.bingData(), imagerySet: "AerialWithLabels", // alternative: "Road" | "Aerial", bingUrl: "https://dev.virtualearth.net/REST/v1/Imagery/Metadata/" }, series: [{ type: "geographicSymbol", name: "worldCities", dataSource: data, latitudeMemberPath: "Latitude", longitudeMemberPath: "Longitude", markerType: "automatic", markerCollisionAvoidance: "fade", markerOutline: "#269bc9", markerBrush: "#269bc9", showTooltip: true, tooltipTemplate: "tooltipTemplate" }], }); }); </script> <script id="tooltipTemplate" type="text/x-jquery-tmpl"> <table id="tooltipTable" > <tr><th class="tooltipHeading" colspan="2">${item.Name}, ${item.Country}</th></tr> <tr> <td>Latitude:</td> <td>${item.Latitude}</td> </tr> <tr> <td>Longitude:</td> <td>${item.Longitude}</td> </tr> </table> </script> </body> </html>
var data = [ { Name: "Warsaw", Country: "Poland", Latitude: 52.21, Longitude: 21 }, { Name: "London", Country: "England", Latitude: 51.50, Longitude: 0.12 }, { Name: "Berlin", Country: "Germany", Latitude: 52.50, Longitude: 13.33 }, { Name: "Moscow", Country: "Russia", Latitude: 55.75, Longitude: 37.51 }, { Name: "Sydney", Country: "Australia", Latitude: -33.83, Longitude: 151.2 }, { Name: "Tokyo", Country: "Japan", Latitude: 35.6895, Longitude: 139.6917 }, { Name: "Seoul", Country: "South Korea", Latitude: 37.5665, Longitude: 126.9780 }, { Name: "Delhi", Country: "India", Latitude: 28.6353, Longitude: 77.2250 }, { Name: "Mumbai", Country: "India", Latitude: 19.0177, Longitude: 72.8562 }, { Name: "Manila", Country: "Philippines", Latitude: 14.6010, Longitude: 120.9762 }, { Name: "Shanghai", Country: "China", Latitude: 31.2244, Longitude: 121.4759 }, { Name: "Mexico City", Country: "Mexico", Latitude: 19.4270, Longitude: -99.1276 }, { Name: "New York", Country: "United States", Latitude: 40.7561, Longitude: -73.9870 }, { Name: "Sao Paulo", Country: "Brasil", Latitude: -23.5489, Longitude: -46.6388 }, { Name: "Los Angeles", Country: "United States", Latitude: 34.0522, Longitude: -118.2434 }, { Name: "Sofia", Country: "Bulgaria", Latitude: 42.697845, Longitude: 23.321925 } ];