Bug Report T302395
Visible to All Users

Custom MapDataProvider does not work correctly with custom tile size

created 9 years ago

[DevExpress Support Team: CLONED FROM T301866: Custom MapDataProvider does not work correctly with a custom tile size]
Hello!

We are using MapControl   for displaying raster and vector non-cartographical images. Our data has specific features:
 - We don't have an infinite map. Our image has finite sizes and it can be not square
 - Tiles can be not square

We have created a sample illustrating our questions (attachement). The sample works with 3 kinds ot input data:
  Input Data 1.  Tiles of size 256x256
  Input Data 2.  Tiles 100x100
 Input Data 3.  Tiles 70x70
All data has 2 levels of zoom (1,2).
Our real image that we have is of orange color . We fill emty space with white color while generating tiles to adjust tile sizes.

Here is the list of issues we'd like to clarify:

Issue3.  If the tile size is less than 256x256 (for example 100x100 - input data 2) some artifacts - white lines - appear between the tiles. Is there a way to avoid these artifacts?

Issue 4. MapControl stretches non-square tiles to make it square (input data 3). How can we use non-square tiles in MapControl?

Comments (1)
DevExpress Support Team 9 years ago

    I have managed to reproduce the described problem on my side. It will require some time to research it in greater detail. I have passed this issue to our developers for further research. We will update the thread once we have any results.

    Answers approved by DevExpress Support

    created 9 years ago

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Show previous comments (8)
      MI MI
      Marina Ivanova 1 9 years ago

        Talking about v14.1 the problem with non-square tiles is fixed. But I tried the trial version of hotfix 15.1, cause we are going to accept it. There it doesn't work. I attached the screencast http://screencast.com/t/PJTXq3cZEKYW
        Moreover, what about Issue 3 in the question https://www.devexpress.com/Support/Center/Question/Details/T301866 . These artifacts still apear in both hotfixes (14.1 and 15.1).

        DevExpress Support Team 9 years ago

          We have researched the issue and decided that it is better to discuss this issue in a separate thread. I have registered a separate bug regarding this issue and we will reply to you there ASAP: T309724: If Custom MapDataProvider with a custom tile size is used, tiny white lines appear around the tile at certain zoom levels

          DevExpress Support Team 9 years ago

            To convert the provided sample to version 15.1, do the following:

            1. In the LocalDataProvider class, replace the "IProjection Projection" property with a new "ProjectionBase Projection" property.
            2. In the LocalDataProvider class, define the BaseSizeInPixels property as shown below:
            C#
            protected override Size BaseSizeInPixels {     get { return new Size(_tileWidth * 2, _tileHeight * 2); } }
            1. On changing ImageTilesLayer in the map control, also define the MapControl.InitialMapSize Property.
            C#
            mapControl.InitialMapSize = new System.Drawing.Size(tileWidth * 2, tileHeight * 2);

            I have created a sample project that demonstrates this approach. You will find it in the attachment.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.