title: openlayer3 vector layer text display repeated
body: <p><a href="https://i.stack.imgur.com/GXNwv.png" rel="nofollow noreferrer">This is a picture which shows the number of my shops at this place, but why on my map the number 90 is repeated?. I am using a styleFunc to determine the color, the cold is something like:</a></p>
  
  <pre><code> function styleFunction(feature) {
              var destCount = feature.get("destCount");
              var originCount = feature.get("originCount");
              if (typeof originCount === "undefined") {
                  originCount = 0;
              }
              if (typeof destCount === "undefined") {
                  destCount = 0;
              }
              totalPointsCount = destCount + originCount;
              totalPointsCount = totalPointsCount.toString();
              return getStyle(feature.getProperties().type);
          }
  
  function styleFunction(feature) {
              var destCount = feature.get("destCount");
              var originCount = feature.get("originCount");
              if (typeof originCount === "undefined") {
                  originCount = 0;
              }
              if (typeof destCount === "undefined") {
                  destCount = 0;
              }
              totalPointsCount = destCount + originCount;
              totalPointsCount = totalPointsCount.toString();
              return getStyle(feature.getProperties().type);
          }
  </code></pre>
  
  <p>Code for creating the baseLayer is:</p>
  
  <pre><code>fetch('data/xml/service-meta-data.xml').then(function (response) {
          return response.text();
      }).then(function (text) {
          var result = parser.read(text);
          var options = ol.source.WMTS.optionsFromCapabilities(result, {
              layer: 'China',
              matrixSet: 'EPSG:3857'
          });
          var baseLayer = new ol.layer.Tile({
              opacity: 1,
              source: new ol.source.WMTS(options)
          });
          var map = new ol.Map({
              layers: [
                  baseLayer,
                  vectorLayer
              ],
              overlays: [infoOverlay],
              target: 'map',
              view: view
          });
       })
  </code></pre>
  
  <p>You can ignore all the data processing, and focus on the stylefunc, can anyone tell me why the number is repeated? Many thxs</p>