POST
|
Please look at here https://community.esri.com/thread/214839-47-untitled-layer-is-being-visible-in-layerlist-widget-when-i-define-new-sketchviewmodel
... View more
05-20-2018
11:40 PM
|
1
|
0
|
1192
|
POST
|
hello. I defining a new graphicslayer which has listmode property value as "hide". And this graphicslayer doesn't show in layerlistwidget (this is what i want) var myg = new graphicsLayer({ listMode: "hide"; }) mymap.add(myg); new sketchView var s = new SketchViewModel({ view: mySceneView, layer: myg, }); when i run this code an Untitled Layer is being visible on layerlist. This layer is not myg. Another new layer.
... View more
05-16-2018
12:55 AM
|
0
|
4
|
1979
|
POST
|
Robert, I found the problem. My proxy file is not on my machine. I 've added Some variables to my proxy machine's http response headers. My fault is that i searching error on my machine since 2 days. Actually error was in proxy machine's proxy web application configuration. My problem solved and working now. I'm happy. Thank you again for all help. Here is the picture where i added variables
... View more
05-15-2018
07:51 AM
|
0
|
0
|
2677
|
POST
|
Robert, Thanks for your interests. I know you want to help but i can't to say anything else. I can't debug my codes, Same sceneview running good when i publish my application to another server. But this is hard to debug from developer console.
... View more
05-15-2018
07:21 AM
|
0
|
2
|
2677
|
POST
|
Robert, This is my proxy.config file which in same directory with proxy.ashx <serverUrl url="http://goldone" matchAll="true" /> <serverUrl url="http://goldone:44300" matchAll="true" /> <serverUrl url="https://goldone" matchAll="true" /> <serverUrl url="https://goldone:44300" matchAll="true" />
... View more
05-15-2018
07:15 AM
|
0
|
4
|
2676
|
POST
|
Yes Exactly My machine name is "goldone". proxy.config <serverUrl URL="http://goldone" matchAll="true" /> <serverUrl URL="http://goldone:44300" matchAll="true" /> <serverUrl URL="https://goldone" matchAll="true" /> <serverUrl URL="https://goldone:44300" matchAll="true" /> JS file urlUtils.addProxyRule ({ urlPrefix: "http://goldone", proxyUrl: "https://proxrserver/proxy.ashx"}); urlUtils.addProxyRule ({ urlPrefix: "http://goldone:44300", proxyUrl: "https://proxrserver/proxy.ashx"}); urlUtils.addProxyRule ({ urlPrefix: "https://goldone", proxyUrl: "https://proxrserver/proxy.ashx"}); urlUtils.addProxyRule ({ urlPrefix: "https://goldone:44300", proxyUrl: "https://proxrserver/proxy.ashx"}); have i do something another this My application running from VB.NET (with F5) starting as "https://goldone:44300"
... View more
05-15-2018
07:08 AM
|
0
|
6
|
2676
|
POST
|
sorry my bad. all adresses started with https not http. just written wrong here. I tried to run my application with 44300 portnumber and added into proxy.config with port. Still getting same error. Access to image at "https://myproxyserver/mydir/proxy.ashx?http://mymapserver/Maps/MyCustomTileMap/1/2/3.jpg" from Origin "https://mymachinename" has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin "https://mymachinename" is therefore not allowed access.
... View more
05-15-2018
06:49 AM
|
0
|
8
|
3598
|
POST
|
Hello, I'm getting this error on program startup (with sceneview). I'm seeing only white sceneview. "MyCustomTileMap" is my basemap and i can access from MapView without error. This error occurs when i switch to 3D. Access to image at "http://myproxyserver/mydir/proxy.ashx?http://mymapserver/Maps/MyCustomTileMap/1/2/3.jpg" from Origin "http://mymachinename" has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin "http://mymachinename" is therefore not allowed access. Thanks inadvance.
... View more
05-15-2018
05:54 AM
|
0
|
10
|
3598
|
POST
|
Hi Robert, i've defined 44300 port as https from IIS manager. mymachinename is my local IIS name not different server. JS file urlUtils.addProxyRule ({ urlPrefix: "https://mymachinename:44300", proxyUrl: "https:proxrserver/proxy.ashx"}); proxy.config file <serverUrl url="https://mymachinename:44300" matchAll="true" /> still getting same error. I just seeing empty globe in sceneview.
... View more
05-14-2018
10:56 PM
|
0
|
12
|
3598
|
POST
|
thanks for the answer. ye you're right. I tried to add below codes into my javascript file urlUtils.addProxyRule ({ urlPrefix: "https://mymachinename", proxyUrl: "https:proxrserver/proxy.ashx"}); and into proxy.config file <serverUrl url="https://mymachinename" matchAll="true" /> and i changed to Project URL from VB.NET Project Properties with "https://mymachinename" doesn't worked. same error.
... View more
05-14-2018
06:42 AM
|
0
|
14
|
3598
|
POST
|
Thanks. I'm developing a GIS application which supporting 2D and 3D on same time. But it's hard to check for the mapview or sceneview while thousands lines of coding. It making it very complicated. On my opinions, new features must be support both of mapviews and sceneviews after has been published. Thanks for answer
... View more
05-14-2018
06:10 AM
|
0
|
0
|
1428
|
POST
|
Hello. I'm trying to draw rectangle and cirle on sceneview. blow code copied from your sample page at ArcGIS API for JavaScript Sandbox I just changed MapView to SceneView. My whole code below, I can creating polygon but can't create rectangle and circle <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> <title>Sketch temporary geometries - 4.7</title> <link rel="stylesheet" href="https://js.arcgis.com/4.7/esri/css/main.css"> <script src="https://js.arcgis.com/4.7/"></script> <style> html, body, #viewDiv { padding: 0; margin: 0; height: 100%; width: 100%; font-family: verdana; } #topbar { background: #fff; position: absolute; top: 15px; right: 15px; padding: 10px; } .action-button { font-size: 16px; background-color: transparent; border: 1px solid #D3D3D3; color: #6e6e6e; height: 32px; width: 32px; text-align: center; box-shadow: 0 0 1px rgba(0, 0, 0, 0.3); } .action-button:hover, .action-button:focus { background: #0079c1; color: #e4e4e4; } .active { background: #0079c1; color: #e4e4e4; } </style> <script> require([ "esri/views/SceneView", "esri/Map", "esri/widgets/Sketch/SketchViewModel", "esri/Graphic", "esri/layers/GraphicsLayer", "dojo/domReady!" ], function( SceneView, Map, SketchViewModel, Graphic, GraphicsLayer ) { // GraphicsLayer to hold graphics created via sketch view model var tempGraphicsLayer = new GraphicsLayer(); var updateGraphic; // Arctic Ocean Basemap var map = new Map({ basemap: "gray", layers: [tempGraphicsLayer] }); var view = new SceneView({ container: "viewDiv", map: map, zoom: 3 }); var pointSymbol = { // symbol used for points type: "simple-marker", // autocasts as new SimpleMarkerSymbol() style: "square", color: "#8A2BE2", size: "16px", outline: { // autocasts as new SimpleLineSymbol() color: [255, 255, 255], width: 3 // points } } var polylineSymbol = { // symbol used for polylines type: "simple-line", // autocasts as new SimpleLineSymbol() color: "#8A2BE2", width: "4", style: "dash" } var polygonSymbol = { // symbol used for polygons type: "simple-fill", // autocasts as new SimpleFillSymbol() color: "rgba(138,43,226, 0.8)", style: "solid", outline: { color: "white", width: 1 } } view.when(function() { // create a new sketch view model var sketchViewModel = new SketchViewModel({ view: view, layer: tempGraphicsLayer, pointSymbol: pointSymbol, polylineSymbol: polylineSymbol, polygonSymbol: polygonSymbol }); setUpClickHandler(); // ************************************************************ // Get the completed graphic from the event and add it to view. // This event fires when user presses // * "C" key to finish sketching point, polygon or polyline. // * Double-clicks to finish sketching polyline or polygon. // * Clicks to finish sketching a point geometry. // *********************************************************** sketchViewModel.on("draw-complete", addGraphic); sketchViewModel.on("update-complete", addGraphic); sketchViewModel.on("update-cancel", addGraphic); function addGraphic(evt) { var geometry = evt.geometry; var symbol; // Choose a valid symbol based on return geometry switch (geometry.type) { case "point": symbol = pointSymbol; break; case "polyline": symbol = polylineSymbol; break; default: symbol = polygonSymbol; break; } // Create a new graphic; add it to the GraphicsLayer var graphic = new Graphic({ geometry: geometry, symbol: symbol }); tempGraphicsLayer.add(graphic); // Remove stored reference to the updated graphic // Required in 'update-complete' callback specifically updateGraphic = null; } // ************************************* // activate the sketch to create a point // ************************************* var drawPointButton = document.getElementById("pointButton"); drawPointButton.onclick = function() { // set the sketch to create a point geometry sketchViewModel.create("point"); setActiveButton(this); }; // **************************************** // activate the sketch to create a polyline // **************************************** var drawLineButton = document.getElementById("polylineButton"); drawLineButton.onclick = function() { // set the sketch to create a polyline geometry sketchViewModel.create("polyline"); setActiveButton(this); }; // *************************************** // activate the sketch to create a polygon // *************************************** var drawPolygonButton = document.getElementById("polygonButton"); drawPolygonButton.onclick = function() { // set the sketch to create a polygon geometry sketchViewModel.create("polygon"); setActiveButton(this); }; // *************************************** // activate the sketch to create a rectangle // *************************************** var drawRectangleButton = document.getElementById( "rectangleButton"); drawRectangleButton.onclick = function() { // set the sketch to create a polygon geometry sketchViewModel.create("rectangle"); setActiveButton(this); }; // *************************************** // activate the sketch to create a circle // *************************************** var drawCircleButton = document.getElementById("circleButton"); drawCircleButton.onclick = function() { // set the sketch to create a polygon geometry sketchViewModel.create("circle"); setActiveButton(this); }; // ************** // reset button // ************** document.getElementById("resetBtn").onclick = function() { sketchViewModel.reset(); tempGraphicsLayer.removeAll(); setActiveButton(); }; function setActiveButton(selectedButton) { // focus the view to activate keyboard shortcuts for sketching view.focus(); var elements = document.getElementsByClassName("active"); for (var i = 0; i < elements.length; i++) { elements.classList.remove("active"); } if (selectedButton) { selectedButton.classList.add("active"); } } // ************************************************************************************ // set up logic to handle geometry update and reflect the update on "tempGraphicsLayer" // ************************************************************************************ function setUpClickHandler() { view.on("click", function(evt) { view.hitTest(evt).then(function(response) { var results = response.results; // Found a valid graphic if (results.length && results[results.length - 1] .graphic) { // Check if we're already editing a graphic if (!updateGraphic) { // Save a reference to the graphic we intend to update updateGraphic = results[results.length - 1].graphic; // Remove the graphic from the GraphicsLayer // Sketch will handle displaying the graphic while being updated tempGraphicsLayer.remove(updateGraphic); sketchViewModel.update(updateGraphic.geometry); } } }); }); } }); }); </script> </head> <body> <div id="viewDiv"> <div id="topbar"> <button class="action-button esri-icon-blank-map-pin" id="pointButton" type="button" title="Draw point"></button> <button class="action-button esri-icon-polyline" id="polylineButton" type="button" title="Draw polyline"></button> <button class="action-button esri-icon-polygon" id="polygonButton" type="button" title="Draw polygon"></button> <button class="action-button esri-icon-checkbox-unchecked" id="rectangleButton" type="button" title="Draw rectangle"></button> <button class="action-button esri-icon-radio-unchecked" id="circleButton" type="button" title="Draw circle"></button> <button class="action-button esri-icon-trash" id="resetBtn" type="button" title="Clear graphics"></button> </div> </div> </body> </html>
... View more
05-14-2018
02:12 AM
|
0
|
2
|
1846
|
POST
|
Hello. I'm developing sceneView application and i can't see basemaps when i debugging my project on localhost (pressing F5). Because CORS policy blocking my localhost. But i see no error when i published my project. I tried to add esriConfig.request.corsDetection = false; But doesn't worked. AccessTo image at "https://myproxyserver/resource-proxy/proxy.ashx?http://myserver.com/myservice/3/5/1.jpg" from origin "https://localhost:44300" has been blocked by CORS policy: No "Access-Contol-Allow-Origin" header is present on the requested ressource. Origin "https://localhost:44300" is therefore not allowed access Thanks inadvance.
... View more
05-13-2018
11:18 PM
|
1
|
17
|
6593
|
POST
|
thanks for reply. actually i cant set Z value of simplemarker with sketchViewModel on sceneview yet. mygraphic.z = 500 // just for example 500 meters up from ground but im still seeing my graphics relative to ground. normal draw action working good but sketchview doesn't
... View more
05-11-2018
07:37 AM
|
0
|
1
|
1654
|
Title | Kudos | Posted |
---|---|---|
1 | 05-20-2018 11:40 PM | |
1 | 05-13-2018 11:18 PM | |
2 | 02-05-2013 06:38 AM | |
1 | 03-22-2018 11:01 PM | |
2 | 02-06-2018 05:19 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|