Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
  <meta name="description" content="[Define custom Popup actions - 4.2]">
  <!-- 
  ArcGIS API for JavaScript, https://js.arcgis.com
  For more information about the popup-actions sample, read the original sample description at developers.arcgis.com.
  https://developers.arcgis.com/javascript/latest/popup-actions/index.html  
  -->
  <title>Define custom Popup actions - 4.2</title>
  <style>
    html,
    body,
    #viewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;
    }
  </style>
  <link rel="stylesheet" href="https://js.arcgis.com/4.2/esri/css/main.css">
  <script src="https://js.arcgis.com/4.2/"></script>
  <script>
    require([
      "esri/Map",
      "esri/views/MapView",
      "esri/geometry/Point",
      "dojo/domReady!"
    ], function(
      Map,
      MapView,
      Point
    ) {
      // Create the Map
      var map = new Map({
        basemap: "topo"
      });
      // Create the MapView
      var view = new MapView({
        container: "viewDiv",
        map: map,
        center: [-117, 34],
        zoom: 9
      });
      view.then(function() {
        var peak = new Point({
          latitude: 34.09916,
          longitude: -116.82485
        });
        view.popup.open({
          location: peak,
          title: "San Gorgonio Mountain",
          content: "Tallest peak in Southern California"
        });
      });
    });
  </script>
</head>
<body>
  <div id="viewDiv"></div>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
bsvenssonpro
0viewers