<?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 URL Parameters in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437274#M40254</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any documentation or any ideas about what URL parameters we can pass to the javascript API?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 May 2010 14:32:11 GMT</pubDate>
    <dc:creator>AndyBurns</dc:creator>
    <dc:date>2010-05-27T14:32:11Z</dc:date>
    <item>
      <title>URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437274#M40254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have any documentation or any ideas about what URL parameters we can pass to the javascript API?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 14:32:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437274#M40254</guid>
      <dc:creator>AndyBurns</dc:creator>
      <dc:date>2010-05-27T14:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437275#M40255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is pretty vague...what do you want to do? The JS API doesn't really handle URL parameters but the REST API does.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 May 2010 17:34:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437275#M40255</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2010-05-27T17:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437276#M40256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;A user can search for a address in a application and once a address is selected from a list etc it will fire up the mapping application created by the API and zoom to the relevant x/y co ords on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you know of any documentation to help, please let me know.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 09:53:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437276#M40256</guid>
      <dc:creator>AndyBurns</dc:creator>
      <dc:date>2010-05-28T09:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437277#M40257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't think there's any native functionality in the API to help you here. But this wouldn't be too hard to do yourself. Check out &lt;/SPAN&gt;&lt;A href="https://developer.mozilla.org/en/DOM/window.location"&gt;window.location&lt;/A&gt;&lt;SPAN&gt; and &lt;/SPAN&gt;&lt;A href="http://docs.dojocampus.org/dojo/queryToObject"&gt;dojo.queryToObject&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 May 2010 15:31:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437277#M40257</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2010-05-28T15:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437278#M40258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There is no native functionality. Here's how I did it for our page. I'll step through with comments the basic functionality for zooming to a passed extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What is not in this code, is that I have a widget that, when loaded, checks to see if there is a value for urlargs.xa. If there is, then it geocodes that value and uses that result to zoom and center the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This should get you up and running with url arguments in general though&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Notice that buildUrl has references to a lot of widgets not discussed here. This should give you a general idea of how to pattern your widgets for url arguments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function buildUrl() { //This function constructs a url argument to use when passing shared urls. var mext, dfrom, dto, ll, ur, xa, xg, xf, xt, ct;
 mext = dijit.byId("map").getMap().extent;
 dfrom = dijit.byId("dateFrom").value;
 dto = dijit.byId("dateTo").value;
 ll = "" + mext.xmin + "," + mext.ymin;
 ur = "" + mext.xmax + "," + mext.ymax;
 xa = dijit.byId("sp").searchaddress;
 xg = dijit.byId("gmSelectAreas").value;
 xf = "" + (1 + dfrom.getMonth()) + "+" + dfrom.getDate() + "+" + dfrom.getFullYear();
 xt = "" + (1 + dto.getMonth()) + "+" + dto.getDate() + "+" + dto.getFullYear();
 ct = dojo.cookie("ct");
 //return window.location.protocol + "//" + window.location.host + window.location.pathname + "?" + dojox.encoding.crypto.Blowfish.encrypt("ll=" + ll + "&amp;amp;ur=" + ur + ((xa) ? "&amp;amp;xa=" : "") + xa + ((xg) ? "&amp;amp;xg=" : "") + xg + "&amp;amp;xf=" + xf + "&amp;amp;xt=" + xt + "&amp;amp;ct=" + ct, "slcpd");
 return window.location.protocol + "//" + window.location.host + window.location.pathname + "?ll=" + ll + "&amp;amp;ur=" + ur + ((xa) ? "&amp;amp;xa=" : "") + xa + ((xg) ? "&amp;amp;xg=" : "") + xg + "&amp;amp;xf=" + xf + "&amp;amp;xt=" + xt + "&amp;amp;ct=" + ct;
}

