Select to view content in your preferred language

Gray-Vector Basemap Not Showing Up

1640
8
04-25-2017 09:04 AM
LloydBronn
Occasional Contributor II

I'm labeling a feature layer, and the labels were showing up underneath the light gray basemap reference layer. I tried switching my basemap from gray to gray-vector and everything disappeared. I have esriBasemaps in my requires and function sections.

map = new Map("map", {
          basemap: "gray-vector",
          center: [0, 45],
          zoom: 2,
            maxZoom: 10,
            minZoom: 2,
          infoWindow: popup,
            showLabels: true
        });‍‍‍‍‍‍‍‍‍
0 Kudos
8 Replies
KellyHutchins
Esri Frequent Contributor

Ran a quick test and this code works for me. 

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <title>Simple Map</title>
    <link rel="stylesheet" href="https://js.arcgis.com/3.20/esri/css/esri.css">
    <style>
      html, body, #map {
        height: 100%;
        margin: 0;
        padding: 0;
      }
    </style>
    <script src="https://js.arcgis.com/3.20/"></script>
    <script>
      var map;

      require(["esri/map", "dojo/domReady!"], function(Map) {
        map = new Map("map", {
          basemap: "gray-vector",  //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
          center: [0,45], // longitude, latitude
          zoom:2,
          maxZoom:10,
          minZoom:2,
          showLabels:true
        });
      });
    </script>
  </head>

  <body>
    <div id="map"></div>
  </body>
</html>
LloydBronn
Occasional Contributor II

Strange. It doesn't work in Chrome on the Windows 10 server machine I'm working on, but it works on Chrome on my Mac.

0 Kudos
KellyHutchins
Esri Frequent Contributor

Any error messages in the Chrome dev tools? 

0 Kudos
LloydBronn
Occasional Contributor II

I get this error in the console. js.arcgis.com/3.20/init.js:594 Uncaught TypeError: Cannot read property '_surface' of undefined

It also shows up at zoom 3, even though the zoom is set to 2. Bugs?

0 Kudos
KellyHutchins
Esri Frequent Contributor

 I tested on my Windows machine and can't reproduce although its Windows 8.1. Which version of Chrome are you using? Is it up to date? 

0 Kudos
LloydBronn
Occasional Contributor II

Just updated Chrome on Windows 10 to Version 58.0.3029.81. Still not working. It works on Chrome for Windows 7 and Mac OS El Capitan. 

0 Kudos
KellyHutchins
Esri Frequent Contributor

We tested on two Windows 10 machines with Chrome 57 and Chrome 58 and couldn't reproduce. You may want to submit a support ticket to see if they can  help you troubleshoot the issue. 

0 Kudos
LloydBronn
Occasional Contributor II

OK, Thanks.

0 Kudos