Select to view content in your preferred language

Problem Measurement Widget

3754
2
04-02-2015 02:01 AM
NadirHussain
Frequent Contributor

Dear all

i add the measurement widget in my application.the code for this part is given below.

esri.config.defaults.geometryService = new esri.tasks.GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");

             var pms = new PictureMarkerSymbol("Images/i_draw_point.png", 24, 24);

             pms.setOffset(9, 11);

             var sls = new SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_DOT,new dojo.Color([255, 0, 0, 0.55]), 4);

             var measurement = new esri.dijit.Measurement({map: map,lineSymbol:sls,pointSymbol:pms}, dojo.byId('measurementDiv'));

             measurement.startup();

The code for  HTML part is given.

                <div   id="mapDiv" style="height:100%;width:75%; background-color:white;float:left; margin-right: 0px; margin-top: 0px;border-top:3px solid #00f">

                               <div id="HomeButton"></div>

                                <div style="position:absolute; right:400px; top:40px;background-color:White; z-Index:999;">

                                    <div id="titlePane" data-dojo-type="dijit.TitlePane" data-dojo-props="title:'Measurement', closable:'false', open:'false'">

                                        <div id="measurementDiv"></div>

                                        <span style="font-size:smaller;padding:5px 5px;">Press <b>CTRL</b> to enable snapping.</span>

                                    </div>

                              </div>

                      </div>

              but my measurement not display whole as shown in attatched image.pls what can be the reason.

0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor

Hi Nadir,

It may be helpful to post all of your code, or upload the HTML file you are working.

MuditAgarwal
Occasional Contributor

Hi Nadir,

Please find below the working example of Measurement widget. It may help you.

JS Fiddle Link

Sand Box Link

Thanks

Mudit