function getValuesFromURL(name,urlstring)
{ //Utility function for finding a url argument in a url. See how it is used below.
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Use RegExp to clean up the URL and to search for the given parameter
&amp;nbsp;&amp;nbsp;&amp;nbsp; name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
&amp;nbsp;&amp;nbsp;&amp;nbsp; var regexS = "[\\?&amp;amp;]" + name + "=([^&amp;amp;#]*)";
&amp;nbsp;&amp;nbsp;&amp;nbsp; var regex = new RegExp(regexS);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var results = regex.exec(urlstring);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (results === null) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "";
&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (results[1]);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
//In body of main code for page
&amp;nbsp; var sstring = window.location.search;
&amp;nbsp; urlargs = {
&amp;nbsp;&amp;nbsp; ll: dojo.map(getValuesFromURL("ll", sstring).split("%2c"),function(x) { return parseFloat(x);},this), //Lower left
&amp;nbsp;&amp;nbsp; ur: dojo.map(getValuesFromURL("ur", sstring).split("%2c"),function(x) { return parseFloat(x);},this), //Upper right
&amp;nbsp;&amp;nbsp; xa: getValuesFromURL("xa", sstring).split("+").join(" "), //Search Address
&amp;nbsp;&amp;nbsp; xg: getValuesFromURL("xg", sstring), //geokey to a specific location
&amp;nbsp;&amp;nbsp; xf: new Date(Date.parse(getValuesFromURL("xf", sstring).split("+").join(" "))), //Date from
&amp;nbsp;&amp;nbsp; xt: new Date(Date.parse(getValuesFromURL("xt", sstring).split("+").join(" "))), //Date to
&amp;nbsp;&amp;nbsp; xs: getValuesFromURL("xs", sstring), //Sort by
&amp;nbsp;&amp;nbsp; xk: getValuesFromURL("xk", sstring),&amp;nbsp; //Skin
&amp;nbsp;&amp;nbsp; ct: getValuesFromURL("ct", sstring) //Crime Types
&amp;nbsp; };
&amp;nbsp; urlargs.xf = (urlargs.xf &amp;gt; 0) ? urlargs.xf : "";
&amp;nbsp; urlargs.xt = (urlargs.xt &amp;gt; 0) ? urlargs.xt : "";

//This part is wrapped in a large try...catch because bad arguments can throw errors
&amp;nbsp;&amp;nbsp; if (urlargs.xs) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.cookie("xs", urlargs.xs);&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }

//Then still yet farther down, when I am creating the map object
&amp;nbsp;&amp;nbsp; options = {
&amp;nbsp;&amp;nbsp;&amp;nbsp; extent: urlargs.urlextent || urlargs.initextent
&amp;nbsp;&amp;nbsp;&amp;nbsp; //There is more, but that is the key part for extent
&amp;nbsp;&amp;nbsp; };
//And then I pass that options object as the 2nd argument when creating the map


