<?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: prepare url in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652833#M60853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; OK I guess this question belongs in the general developer space then. I have no experience with this type of question so maybe someone there will help. Placing your question in the correct GeoNet space will greatly help you get your question answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 23 Apr 2016 19:43:39 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2016-04-23T19:43:39Z</dc:date>
    <item>
      <title>prepare url</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652830#M60850</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I'm working with "Vehicle Routing Problem service"&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fresources.arcgis.com%2Fen%2Fhelp%2Farcgis-rest-api%2F%23%2FVehicle_Routing_Problem_service%2F02r3000000n4000000%2F" rel="nofollow" target="_blank"&gt;http://resources.arcgis.com/en/help/arcgis-rest-api/#/Vehicle_Routing_Problem_service/02r3000000n4000000/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;y no puedo reproducir el ejemplo PHP&amp;nbsp; de esta manera: "Servicing a set of orders with a fleet of vehicles"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$token = "my_token";&lt;/P&gt;&lt;P&gt;$jsonData&amp;nbsp; = '&amp;amp;orders={"features":[{"geometry":{"x":-122.51,"y":37.7724},"attributes":{"DeliveryQuantities":1706,"Name":"Store_1","ServiceTime":25,"TimeWindowStart1":1355245200000,"TimeWindowEnd1":1355274000000,"MaxViolationTime1":0}},{"geometry":{"x":-122.4889,"y":37.7538},"attributes":{"DeliveryQuantities":1533,"Name":"Store_2","ServiceTime":23,"TimeWindowStart1":1355245200000,"TimeWindowEnd1":1355274000000,"MaxViolationTime1":0}},{"geometry":{"x":-122.4649,"y":37.7747},"attributes":{"DeliveryQuantities":1580,"Name":"Store_3","ServiceTime":24,"TimeWindowStart1":1355245200000,"TimeWindowEnd1":1355274000000,"MaxViolationTime1":0}},{"geometry":{"x":-122.4739,"y":37.7432},"attributes":{"DeliveryQuantities":1289,"Name":"Store_4","ServiceTime":20,"TimeWindowStart1":1355245200000,"TimeWindowEnd1":1355274000000,"MaxViolationTime1":0}},{"geometry":{"x":-122.4493,"y":37.7315},"attributes":{"DeliveryQuantities":1302,"Name":"Store_5","ServiceTime":21,"TimeWindowStart1":1355245200000,"TimeWindowEnd1":1355274000000,"MaxViolationTime1":0}},{"geometry":{"x":-122.4917,"y":37.6493},"attributes":{"DeliveryQuantities":1775,"Name":"Store_6","ServiceTime":26,"TimeWindowStart1":1355245200000,"TimeWindowEnd1":1355274000000,"MaxViolationTime1":0}},{"geometry":{"x":-122.4832,"y":37.7012},"attributes":{"DeliveryQuantities":1014,"Name":"Store_7","ServiceTime":17,"TimeWindowStart1":1355245200000,"TimeWindowEnd1":1355274000000,"MaxViolationTime1":0}},{"geometry":{"x":-122.5301,"y":37.8935},"attributes":{"DeliveryQuantities":1761,"Name":"Store_8","ServiceTime":26,"TimeWindowStart1":1355245200000,"TimeWindowEnd1":1355274000000,"MaxViolationTime1":0}},{"geometry":{"x":-122.2875,"y":37.8909},"attributes":{"DeliveryQuantities":1815,"Name":"Store_9","ServiceTime":27,"TimeWindowStart1":1355245200000,"TimeWindowEnd1":1355274000000,"MaxViolationTime1":0}}]}';&lt;/P&gt;&lt;P&gt;$jsonData .= '&amp;amp;depots={"features":[{"geometry":{"x":-122.3943,"y":37.7967},"attributes":{"Name":"San Francisco","TimeWindowStart1":1355241600000,"TimeWindowEnd1":1355274000000}}]}';&lt;/P&gt;&lt;P&gt;$jsonData .= '&amp;amp;routes={"features":[{"attributes":{"Name":"Truck_1","StartDepotName":"San Francisco","EndDepotName":"San Francisco","StartDepotServiceTime":60,"EarliestStartTime":1355241600000,"LatestStartTime":1355241600000,"Capacities":"15000","CostPerUnitTime":0.2,"CostPerUnitDistance":1.5,"MaxOrderCount":2,"MaxTotalTime":360,"MaxTotalTravelTime":120,"MaxTotalDistance":80}},{"attributes":{"Name":"Truck_2","StartDepotName":"San Francisco","EndDepotName":"San Francisco","StartDepotServiceTime":60,"EarliestStartTime":1355241600000,"LatestStartTime":1355241600000,"Capacities":"15000","CostPerUnitTime":0.2,"CostPerUnitDistance":1.5,"MaxOrderCount":2,"MaxTotalTime":360,"MaxTotalTravelTime":120,"MaxTotalDistance":80}},{"attributes":{"Name":"Truck_3","StartDepotName":"San Francisco","EndDepotName":"San Francisco","StartDepotServiceTime":60,"EarliestStartTime":1355241600000,"LatestStartTime":1355241600000,"Capacities":"15000","CostPerUnitTime":0.2,"CostPerUnitDistance":1.5,"MaxOrderCount":2,"MaxTotalTime":360,"MaxTotalTravelTime":120,"MaxTotalDistance":80}}]}';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;$url = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Flogistics.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld%2FVehicleRoutingProblem%2FGPServer%2FSolveVehicleRoutingProblem%2FsubmitJob%3Ftoken%3D%27.%24token.%27%26time_units%3DMinutes%26distance_units%3DMiles%26uturn_policy%3DNO_UTURNS%26populate_directions%3Dtrue%26directions_language%3Den%26default_date%3D1355212800000%26f%3Djson" rel="nofollow" target="_blank"&gt;https://logistics.arcgis.com/arcgis/rest/services/World/VehicleRoutingProblem/GPServer/SolveVehicleRoutingProblem/submitJob?token='.$token.'&amp;amp;time_units=Minutes&amp;amp;distance_units=Miles&amp;amp;uturn_policy=NO_UTURNS&amp;amp;populate_directions=true&amp;amp;directions_language=en&amp;amp;default_date=1355212800000&amp;amp;f=json&lt;/A&gt;&lt;SPAN&gt;' . $jsonData;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$app_info = file_get_contents($url);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;echo '&amp;lt;pre&amp;gt;';&lt;/P&gt;&lt;P&gt;var_dump($app_info); //&lt;STRONG&gt;RETURN FALSE&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;echo '&amp;lt;/pre&amp;gt;';&lt;/P&gt;&lt;P&gt;this return &lt;SPAN style="color: #000000; font-family: 'Times New Roman'; font-size: medium; font-weight: bold; line-height: normal; background-color: #f57900;"&gt;&lt;SPAN&gt;Warning: file_get_contents(&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Flogistics.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld%2FVehicleRoutingProblem%2FGPServer%2FSolveVehicleRoutingProblem%2FsubmitJob%3Ftoken" rel="nofollow" target="_blank"&gt;https://logistics.arcgis.com/arcgis/rest/services/World/VehicleRoutingProblem/GPServer/SolveVehicleRoutingProblem/submitJob?token&lt;/A&gt;&lt;SPAN&gt;....&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Apr 2016 17:27:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652830#M60850</guid>
      <dc:creator>CloudingSoft</dc:creator>
      <dc:date>2016-04-23T17:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: prepare url</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652831#M60851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; I am not sure what the questions is here or where to move this question as right now you have it in the GeoNet community space. I think this belongs in the JavaScript space but I am really not sure because I don't understand the question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Apr 2016 18:47:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652831#M60851</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-04-23T18:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: prepare url</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652832#M60852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello, what I want is to send the url with php with the necessary information to get the result in json:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see the item:&lt;/P&gt;&lt;H4 style="margin-bottom: 0.2em; font-size: 12.8px; color: #4d4d4d; font-family: Arial, Helvetica, sans-serif;"&gt;Request URL to submit the job&lt;/H4&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Vehicle_Routing_Problem_service/02r3000000n4000000/" title="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Vehicle_Routing_Problem_service/02r3000000n4000000/"&gt;ArcGIS REST API&lt;/A&gt;&lt;/P&gt;&lt;P&gt;this is my code, you do not have to do with javascript.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$token='my token';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$jsonData='other json data , view example';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;$url = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Flogistics.arcgis.com%2Farcgis%2Frest%2Fservices%2FWorld%2FVehicleRoutingProblem%2FGPServer%2FSolveVehicleRoutingProblem%2FsubmitJob%3Ftoken%3D%27.%24token.%27%26time_units%3DMinutes%26distance_units%3DMiles%26uturn_policy%3DNO_UTURNS%26populate_directions%3Dtrue%26directions_language%3Den%26default_date%3D1355212800000%26f%3Djson" rel="nofollow" target="_blank"&gt;https://logistics.arcgis.com/arcgis/rest/services/World/VehicleRoutingProblem/GPServer/SolveVehicleRoutingProblem/submitJob?token='.$token.'&amp;amp;time_units=Minutes&amp;amp;distance_units=Miles&amp;amp;uturn_policy=NO_UTURNS&amp;amp;populate_directions=true&amp;amp;directions_language=en&amp;amp;default_date=1355212800000&amp;amp;f=json&lt;/A&gt;&lt;SPAN&gt;' . $jsonData;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;$app_info = file_get_contents($url);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;echo '&amp;lt;pre&amp;gt;';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var_dump($app_info); //RETURN FALSE!!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;echo '&amp;lt;/pre&amp;gt;';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but if income is generated with php url in Chrome gives me the correct json:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{"jobId":"jb0a050c89eed48d39f5f9dda89034935","jobStatus":"esriJobSubmitted"}&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Apr 2016 19:13:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652832#M60852</guid>
      <dc:creator>CloudingSoft</dc:creator>
      <dc:date>2016-04-23T19:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: prepare url</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652833#M60853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fabien,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; OK I guess this question belongs in the general developer space then. I have no experience with this type of question so maybe someone there will help. Placing your question in the correct GeoNet space will greatly help you get your question answered.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Apr 2016 19:43:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652833#M60853</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-04-23T19:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: prepare url</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652834#M60854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, and recommended me to take complete example of this section? &lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/#/Vehicle_Routing_Problem_service/02r3000000n4000000/" style="text-decoration: underline;" title="http://resources.arcgis.com/en/help/arcgis-rest-api/#/Vehicle_Routing_Problem_service/02r3000000n4000000/"&gt;ArcGIS REST API&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did it using only a browser to, but I need to do it from the server with php&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 23 Apr 2016 20:43:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/prepare-url/m-p/652834#M60854</guid>
      <dc:creator>CloudingSoft</dc:creator>
      <dc:date>2016-04-23T20:43:56Z</dc:date>
    </item>
  </channel>
</rss>

