<?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: Show polyline along with roads in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-polyline-along-with-roads/m-p/1097091#M74630</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/509178"&gt;@Mohammedaz&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;to be able to construct a line feature that exactly follows the street, you will need to get your hands on the streets data, query the geometry, and use the geometry values to build your graphics/features.&lt;BR /&gt;The streets that you can see on the map are from a basemap, which is just an image, the basemap won't provide you with a vector layer for streets.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Sep 2021 06:39:58 GMT</pubDate>
    <dc:creator>IhabHassan</dc:creator>
    <dc:date>2021-09-10T06:39:58Z</dc:date>
    <item>
      <title>Show polyline along with roads</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-polyline-along-with-roads/m-p/1096933#M74629</link>
      <description>&lt;P&gt;Hi Guys, I am a newbie to arcGIS so please excuse my mistakes.&lt;BR /&gt;I am fetching lat/longs from database using .Net and returning JSON array of lat/longs along with other data.&amp;nbsp;I am able to draw points and polyline on map.&lt;BR /&gt;&lt;BR /&gt;My requirement is to draw the line in consideration with&lt;BR /&gt;road / street network &lt;EM&gt;[Ex: as Route is displayed on street]&lt;/EM&gt; instead of being diagonal it should follow the street.&lt;/P&gt;&lt;P&gt;Many Thanks in advance !!!!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Initial code snippet for reference.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;BR /&gt;&amp;lt;html&amp;gt;&lt;BR /&gt;&amp;lt;head&amp;gt;&lt;BR /&gt;&amp;lt;meta charset="utf-8" /&amp;gt;&lt;BR /&gt;&amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" /&amp;gt;&lt;BR /&gt;&amp;lt;title&amp;gt;&lt;BR /&gt;ArcGIS API for JavaScript Tutorials: Display a map&lt;BR /&gt;&amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;style&amp;gt;&lt;BR /&gt;html,&lt;BR /&gt;body,&lt;BR /&gt;#viewDiv {&lt;BR /&gt;height: 100%;&lt;BR /&gt;width: 100%;&lt;BR /&gt;margin: 0;&lt;BR /&gt;padding: 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#infoDiv {&lt;BR /&gt;padding: 6px;&lt;BR /&gt;width: 370px;&lt;BR /&gt;height: 97%;&lt;BR /&gt;position: absolute;&lt;BR /&gt;top: 10px;&lt;BR /&gt;right: 10px;&lt;BR /&gt;--calcite-ui-brand: #71C96E;&lt;BR /&gt;--calcite-ui-brand-hover: #67B564;&lt;BR /&gt;}&lt;BR /&gt;&amp;lt;/style&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link rel="stylesheet" href="&lt;A href="https://js.arcgis.com/4.20/esri/themes/light/main.css" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.20/esri/themes/light/main.css&lt;/A&gt;" /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;link rel="stylesheet" type="text/css" href="jquery.datetimepicker.css" /&amp;gt;&lt;BR /&gt;&amp;lt;script type="module"&lt;BR /&gt;src="&lt;A href="https://js.arcgis.com/calcite-components/1.0.0-beta.56/calcite.esm.js" target="_blank" rel="noopener"&gt;https://js.arcgis.com/calcite-components/1.0.0-beta.56/calcite.esm.js&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="https://js.arcgis.com/calcite-components/1.0.0-beta.56/calcite.js" target="_blank" rel="noopener"&gt;https://js.arcgis.com/calcite-components/1.0.0-beta.56/calcite.js&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&amp;lt;link rel="stylesheet"&lt;BR /&gt;type="text/css"&lt;BR /&gt;href="&lt;A href="https://js.arcgis.com/calcite-components/1.0.0-beta.56/calcite.css" target="_blank" rel="noopener"&gt;https://js.arcgis.com/calcite-components/1.0.0-beta.56/calcite.css&lt;/A&gt;" /&amp;gt;&lt;BR /&gt;&amp;lt;link rel="stylesheet"&lt;BR /&gt;href="&lt;A href="https://js.arcgis.com/4.20/esri/themes/dark/main.css" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.20/esri/themes/dark/main.css&lt;/A&gt;" /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script src="&lt;A href="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" target="_blank" rel="noopener"&gt;http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;script src="&lt;A href="https://js.arcgis.com/4.20/" target="_blank" rel="noopener"&gt;https://js.arcgis.com/4.20/&lt;/A&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;var demoBaseMap;&lt;/P&gt;&lt;P&gt;require(["esri/config", "esri/Map", "esri/views/MapView",&lt;BR /&gt;"esri/geometry/SpatialReference",&lt;BR /&gt;"esri/Graphic",&lt;BR /&gt;"esri/layers/GraphicsLayer",&lt;BR /&gt;//"esri/layers/FeatureLayer",&lt;BR /&gt;"esri/geometry/Point",&lt;BR /&gt;"dojo/domReady!",&lt;/P&gt;&lt;P&gt;], function (esriConfig, Map, MapView,&lt;BR /&gt;SpatialReference,&lt;BR /&gt;Graphic, GraphicsLayer,&lt;BR /&gt;//FeatureLayer,&lt;BR /&gt;Point) {&lt;/P&gt;&lt;P&gt;esriConfig.apiKey = "";&lt;/P&gt;&lt;P&gt;demoBaseMap = new Map({&lt;BR /&gt;basemap: "streets-navigation-vector"&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;const view = new MapView({&lt;BR /&gt;map: demoBaseMap,&lt;BR /&gt;center: [46.763561, 24.709821],&lt;/P&gt;&lt;P&gt;zoom: 13, // Zoom level&lt;BR /&gt;container: "viewDiv", // Div element&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;var simpleMarkerSymbol = {&lt;BR /&gt;type: "simple-marker",&lt;BR /&gt;color: [46, 204, 113], // Green&lt;BR /&gt;outline: {&lt;BR /&gt;color: [255, 255, 255], // white&lt;BR /&gt;width: 1&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var graphicsLayer = new GraphicsLayer();&lt;BR /&gt;demoBaseMap.add(graphicsLayer);&lt;/P&gt;&lt;P&gt;function DrawPolyline() {&lt;/P&gt;&lt;P&gt;var pointsArray = new Array();&lt;BR /&gt;var serverResponseLength = 3; // will be getting array of Lat/Long from server&lt;/P&gt;&lt;P&gt;for (i = 0; i &amp;lt; serverResponseLength; i++) {&lt;BR /&gt;var Point;&lt;BR /&gt;if (i == 0) {&lt;BR /&gt;Point = {&lt;BR /&gt;type: "point",&lt;BR /&gt;longitude: 46.680000, //temporarily hardcoded&lt;BR /&gt;latitude: 24.834080&lt;BR /&gt;};&lt;BR /&gt;pointsArray.push(new Array(Point.longitude, Point.latitude));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;if (i == 1) {&lt;BR /&gt;Point = {&lt;BR /&gt;type: "point",&lt;BR /&gt;longitude: 46.680860,&lt;BR /&gt;latitude: 24.834690&lt;BR /&gt;};&lt;BR /&gt;pointsArray.push(new Array(Point.longitude, Point.latitude));&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;var pointGraphic = new Graphic({&lt;BR /&gt;geometry: Point,&lt;BR /&gt;symbol: simpleMarkerSymbol&lt;BR /&gt;});&lt;/P&gt;&lt;P&gt;graphicsLayer.add(pointGraphic);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;const polyline = {&lt;BR /&gt;type: "polyline",&lt;BR /&gt;paths: pointsArray&lt;BR /&gt;};&lt;BR /&gt;const simpleLineSymbol = {&lt;BR /&gt;type: "simple-line",&lt;BR /&gt;color: [226, 119, 40], // Orange&lt;BR /&gt;width: 2&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;const polylineGraphic = new Graphic({&lt;BR /&gt;geometry: polyline,&lt;BR /&gt;symbol: simpleLineSymbol&lt;BR /&gt;});&lt;BR /&gt;graphicsLayer.add(polylineGraphic);&lt;BR /&gt;view.goTo(polylineGraphic.geometry);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;document.getElementById('btn-Query').onclick = function () {&lt;BR /&gt;DrawPolyline();&lt;BR /&gt;};&lt;BR /&gt;});&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/head&amp;gt;&lt;BR /&gt;&amp;lt;body&amp;gt;&lt;BR /&gt;&amp;lt;div id="viewDiv"&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;calcite-panel id="infoDiv" class="calcite-theme-light"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div id="content" style="padding: 5px"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div style="width: 360px; max-width: 100%; display: flex;flex-direction: row;"&amp;gt;&lt;BR /&gt;&amp;lt;calcite-button id="btn-Query" width="half"&lt;BR /&gt;appearance="solid"&lt;BR /&gt;alignment="center"&lt;BR /&gt;scale="s"&amp;gt;&lt;BR /&gt;Query&lt;BR /&gt;&amp;lt;/calcite-button&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;br /&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;/calcite-panel&amp;gt;&lt;BR /&gt;&amp;lt;/body&amp;gt;&lt;BR /&gt;&amp;lt;/html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 20:27:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-polyline-along-with-roads/m-p/1096933#M74629</guid>
      <dc:creator>Mohammedaz</dc:creator>
      <dc:date>2021-09-09T20:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Show polyline along with roads</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-polyline-along-with-roads/m-p/1097091#M74630</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/509178"&gt;@Mohammedaz&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;to be able to construct a line feature that exactly follows the street, you will need to get your hands on the streets data, query the geometry, and use the geometry values to build your graphics/features.&lt;BR /&gt;The streets that you can see on the map are from a basemap, which is just an image, the basemap won't provide you with a vector layer for streets.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 06:39:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-polyline-along-with-roads/m-p/1097091#M74630</guid>
      <dc:creator>IhabHassan</dc:creator>
      <dc:date>2021-09-10T06:39:58Z</dc:date>
    </item>
    <item>
      <title>Re: Show polyline along with roads</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-polyline-along-with-roads/m-p/1097098#M74631</link>
      <description>&lt;P&gt;Hey Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/329425"&gt;@IhabHassan&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks a ton for looking into my query. I understand your point, could you please give me some pointers / links for integrating streets data and geometry.&amp;nbsp; I have .Net development experience and totally newbie to arcGIS development.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 06:58:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/show-polyline-along-with-roads/m-p/1097098#M74631</guid>
      <dc:creator>Mohammedaz</dc:creator>
      <dc:date>2021-09-10T06:58:41Z</dc:date>
    </item>
  </channel>
</rss>

