1. <small id='V9Z5I'></small><noframes id='V9Z5I'>

      <legend id='V9Z5I'><style id='V9Z5I'><dir id='V9Z5I'><q id='V9Z5I'></q></dir></style></legend>
        <bdo id='V9Z5I'></bdo><ul id='V9Z5I'></ul>

    2. <tfoot id='V9Z5I'></tfoot>

      <i id='V9Z5I'><tr id='V9Z5I'><dt id='V9Z5I'><q id='V9Z5I'><span id='V9Z5I'><b id='V9Z5I'><form id='V9Z5I'><ins id='V9Z5I'></ins><ul id='V9Z5I'></ul><sub id='V9Z5I'></sub></form><legend id='V9Z5I'></legend><bdo id='V9Z5I'><pre id='V9Z5I'><center id='V9Z5I'></center></pre></bdo></b><th id='V9Z5I'></th></span></q></dt></tr></i><div id='V9Z5I'><tfoot id='V9Z5I'></tfoot><dl id='V9Z5I'><fieldset id='V9Z5I'></fieldset></dl></div>

      传单圆圈绘图/编辑问题

      时间:2023-08-08
        <tbody id='5l5Vy'></tbody>
          <legend id='5l5Vy'><style id='5l5Vy'><dir id='5l5Vy'><q id='5l5Vy'></q></dir></style></legend>
        • <small id='5l5Vy'></small><noframes id='5l5Vy'>

          1. <tfoot id='5l5Vy'></tfoot>

                <bdo id='5l5Vy'></bdo><ul id='5l5Vy'></ul>
                <i id='5l5Vy'><tr id='5l5Vy'><dt id='5l5Vy'><q id='5l5Vy'><span id='5l5Vy'><b id='5l5Vy'><form id='5l5Vy'><ins id='5l5Vy'></ins><ul id='5l5Vy'></ul><sub id='5l5Vy'></sub></form><legend id='5l5Vy'></legend><bdo id='5l5Vy'><pre id='5l5Vy'><center id='5l5Vy'></center></pre></bdo></b><th id='5l5Vy'></th></span></q></dt></tr></i><div id='5l5Vy'><tfoot id='5l5Vy'></tfoot><dl id='5l5Vy'><fieldset id='5l5Vy'></fieldset></dl></div>
                本文介绍了传单圆圈绘图/编辑问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                问题描述

                我是第一次制作传单,并面临绘制圆圈和编辑(更改圆圈位置)的问题.

                I am working on leaflet for the very first time and facing the issue with drawing circles and editing (changing location of circle).

                我面临的问题是:-

                1. 将圆从一个位置编辑(移动)到另一个位置会改变其半径.
                  注意:请尝试在给定的小提琴中在地图顶部创建圆圈,然后通过单击编辑按钮将其移动到底部.

                1. Editing (moving) circle from one location to another changes its radius.
                  Note: Pls try to create circle on top of map in given fiddle and then move it to the bottom by clicking edit button.

                如果我在地图的顶部创建圆圈,它可以正常工作.但如果我在地图底部创建圆圈,它只会在地图上打印一个 DOT.我检查了几个例子,它在任何地方都可以正常工作.
                这里是工作示例,其中圆圈创建和移动圆圈完全很好.

                If I create circle on top section of map it works fine. But If I create circle on bottom of map it only prints a single DOT on map. I checked few examples and it works fine everywhere.
                Here is the working example where circle creation and moving circle is completely fine.

                我没有使用像谷歌地图这样的地理地图.我正在使用静态图像,因为这是我的项目要求.

                I am not using the geographic map like google maps. I am using and static image as it is my project requirement.

                这是我的代码的小提琴.

                Here is the fiddle of my code.

                只需使用以下代码即可启用画圈:

                Just using following code to enable drawing circle :

                enabled : this.options.circle,
                handler : new L.Draw.Circle(map,this.options.circle),
                title : L.drawLocal.draw.toolbar.buttons.circle
                

                推荐答案

                您看到的是墨卡托投影固有的距离失真(以及基于它的谷歌墨卡托投影,这是大多数在线地图所固有的).因为您的地图从缩放 1 开始,所以向北/向南拖动圆形标记会导致很多失真.

                What you're seeing is distortion in distance inherent in the mercator projection (and the Google Mercator projection based off it that is inherent to most online maps). Because your map starts at zoom 1, dragging the circle marker north/south will cause a lot of distortion.

                因此,与其将您的图像地理配准到全局边界框,不如尝试将其地理配准到更小的物体.在您的情况下,您正在添加相对于 maxZoom 的图像叠加层,因此通过增加 maxZoom,您的图像将覆盖在地球的较小区域上,并且您将看到更少(或没有)跨纬度的失真.

                So, rather than georeference your image to a global bounding box, try georeferencing it to something much smaller. In your case, your are adding your image overlay relative to the maxZoom, so by increasing maxZoom, your image will be overlayed over a smaller area of the globe, and you will see less (or no) distortions across latitudes.

                我将 maxZoom 从 4 更改为 14,结果看起来效果很好:fiddle here:var w = 553, h = 329, url = 'https://kathleenmillar.files.wordpress.com/2012/10/picture2.png';

                I changed the maxZoom from 4 to 14, and the result looked like it worked well: fiddle here: var w = 553, h = 329, url = 'https://kathleenmillar.files.wordpress.com/2012/10/picture2.png';

                    var map = L.map('map', {
                        minZoom : 10,
                        maxZoom : 14,
                        center : [ w / 2, h / 2 ],
                        zoom : 11,
                        crs : L.CRS.Simple
                
                    });
                
                    // calculate the edges of the image, in coordinate space
                    var southWest = map.unproject([ 0, h ], map.getMaxZoom() - 3);
                    var northEast = map.unproject([ w, 0 ], map.getMaxZoom() - 3);
                    var bounds = new L.LatLngBounds(southWest, northEast);
                

                这篇关于传单圆圈绘图/编辑问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                上一篇:生成给定距离的坐标,距中心的角度 下一篇:使传单工具提示可点击

                相关文章

                最新文章

                  <bdo id='bOhGz'></bdo><ul id='bOhGz'></ul>

                  <small id='bOhGz'></small><noframes id='bOhGz'>

                  <i id='bOhGz'><tr id='bOhGz'><dt id='bOhGz'><q id='bOhGz'><span id='bOhGz'><b id='bOhGz'><form id='bOhGz'><ins id='bOhGz'></ins><ul id='bOhGz'></ul><sub id='bOhGz'></sub></form><legend id='bOhGz'></legend><bdo id='bOhGz'><pre id='bOhGz'><center id='bOhGz'></center></pre></bdo></b><th id='bOhGz'></th></span></q></dt></tr></i><div id='bOhGz'><tfoot id='bOhGz'></tfoot><dl id='bOhGz'><fieldset id='bOhGz'></fieldset></dl></div>

                  <legend id='bOhGz'><style id='bOhGz'><dir id='bOhGz'><q id='bOhGz'></q></dir></style></legend>
                1. <tfoot id='bOhGz'></tfoot>