<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: marker hide behind layer added on basemap in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1036452#M72050</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Can anyone help, i m looking for the solution but couldn't find any&lt;/P&gt;</description>
    <pubDate>Mon, 15 Mar 2021 03:35:23 GMT</pubDate>
    <dc:creator>rsharma</dc:creator>
    <dc:date>2021-03-15T03:35:23Z</dc:date>
    <item>
      <title>marker hide behind layer added on basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1035385#M72013</link>
      <description>&lt;P&gt;hi i am trying to show markers above webmap combined with a layer of nz boundaries, my markers hide behind this layer, when i use this webmap.&lt;/P&gt;&lt;P&gt;i have used gray basemap with a layer added on it in arcgis online webmap.&lt;/P&gt;&lt;P&gt;then i called this webmap.&lt;/P&gt;&lt;P&gt;i don't know how to show these markers above this webmap.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-03-11 at 4.58.58 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8201iFB889571C2CDB86A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2021-03-11 at 4.58.58 PM.png" alt="Screenshot 2021-03-11 at 4.58.58 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-03-11 at 4.35.40 PM.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/8200i88D83C44AF8F622B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2021-03-11 at 4.35.40 PM.png" alt="Screenshot 2021-03-11 at 4.35.40 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; require(["esri/core/watchUtils","esri/views/MapView", "esri/WebMap","esri/Graphic","dojo/dom-construct","esri/widgets/Popup","esri/geometry/Point","esri/layers/FeatureLayer", "esri/identity/IdentityManager", "esri/layers/GraphicsLayer",  "esri/geometry/support/webMercatorUtils"], 
        
                function(watchUtils,MapView, WebMap,Graphic,domConstruct,Popup,Point,FeatureLayer, IdentityManager,  GraphicsLayer, webMercatorUtils) {   
                    webmap = WebMap.fromJSON(&amp;lt;?=$basemap_string1 ?&amp;gt;);

                /////Start view part
                var view = new MapView({
                  map: webmap,
                  container: "booking_map",
                  center: [&amp;lt;?=$map_data_by_country1['long']?&amp;gt;,&amp;lt;?=$map_data_by_country1['lat']?&amp;gt;], // longitude, latitude
                  zoom:&amp;lt;?=$map_data_by_country1['zoom']-1?&amp;gt;
                  
                }); 
                
                ///Set min/max zoom       
                view.constraints = {
                    minZoom: &amp;lt;?=$map_data_by_country1['zoom']?&amp;gt;,
                    maxZoom: &amp;lt;?=$map_data_by_country1['zoom']+3?&amp;gt;
                };
              
                   /***Create Instance of graphics layer***/
                var graphicsLayer = new GraphicsLayer();
               
               /***Add graphics layer to WebMap***/
                webmap.addMany([ graphicsLayer]);  

                  /************************************************************
              *When view is ready
              ************************************************************/
                view.when(function() {

                 var getmarkerb = &amp;lt;?php echo json_encode($bcoordinate); ?&amp;gt;;
                
                  addMarker(getmarkerb);
                });//End view.when
              /************************************************************
                Add marker on map MarkerGL coming from db 
              ************************************************************/
              var addMarker=function(getmarker){
              var index = 0;
              getmarker.forEach(function(marker){ 
             // settings.accommodation_name[index]=(settings.gettype[index]!="Accomodation")?"":settings.accommodation_name[index];
              var markerpt = new Point({
                          longitude: marker.x,
                          latitude: marker.y,
                          spatialReference: { wkid: 4326 }
                      });
              var changedSymbol=changedsymbol('Access Point');
              var markergra = new Graphic({
                          geometry:  webMercatorUtils.geographicToWebMercator(markerpt),
                          symbol: changedSymbol,
                          attributes: {
                                      newDevelopment: "new marker",
                                      state: "new"
                                    }
                });
              
                index++;
                graphicsLayer.add(markergra);
              });//End loop
            }//End addMarker
             /************************************************************
        Create symbol for marker 
      ************************************************************/
       var changedsymbol=function(markertype){
          var newurl=changedMarkerSymbol(markertype);
          const changedSymbol = {
            type: "picture-marker",
            url: newurl,
            width: "25px",
            height: "25px"
          };
          return changedSymbol;
        }
      /************************************************************
        send url of marker image to calling function
      ************************************************************/
        var changedMarkerSymbol=function(markertype){ 
          switch(markertype){
            case "Access Point":
            return "&amp;lt;?=HHQL_PLUGIN_URL?&amp;gt;public/images/accesspointnew1.png";
          }
        }//End changedMarkerSymbol
      });///end WebMap&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 11:33:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1035385#M72013</guid>
      <dc:creator>rsharma</dc:creator>
      <dc:date>2021-03-11T11:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: marker hide behind layer added on basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1036452#M72050</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Can anyone help, i m looking for the solution but couldn't find any&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 03:35:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1036452#M72050</guid>
      <dc:creator>rsharma</dc:creator>
      <dc:date>2021-03-15T03:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: marker hide behind layer added on basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1037298#M72085</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;thy to add your graphics layer and ser its index to 0.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#addMany" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#addMany&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;webmap.addMany([ graphicsLayer], 0); &lt;/LI-CODE&gt;&lt;P&gt;Does it help?&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 20:07:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1037298#M72085</guid>
      <dc:creator>nita14</dc:creator>
      <dc:date>2021-03-16T20:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: marker hide behind layer added on basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1037476#M72089</link>
      <description>&lt;P&gt;No sorry&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/16929"&gt;@nita14&lt;/a&gt;&amp;nbsp;it doesn't work, the markers load first and then the layer load on it, and hide. the markers&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 03:39:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1037476#M72089</guid>
      <dc:creator>rsharma</dc:creator>
      <dc:date>2021-03-17T03:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: marker hide behind layer added on basemap</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1037519#M72092</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Just try to do not use webmap. Construct the layers manually by url and add them to the map.&lt;/P&gt;&lt;P&gt;Just like in this example:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=layers-featurelayer" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=layers-featurelayer&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Mar 2021 08:37:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/marker-hide-behind-layer-added-on-basemap/m-p/1037519#M72092</guid>
      <dc:creator>nita14</dc:creator>
      <dc:date>2021-03-17T08:37:49Z</dc:date>
    </item>
  </channel>
</rss>

