|
POST
|
Hi, i have created various maps and feature layers in arcgis online account all maps are public and i am accessing them... But now as my website is live, for security reasons, i want to make those layers and map private to my website only but it should not display login window username and pwd for my website, instead i want to pass oauth 2.0 token and then access my private maps.. Thanks in advance.. For example i just use the below map id which is public, but if i want to make it private then how to use it in my website using token generated by oauth from my arcgis app so that it will not ask user name or password for each website user for map page everytime. Currently i have generated toekns successfully from my arcgis online account. var webmap = new WebMap({ portalItem: { // autocasts as new PortalItem() id: "<?=$map_data_by_country['listing_map_id']?>" } }); Query: how to pass these tokens to access private maps without providing login credentials..
... View more
06-18-2020
01:05 AM
|
0
|
5
|
4433
|
|
POST
|
Hi, any help or suggestions from the community are very helpful, but please do help in this task, as my web app wll always work with large boundaries.... and this will kill my browser for reshaping. any IDEA to break down large boundaries for reshaping. .. please suggest
... View more
06-11-2020
04:13 AM
|
0
|
1
|
715
|
|
POST
|
working on this link these days... please share your experience with mysql functions database - How can I handle MySQL polygon overlap queries? - Stack Overflow
... View more
06-07-2020
09:22 PM
|
0
|
0
|
1109
|
|
POST
|
Hi , I am having a difficult time with reshape tool, when i have very large boundary on mountains then this line automatically plot the vertices, but it takes so much time, that my browser wants to kill itself. sketchViewModel.update([newDevelopmentGraphic], {tool: "reshape"}); Is their anyway i can optimize my code because without reshape tool my graphics added instantly. i have checked server side, waiting time marely is 3 ms but while making it editable automatically, it kill my page for very very large boundaries. For small boundaries .it works fine. the boundary i am using is of 2300 hectares almost. //*** Get dynamic lat long on click and get linz db to show linz polygons***// window.showCoordinates=function(pt){ var currentdate = new Date(); var coords = "Lat/Lon " + pt.latitude + " " + pt.longitude; if(coords != '') { jQuery.ajax({ type : "POST", dataType : "JSON", url :url, data : {action:'get_property_polygon',ring_coordinate_x:pt.longitude,ring_coordinate_y:pt.latitude}, success: function(response) { if(response.status=='success'){ console.log("LIne No:553 "+currentdate.getSeconds()); addGraphics(response.ring); console.log("LIne No:555 "+currentdate.getSeconds()); sketchViewModel.update([newDevelopmentGraphic], {tool: "reshape"}); } ///Remove linz title class from main div } });//End Ajax }//ENd if };//End ShowCoordinates
... View more
06-04-2020
03:56 AM
|
0
|
2
|
811
|
|
POST
|
I make it work like this. this return an image in base 64, further anyone can convert it to image. // add an event listener to trigger the area selection mode screenshotBtn.addEventListener("click", function() { let area = null; const xmin =1; const ymin = 1; const xmax = 1400; const ymax= 700; area = { x: xmin, y: ymin, width: xmax - xmin, height: ymax - ymin }; // the screenshot of the selected area is taken view .takeScreenshot({ area: area, format: "png" }) .then(function(screenshot) { var data_image_url=screenshot.dataUrl; //console.log(data_image_url); jQuery.ajax({ type : "POST", dataType : "JSON", data : {action:'save_map_image',listing_id:<?=$list_data['listing_id']?>,image_data_url:data_image_url } }); }); });
... View more
05-22-2020
06:54 PM
|
0
|
0
|
566
|
|
POST
|
Thanks ken It worked , i just need to calculate exact area
... View more
05-22-2020
06:49 PM
|
0
|
0
|
1758
|
|
POST
|
I tried it like this, but it stop to display geometry other dom elements on my map var newvertices=geometryEngine.simplify(vertices); const polygon = createGeometry(newvertices);
... View more
05-22-2020
09:16 AM
|
0
|
2
|
1758
|
|
POST
|
Sir, I think this truely annoys a user, if they have to see the popup and as i am using the edtiable polygons, this will not make my application smooth. ESRI should proviode a way to deal with it. Actrually it not even receive a click event on it. same case arise when i try to place markers on editable polygons, sometimes it works good, but sometimes i not even able to place a marker on my editable polygon, this is because that place is not even clickable and not receive anything in console at the time of placing it the below function function setUpGraphicClickHandler() { view.on("click", function(event) { view.hitTest(event).then(function(response) { var results = response.results; console.log(results); if(results.length === 0){ sketchViewModel.complete(); markersketchViewModel.complete(); } this console donopt work when i place markers on editable polygon sometimes, but sometimes, it works fine
... View more
05-22-2020
09:14 AM
|
0
|
1
|
1127
|
|
POST
|
Sir i get the vertices of polygon from linz db, how can i draw them counter clockwise
... View more
05-22-2020
08:57 AM
|
0
|
4
|
1758
|
|
POST
|
i am using below function to calculate area every time i add and delete a new polygon, It was working fine, but suddenly, i need to change the third party layer which provides polygon vertices for property and now i receive my area in negative value. so in order to co up with it, I added -ve in front of it, But when i draw a polygon by hand using sketch view model, then i get area in +ve and my area calculated reduces for below formu;la instead of increasing. Could anyone help me with this?? //Calculate TOtal hectares of Map Geometry function calculateArea() { var area = 0; setTimeout(function() { graphicsLayer.graphics.map(function (grap) { area = area+(-(geometryEngine.geodesicArea(grap.geometry, "hectares"))); }); totalAreaHectare=Math.round(area); jQuery("#hectare").html('<b>'+totalAreaHectare+' HECTARES</b>'); }, 500); } //End calculateArea
... View more
05-22-2020
08:20 AM
|
0
|
6
|
1828
|
|
POST
|
Sir Can't i change anything in this code, so that it works for editable mode also. else if(markersketchViewModel.state!== 'active'){ markersketchViewModel.cancel(); if( result.graphic.attributes && result.graphic.attributes.newDevelopment){ view.popup.open({features: [result.graphic], location: result.graphic.geometry}); } }
... View more
05-21-2020
05:36 AM
|
0
|
3
|
1127
|
|
POST
|
Please refer above image , once yellow polygon of markersketchview model become editable when i first time click oin it to show popup, after that this step marker do not show popup, until i click outside to make it uneditable
... View more
05-21-2020
02:48 AM
|
0
|
5
|
1127
|
|
POST
|
HI I have been working with 2 sketchviewmodels, my marker plced on markersketchviewmodel, do not show markers popup when polygon below them are in editable mode. However some nearby markers that come under that markersketchviewmodel polygon also not show popup when zoom out. // This function is called when a user clicks on the view. function setUpGraphicClickHandler() { view.on("click", function(event) { view.hitTest(event).then(function(response) { var results = response.results; console.log(results); if(results.length === 0){ sketchViewModel.complete(); markersketchViewModel.complete(); } // Check if the new development graphic and temp graphics with attribute named newDevelopment was clicked and pass // the graphic to sketchViewModel.update() with reshape tool. results.forEach(function(result) { //console.log(result); if ( result.graphic.layer === sketchViewModel.layer && result.graphic.attributes && result.graphic.attributes.newDevelopment ) { sketchViewModel.update([result.graphic], { tool: "reshape" }); } else if( result.graphic.layer === markersketchViewModel.layer && result.graphic.attributes && result.graphic.attributes.newDevelopment){ markersketchViewModel.update([result.graphic], { tool: "reshape" }); } else if(sketchViewModel.state !== 'active'){ sketchViewModel.cancel(); if( result.graphic.attributes && result.graphic.attributes.newDevelopment){ view.popup.open({features: [result.graphic], location: result.graphic.geometry}); } } else if(markersketchViewModel.state!== 'active'){ markersketchViewModel.cancel(); if( result.graphic.attributes && result.graphic.attributes.newDevelopment){ view.popup.open({features: [result.graphic], location: result.graphic.geometry}); } } }); }); }); }//End setUpGraphicClickHandler
... View more
05-21-2020
02:44 AM
|
0
|
6
|
1203
|
|
POST
|
Hi I am still not able to download the map on button click. Got this link also. Can you please help me in any way. Take a screenshot of a SceneView | ArcGIS API for JavaScript 4.15
... View more
05-19-2020
02:44 AM
|
0
|
1
|
758
|
|
POST
|
// Basemaps Eagle Technology New Zealand let LINZ_Topographic_Eagle_NZ = new Basemap({portalItem: {id: "<?=$map_id?>"}}); //NZ - LINZ Topographic // Click event on Topo Button topoBtn.addEventListener('click', function(){ setbasemap(LINZ_Topographic_Eagle_NZ); });
... View more
05-17-2020
10:15 PM
|
1
|
0
|
3596
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-28-2020 10:30 PM | |
| 1 | 12-27-2020 09:03 PM | |
| 1 | 05-17-2020 10:15 PM | |
| 2 | 04-21-2020 10:39 PM | |
| 3 | 09-09-2020 08:44 PM |
| Online Status |
Offline
|
| Date Last Visited |
04-30-2024
05:15 AM
|