POST
|
Hi Jake, This is Ashish Nagrale and I had raised the query from Shrikant's account. Your code is running fine, but its not showing pop-up when clicking on incident circle on traffic. Is that due to proxy usage or isolated from dynamicLayer?
... View more
03-24-2015
09:59 PM
|
0
|
0
|
866
|
POST
|
Hi Jake, I have Trial Organization account and I have register the new application with Type:Application Tags: Live Traffic, Real time traffic, traffic map, traffic accidents, incidents, congestion Now I have Client ID:XtsxmSampleUFIp Client Secret: 6ca936b16Sample4763409825 Token: 8jazdB1eIMxd0AeS47qtlGNSample_t21uUqyL2TgLT9vuxtCxH-hW0Uwhi9Q.. Then I have changed the code of proxy.config <serverUrl clientId="XtsxmSampleUFIp" clientSecret="6ca936b16Sample4763409825" rateLimit="10" rateLimitPeriod="60" matchAll="true" url="http://traffic.arcgis.com/arcgis/rest/services/World/Traffic/MapServer"/> </serverUrls> </ProxyConfig> http://localhost/DotNet/ here my proxy is run on IIS Now I am using the ESRI sample code of traffic as mention in shrikant add and changing proxyUrl: "/sproxy/" to proxyUrl: "/DotNet/" But Still the Esri sample code is not working ........Please help
... View more
03-23-2015
08:48 AM
|
0
|
6
|
866
|
POST
|
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>World Traffic</title> <link rel="stylesheet" href="http://js.arcgis.com/3.13/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css"> <link rel="stylesheet" href="css/layout.css"> <script src="http://js.arcgis.com/3.13/"></script> <script> require([ "dojo/parser", "dojo/ready", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/dom", "esri/map", "esri/urlUtils", "esri/arcgis/utils", "esri/dijit/Legend", "esri/dijit/Scalebar", "dojo/domReady!" ], function( parser, ready, BorderContainer, ContentPane, dom, Map, urlUtils, arcgisUtils, Legend, Scalebar ) { ready(function(){ parser.parse(); //all requests to traffic.arcgis.com will proxy to the proxyUrl defined in this object. urlUtils.addProxyRule({ urlPrefix: "traffic.arcgis.com", proxyUrl: "/sproxy/" }); arcgisUtils.createMap("327687e9b2664d65aa7a7f5c85398cff","map").then(function(response){ //update the app dom.byId("title").innerHTML = response.itemInfo.item.title; dom.byId("subtitle").innerHTML = response.itemInfo.item.snippet; var map = response.map; //add the scalebar var scalebar = new Scalebar({ map: map, scalebarUnit: "english" }); //add the legend. Note that we use the utility method getLegendLayers to get //the layers to display in the legend from the createMap response. var legendLayers = arcgisUtils.getLegendLayers(response); var legendDijit = new Legend({ map: map, layerInfos: legendLayers },"legend"); legendDijit.startup(); }); }); }); </script> </head> <body class="claro"> <div id="mainWindow" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline'" style="width:100%; height:100%;"> <div id="header" class="shadow roundedCorners" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'"> <div id="title"></div> <div id="subtitle"></div> </div> <div id="map" class="roundedCorners shadow" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"></div> <div id="rightPane" class="roundedCorners shadow" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'right'" > <div id="legend"></div> </div> </div> </body> </html> The above code works in ESRI Sandbox , but does not work when I use the above code in separate .html file , may be because of proxyUrl. Please help.......
... View more
03-21-2015
12:58 AM
|
1
|
8
|
4654
|
Title | Kudos | Posted |
---|---|---|
1 | 03-21-2015 12:58 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|