If this is not possible, then how could he able to run his application by referencing them in a separate jsfile.
function showLocation(evt) { try{ map.graphics.clear(); var point = evt.result.feature.geometry; var symbol = new SimpleMarkerSymbol().setStyle( SimpleMarkerSymbol.STYLE_SQUARE).setColor( new Color([255, 0, 0, 0.5]) ); var graphic = new Graphic(point, symbol); map.graphics.add(graphic); map.infoWindow.setTitle("Search Result"); map.infoWindow.setContent(evt.result.name); map.infoWindow.show(evt.result.feature.geometry); }catch(e){ console.log(e); } }
ReferenceError: SimpleMarkerSymbol is not defined
function showLocation(evt) { map.graphics.clear(); var point = evt.result.feature.geometry; var symbol = new SimpleMarkerSymbol().setStyle( SimpleMarkerSymbol.STYLE_SQUARE).setColor( new Color([255, 0, 0, 0.5]) ); var graphic = new Graphic(point, symbol); map.graphics.add(graphic); map.infoWindow.setTitle("Search Result"); map.infoWindow.setContent(evt.result.name); map.infoWindow.show(evt.result.feature.geometry); }
Hi GIS folks,I started building web application using ARCGIS Javascript and slowly started adding new functionality into my web application.As my coding is getting bigger and bigger into my application, it is getting to stage where it is very difficult to look at my code. Can anyone please some provide methods / techniques through which we can organize our code in a modular way, so that allows easy debugging. I do know that we organize our code in a separate Javascript file for each functionality / feature added on to my application, but, just wanted to know, is there a right way of doing / organizing code better. And, also if you can point me to the right direction with some sample application, will be really appreciated.Thanks in advance.RegardsGanesh
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.