|
POST
|
HI I have created an online arcgis map with basemap as topographic and top layer is this LINZ/geotiffs (MapServer) I cannot able to use this layer directly as basemap in my app it disturb my functionality so i use topographic layer as basmap for this webmap , Furthermore, i have done this on click of button by dynamically changing portalItem id on click, but for this i have to refresh my page for toppo button. var webmap = new WebMap({ portalItem: { // autocasts as new PortalItem() id: "<?=$map_id?>" } }); //End WebMap Is their any other way, i can do it smoothly? Dynamically changing webmap, or any other way??? Hoping for positive response from the community. Please don't send link of Basemap | ArcGIS API for JavaScript 4.15 I have already read it, but don't know how to practically implment it.
... View more
05-15-2020
05:21 AM
|
0
|
1
|
4097
|
|
POST
|
Hi Sir, I solved the problem as below code, i removed the bolded lines, and its working fine now. No need to complete their state and no need to reshape them again. they will remain in their basic state that is one editable at a time. function onGraphicUpdate(event) { // get the graphic as it is being updated const graphic = event.graphics[0]; // check if the update event's the toolEventInfo.type is move then stop move event if (event.toolEventInfo && event.toolEventInfo.type.includes("move")){ sketchViewModel.cancel(); markersketchViewModel.cancel(); } // If toolEventInfo.type is reshape-stop then it means user finished moving or reshaping the graphic, call complete method. This will change update event state to complete and we will check the validity of the graphic location. if ( event.toolEventInfo && (event.toolEventInfo.type === "move-stop" || event.toolEventInfo.type === "reshape-stop") ) { // sketchViewModel.complete(); markersketchViewModel.complete(); } else if (event.state === "cancel" || event.state === "complete") { //check if the graphics are done being reshaped, printout updated graphic's geometry and reshape stage. // graphic reshaping has been completed or cancelled graphic.attributes.state = "updated"; //sketchViewModel.update([graphic], { tool: "reshape" }); } else{ graphic.symbol = validSymbol; } }//End OnGraphicsUpdate
... View more
05-15-2020
01:03 AM
|
0
|
0
|
1669
|
|
POST
|
how to change basemap for a url. I want this layer to become my basemap layer on button click. like for topo button i want this layer to come as basemap. LINZ/geotiffs (MapServer) How to change my code accordingly. Thanks in advance var topoBtn =domConstruct.toDom("<div class='map-button esri-component esri-widget--button esri-widget topo mapbtncolor' role='button' title='topo'>TOPO<span aria-hidden='true' role='presentation'></span></div>") ; var satelliteBtn = domConstruct.toDom("<div class='map-button esri-component esri-widget--button esri-widget sat basmapcolor' id='satt' role='button' title='sattelite'>SATELLITE<span aria-hidden='true' role='presentation'></span></div>") ; function setbasemap(basemap){ webmap.basemap = basemap; } topoBtn.addEventListener('click', function(){ setbasemap('topo'); }); satelliteBtn.addEventListener('click', function(){ setbasemap('satellite'); });
... View more
05-14-2020
11:08 PM
|
0
|
4
|
4179
|
|
POST
|
i commented this line bcz it gives error on using ///event.preventDefault(); Also my polygons comes on click, from db and as well as i get them by drawing them manually. So the polygon comes from db always remain editable. polygon drawn from tool become editable one at a time, while polygon onclick of view become editable one at a time with drawn polygon including 1 polygon from db always remain editable (while other drawn and onclick on view out of these 2 only one polygon editable at a time). I think their is great need to rectify this thing
... View more
05-14-2020
05:38 AM
|
0
|
1
|
1669
|
|
POST
|
How to access global vector tile elevation contour dataset through arcgis online, in online styling it gives only elevation spot. or is their any other layer which have countour editable for styling
... View more
05-13-2020
10:38 PM
|
0
|
1
|
1592
|
|
POST
|
Well your code blocked my markers also, so i did some minor editing, and now it works fine. else if(sketchViewModel.state !== 'active'){ sketchViewModel.cancel(); //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}); } }
... View more
05-13-2020
10:16 PM
|
0
|
0
|
3684
|
|
POST
|
Sir Still m not able to resolve this issue, your help will be very thankful
... View more
05-12-2020
05:33 AM
|
0
|
3
|
1669
|
|
POST
|
this is the marker add on click view.on("click", function(evt) { if(getmarkerclick==true){ counter++; getmarkercoordinates(view.toMap({x:evt.x, y: evt.y})); getmarkerclick=false; } }); //End view click //Plot marker on map on click window.getmarkercoordinates=function(pt){ var p = new Point({ longitude: pt.longitude, latitude:pt.latitude, spatialReference: { wkid: 4326 } }); var changedSymbol=changedsymbol(markertype); var g = new Graphic({ geometry: webMercatorUtils.geographicToWebMercator(p), symbol: changedSymbol, attributes: { newDevelopment: "new marker", state: "new", uniquetype:markertype, markerId:"0", marker_temp_Id:counter, comment:comment } }); //define popup body here var popup_html = ' <div class="be-form-wrapper">'; popup_html += '<div class="cmt_txt">'+comment +'</div></div>' popup_html += '<div class="cat-btn-wrapper">'; popup_html += '<button class="btn btn-width close_marker" data-url="">Cancel</button>'; popup_html += '</div> </div></div>'; //add content of popup body here g.popupTemplate = { title : ' ', content: popup_html }; markerGL.add(g); };
... View more
05-12-2020
05:27 AM
|
0
|
2
|
1332
|
|
POST
|
But i m using this condition, how can a popup appear , if they are active. I am adding markers with popup on separate layers. else if(sketchViewModel.state !== 'active'){ sketchViewModel.cancel(); //view.popup.open({features: [result.graphic], location: result.graphic.geometry}); } else if(markersketchViewModel.state!== 'active'){ markersketchViewModel.cancel(); view.popup.open({features: [result.graphic], location: result.graphic.geometry}); }
... View more
05-12-2020
05:23 AM
|
0
|
0
|
1332
|
|
POST
|
Sir I am already checking the state for both of them, I don't know where i m getting wrong.
... View more
05-12-2020
05:05 AM
|
0
|
5
|
1332
|
|
POST
|
and their graphic layer iss also differnt. to make layers working more comfortable for zones and basic properties
... View more
05-11-2020
06:17 AM
|
0
|
7
|
2352
|
|
POST
|
Well markersketchviewmodel draw boundaries also with different color and attributes you can say zones on the person properties to separate them like areas in property with low signal areas of property or high signal, ie the idea, so they must be used and act differently alot. So to separate basic property polygon from their numerous areas of it
... View more
05-11-2020
06:14 AM
|
0
|
8
|
2352
|
|
POST
|
No sir I have sketchviewmodel for property boundaries and markersketchviewmodel to create marker with polygons. So i have 2 sketchview models iin my code, but markersketchview model default popup appear for vertices of sketchviewmodel. Now i m confused!!! function setUpGraphicClickHandler() { view.on("click", function(event) { view.hitTest(event).then(function(response) { var results = response.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) { 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(); //view.popup.open({features: [result.graphic], location: result.graphic.geometry}); } else if(markersketchViewModel.state!== 'active'){ markersketchViewModel.cancel(); view.popup.open({features: [result.graphic], location: result.graphic.geometry}); } }); }); }); }//End setUpGraphicClickHandler
... View more
05-11-2020
06:04 AM
|
0
|
10
|
2352
|
|
POST
|
Sir I am checking its state here else if(sketchViewModel.state !== 'active'){ sketchViewModel.cancel(); // view.popup.open({features: [result.graphic], location: result.graphic.geometry}); }
... View more
05-11-2020
05:50 AM
|
0
|
12
|
2352
|
|
POST
|
Ok, but the the problem still persists, default popup still appears on vertices
... View more
05-11-2020
05:35 AM
|
0
|
14
|
2352
|
| 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
|