question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

about dijit/Measurement

See original GitHub issue

when i use this dijit ,i lost the CSS,how to resolve this problem?thanks

componentWillMount(){ loadCss(‘http://localhost/arcgis_js_api/library/3.29/esri/themes/calcite/dijit/calcite.css’); loadCss(‘http://localhost/arcgis_js_api/library/3.29/esri/themes/calcite/esri/esri.css’);//themes/calcite/esri/esri.css // desbugger // loadCss(‘3.29’) }

lengthMeasure=()=>{
    var _this = this;
    var map = _this.props.mapControl;      
    esriLoader.loadModules([
        "dojo/dom",
        "esri/Color",
        "dojo/keys",
        "dojo/parser",

        "esri/config",
        "esri/sniff",
        "esri/map",
        "esri/SnappingManager",
        "esri/dijit/Measurement",
        "esri/layers/FeatureLayer",
        "esri/renderers/SimpleRenderer",
        "esri/tasks/GeometryService",
        "esri/symbols/SimpleLineSymbol",
        "esri/symbols/SimpleFillSymbol",

        "esri/dijit/Scalebar",
        "dijit/layout/BorderContainer",
        "dijit/layout/ContentPane",
        "dijit/TitlePane",
        "dijit/form/CheckBox",
        "dojo/domReady!"
    ],  {url : `${BASICCONFIG.GISAPI}/dojo/dojo.js`}).then(([
        dom, Color, keys, parser,
        esriConfig, has, Map, SnappingManager, Measurement, FeatureLayer, SimpleRenderer,
         GeometryService, SimpleLineSymbol, SimpleFillSymbol
    ])=>{
        map.graphics.clear();
        if (_this.mapClickEvent) {
            _this.mapClickEvent.remove();
            _this.mapClickEvent = null;
        }
        if (_this.props.mapControl.tb) {
            _this.props.mapControl.tb.deactivate();
            _this.props.mapControl.tb = null;
        }

        //This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications
        esriConfig.defaults.geometryService = new GeometryService("http://localhost/arcgis/rest/services/Utilities/Geometry/GeometryServer");

        var measurement = new Measurement({
        map: map
        }, dom.byId("measurementDiv"));
        measurement.startup();
    });
};

render() { return ( <div> <div className="mapTool" onClick={this.measureLength}> 测距 </div> <div id="measurementDiv"></div> </div>
) }

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
tomwaysoncommented, Oct 22, 2019

What CSS files do you see loaded in the network traffic?

0reactions
waiwaiTaDadycommented, Dec 20, 2019

oh,thanks for attention about this.I did not find any good method to solve this problem,so…i take the most primitive method—using a Css cover the Measurement Css of ArcgisAPI (‘Copy’ the style).em…you have some good solution?

Read more comments on GitHub >

github_iconTop Results From Across the Web

digit | ancient Egyptian unit of measurement | Britannica
Four digits equaled a palm, five a hand. Twelve digits, or three palms, equaled a small span. Fourteen digits, or one-half a cubit,...
Read more >
About: Digit (unit) - DBpedia
The digit or finger is an ancient and obsolete non-SI unit of measurement of length. It was originally based on the breadth of...
Read more >
What are digits, accuracy, and resolution with a DMM
The display digits refer to the level of resolution that the DMM can measure. Resolution is the level of detail that is quantifiable...
Read more >
Chemistry Lesson: Significant Digits & Measurements
Significant digits (also called significant figures or “sig figs” for short) indicate the precision of a measurement. A number with more significant digits ......
Read more >
2.5: Measured Numbers and Significant Digits
Measured numbers have "uncertainty" in that one can not know the value of a measurement that is smaller than the smallest unit of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found