Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.



  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
  <link rel="stylesheet" href="">

    #Panel {
      padding: 30px;
      background-color: rgba(255, 255, 255, 0.8);

    .esri-button {
      margin: 2px;

    #viewDiv {
      padding: 0;
      margin: 0;
      height: 100%;
      width: 100%;

  <!-- <link rel="stylesheet" href=""> -->
  <script src=""></script>

    ], function (Map, MapView, FeatureLayer,Expand,dom, on,Query,GraphicsLayer,Feature) {
      var pointServiceLayerView;
      var pointService = new FeatureLayer({
        url: "",
        popupTemplate: {
           content: "{name1} in {city} has {OBJECTID}"
        outFields: ["OBJECTID", "name1", "city"]
      var map = new Map({
        basemap: "gray",
        layers: [pointService]

      var view = new MapView({
        container: "viewDiv",
        map: map,
        center: [-102.370576, 40.172530],
        zoom: 5
        pointServiceLayerView = layerView;
        document.getElementById('input').addEventListener('change', function (e) {
          var input =;
          var gushHelka;                 
          if (input) {
            gushHelka = "OBJECTID"
          else {
          gushHelka = "1",
          input = "1"      
          var query = pointService.createQuery();     
          query.returnGeometry = true;
          query.where = gushHelka + " = " + input// input; 
          pointServiceLayerView.queryFeatures(query).then(succ, fail);                 });
        view.ui.add("Panel", "top-right");
      ///edit the layer and zoom in
      function succ(featureSet) {
        var selectedGraphic = featureSet.features[0];
        var opts = {
          duration: 2000  // Duration of animation will be 5 seconds

        // go to point at LOD 15 with custom duration
          target: [selectedGraphic],
          zoom: 15
        }, opts);{
           features: [selectedGraphic], // location of the click on the view
           fetchFeatures: true // display the content for the selected feature if a popupTemplate is defined.
      function fail(error) {
        console.error('An error ocurred in the query: ', error);
  <div id="viewDiv"></div>
  <div id="Panel" class="esri-widget">
          <h2>גוש חלקה</h2>
    <input type="text" placeholder="חפש לפי גוש-חלקה" id="input" class="esri-input" >