Guest User

Untitled

a guest
Jul 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. function init() {
  2. var map = new esri.Map("map");
  3.  
  4. var duration = 15; //minimum 15 mins, maximum 480 (8 hrs) mins
  5. var environment = "staging"; //tiles won't have a watermark but they'll deduct from account
  6.  
  7. //TODO: Replace with URL to your own "Get Virtual Earth Token" page
  8. var tokenUrl = "/common/vetokenhandler/vetoken.cfm";
  9.  
  10. //Creates the Virtual Earth layer to add to the map
  11. veTileLayer = new esri.virtualearth.VETiledLayer({
  12. tokenUrl: tokenUrl,
  13. tokenDuration: duration,
  14. environment: environment,
  15. mapStyle: esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL
  16. });
  17.  
  18. map.addLayer(veTileLayer);
  19. }
Add Comment
Please, Sign In to add comment