&amp;nbsp;&amp;nbsp; if (urlargs.ll[0] &amp;amp;&amp;amp; urlargs.ll[1] &amp;amp;&amp;amp; urlargs.ur[0] &amp;amp;&amp;amp; urlargs.ur[1]) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; urlargs.urlextent = new esri.geometry.Extent({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "xmin": urlargs.ll[0],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ymin": urlargs.ll[1],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "xmax": urlargs.ur[0],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ymax": urlargs.ur[1],
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "spatialReference": {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "wkid": 102113
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp; } else {
&amp;nbsp;&amp;nbsp;&amp;nbsp; urlargs.initextent = new esri.geometry.Extent({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "xmin": -10137766.624432003,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ymin": 4628644.247807602,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "xmax": -9998498.358896358,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "ymax": 4711960.608638476,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "spatialReference": {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "wkid": 102113
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp; } 

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:34:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437278#M40258</guid>
      <dc:creator>BrettLord-Castillo</dc:creator>
      <dc:date>2021-12-11T19:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437279#M40259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In my humble opinion ESRI should add functionality to each of the APIs (JavaScript, Flex, and SilverLight) so that url parameters can be handled in the same away for each API.&amp;nbsp; If you agree you can promote this idea:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://ideas.arcgis.com/ideaView?id=087300000008F4Y&amp;amp;returnUrl=%2Fapex%2FideaList%3Fc%3D09a300000004xET%26category%3DWeb%2BApps%2Band%2BAPIs"&gt;http://ideas.arcgis.com/ideaView?id=087300000008F4Y&amp;amp;returnUrl=%2Fapex%2FideaList%3Fc%3D09a300000004xET%26category%3DWeb%2BApps%2Band%2BAPIs&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bernie.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Sep 2010 11:11:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437279#M40259</guid>
      <dc:creator>BernieConnors</dc:creator>
      <dc:date>2010-09-29T11:11:16Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437280#M40260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This has been described more than 2 years ago in the "Pass Map Extent Parameters from one page to another in Javascript API" example at the Resources Gateway: &lt;/SPAN&gt;&lt;A href="http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=15672"&gt;http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=15672&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Normally, URL parameters should be handled by a server component, not a client component. JS Apis in general are client components. The only server component for the JS API client is the webserver URL to download the API. Later you may access several GIS application servers but that's out of scope of the general architecture of a JS API client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the last years of internet protocols and usage there was a common idea that URL parameters are handled in the backend of a server component, maybe ASPX, JAVA, PHP, Perl or some other environment. The URL parameters are parsed, processed and the result passed back to the client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JavaScript clients running in a webbrowser don't have a similar concept for handling URL parameters except doing it the JavaScript way: accessing it over the DOM and windows.location.href. That's all. Go up the DOM until you are at the browser location bar and grab the text in it. In theory you even don't have to write a '?' and '&amp;amp;' signs. You can type anything behind that because the way JS accesses it is not depending on a protocol definition. Although the hosting webserver of the JS app would be irritated and that's the only reason to adapt this HTTP concept.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Oct 2010 07:09:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437280#M40260</guid>
      <dc:creator>AxelSchaefer</dc:creator>
      <dc:date>2010-10-01T07:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437281#M40261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think the parent was talking about parsing URL parameters in the browser, yall are making too much of it. Here is the function I use:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;function getUrlParam(name, url) { // optionally pass an URL to parse
 if (!url) url = window.location.href;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // if no parameter url is given, use the page URL
 name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");&amp;nbsp;&amp;nbsp; // instruction needed if we want to extract an array
 var results = new RegExp("[\\?&amp;amp;]"+name+"=([^&amp;amp;#]*)").exec(url);
 if( results == null ) 
&amp;nbsp; return null;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // if the name is not found, return null
 else // decodeURIComponent doesn't recognize '+' as encoding for space
&amp;nbsp; return decodeURIComponent(results[1].replace(/\+/g," ")); 
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which I got from here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.netlobo.com/comments/url_query_string_javascript" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.netlobo.com/comments/url_query_string_javascript&lt;/A&gt;&lt;SPAN&gt; (about half way down, search for "gup")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is more flexible that the one I wrote and most of the ones I've found on the net, you can use it to check for params, assign them, encode a URL within the app and it handles spaces or (+) better.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:34:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437281#M40261</guid>
      <dc:creator>GlenRhea</dc:creator>
      <dc:date>2021-12-11T19:34:43Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437282#M40262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Since this functionality is application specific, here's one example of how I've done it before:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; 
&amp;nbsp; var urlObject = esri.urlToObject(document.location.href);
&amp;nbsp; if (urlObject.query) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (urlObject.query.lon &amp;amp;&amp;amp; urlObject.query.lat) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lon = parseFloat(urlObject.query.lon);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lat = parseFloat(urlObject.query.lat);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var initialLocation = esri.geometry.geographicToWebMercator(new esri.geometry.Point(lon, lat, new esri.SpatialReference({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wkid: 4326
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; })));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAndZoom(initialLocation, 14);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:34:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437282#M40262</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2021-12-11T19:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437283#M40263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Grayson, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm new to this API, I'm trying to integrate with Arc GIS with my web application .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you please send me full example (with some URL with static values),So that i can customize it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for an example to locate a point using Arc GIS javascript API to pass lat/lng as input .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Rajasekhar&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Since this functionality is application specific, here's one example of how I've done it before:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp; 
&amp;nbsp; var urlObject = esri.urlToObject(document.location.href);
&amp;nbsp; if (urlObject.query) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (urlObject.query.lon &amp;amp;&amp;amp; urlObject.query.lat) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lon = parseFloat(urlObject.query.lon);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var lat = parseFloat(urlObject.query.lat);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var initialLocation = esri.geometry.geographicToWebMercator(new esri.geometry.Point(lon, lat, new esri.SpatialReference({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; wkid: 4326
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; })));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAndZoom(initialLocation, 14);
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:34:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437283#M40263</guid>
      <dc:creator>RajasekharReddyMayaluru</dc:creator>
      <dc:date>2021-12-11T19:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437284#M40264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've been interested for quite some time in being able to use url parameters to select &amp;amp; zoom to features by using the parameters in attribute queries.&amp;nbsp; It's disappointing that this basic function is still not included among the ArcGIS API for Javascript code samples.&amp;nbsp; I've gone ahead &amp;amp; developed my own code sample, which I've posted to ArcGIS.com here: &lt;/SPAN&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=92ff586d7e934fde9ee62356592f8761"&gt;http://www.arcgis.com/home/item.html?id=92ff586d7e934fde9ee62356592f8761&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The sample that I posted uses two parameters to select a tax parcel.&amp;nbsp; Clicking a different parcel on the map revises the parameters.&amp;nbsp; The UrlToObject method in the Esri namespace is used to convert the url parameters into variables &amp;amp; the HTML5 Pushstate method is used for updating the parameters when a different parcel is clicked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope that this sample is helpful.&amp;nbsp; All suggestions and comments are welcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Michael Olkin&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Administrator&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Town of Amherst, MA&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.amherstma.gov/maps"&gt;http://www.amherstma.gov/maps&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 13:21:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437284#M40264</guid>
      <dc:creator>MichaelOlkin</dc:creator>
      <dc:date>2012-01-23T13:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437285#M40265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nice sample Mike. This is a frequently asked question so we really should have a sample that shows how to do this in the help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 14:36:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437285#M40265</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2012-01-23T14:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437286#M40266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/ags_basic.html"&gt;Specify WebMap via URL&lt;/A&gt;&lt;SPAN&gt; sample shows this.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 15:54:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437286#M40266</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-01-23T15:54:11Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437287#M40267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples/ags_basic.html"&gt;Specify WebMap via URL&lt;/A&gt; sample shows this.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's a good sample and it uses a URL parameter, but not to select a feature.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 12:04:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437287#M40267</guid>
      <dc:creator>MichaelOlkin</dc:creator>
      <dc:date>2012-01-24T12:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437288#M40268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there Can I see how you have been used this code? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 16:58:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437288#M40268</guid>
      <dc:creator>BulbulMajumder1</dc:creator>
      <dc:date>2015-12-23T16:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437289#M40269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I created a module that will update the browser's query string as the map is zoomed, panned, and layers are turned on and off.&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/WSDOT-GIS/arcgis-query-string-utilities" title="https://github.com/WSDOT-GIS/arcgis-query-string-utilities"&gt;WSDOT-GIS/arcgis-query-string-utilities · GitHub&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Dec 2015 19:08:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437289#M40269</guid>
      <dc:creator>JeffJacobson</dc:creator>
      <dc:date>2015-12-23T19:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437290#M40270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;lol, Me: Well that's a big flippn question! Gotta see what the answer is ; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Dec 2015 16:18:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437290#M40270</guid>
      <dc:creator>JordanBaumgardner</dc:creator>
      <dc:date>2015-12-31T16:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437291#M40271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does this page exist anymore?&amp;nbsp; If not, can anyone tell me where it has been moved to or at least some similar sample code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2016 17:08:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437291#M40271</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2016-01-11T17:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437292#M40272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's its new address: &lt;A href="https://developers.arcgis.com/javascript/jssamples/ags_basic.html" title="https://developers.arcgis.com/javascript/jssamples/ags_basic.html"&gt;Web map using url parameters | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2016 17:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437292#M40272</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2016-01-11T17:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: URL Parameters</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437293#M40273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ken:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;According to your reply this sample URL is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://developers.arcgis.com/javascript/samples/ags_basi" title="http://developers.arcgis.com/javascript/samples/ags_basi"&gt;http://developers.arcgis.com/javascript/samples/ags_basic&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does I just add the extents the end of the URL for it to zoom in at start-up like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;A href="http://developers.arcgis.com/javascript/samples/ags_basic?Extent=-8427510.777,4867167.541,-8425000.479,4869435.962" title="http://developers.arcgis.com/javascript/samples/ags_basic?Extent=-8427510.777,4867167.541,-8425000.479,4869435.962"&gt;http://developers.arcgis.com/javascript/samples/ags_basic?Extent=-8427510.777,4867167.541,-8425000.479,4869435.962&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I got the extents by loading in an ESRI basemap which I thought would be the projection that would work with your sample, but it does not zoom to anything and just shows white space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am I using the wrong coordinate system in my test URL?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2016 17:39:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/url-parameters/m-p/437293#M40273</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2016-01-11T17:39:52Z</dc:date>
    </item>
  </channel>
</rss>

