Bug Report T313016
Visible to All Users

How to add bubbles with Cartesian coordinates to MapControl

created 9 years ago

Hi
I'm trying to use the Map control to post points to manually generate Bubble Chart Items on a Bing Maps background as per  your following example

https://documentation.devexpress.com/#WindowsForms/CustomDocument17228

As you know the coordinates of the Bubble points in this example are give in Lat, Long.

My question is how can I use the above procedure to post  programmatically a number of points with known  cartesian coordinates (i…e Easting Northing  or X, Y) of a given coordinate system, as bubble points on Bing or other background maps.

I understand those cartesian coordinates have to be translated to Lat, Long before they passed as arguments in your routines
After searching through your examples there are various examples of passing cartesian data  stored in shape files but I didn't find any examples of geoconverting  X,Y coordinate data to Lat Long and and passing them as coordinate arguments

Many Thanks

Panos

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.

    Comments (2)
    PG PG
    Panagiotis Giannoulopoulos 9 years ago

      Hi
      I downloaded and tried your Hotfix but I think the problem hasn't been solved yet!
      Please see attached an extract of my code with some sample points.
      I tried both Cartesian converters, the  UTMCartesianToGeoConverter() and  the TransverseMercatorCartesianToGeoConverter() but I could get the correct coordinates on the map!
      Many thanks
      Panos

      DevExpress Support Team 9 years ago

        We have tested your code, but have not noticed any issues. Would you please clarify the problem in greater detail? A sample screenshot demonstrating the actual result and description of the expected one will be very helpful.

        created 9 years ago

        Hi Panos,
        If you wish to create bubbles from a data base that contains Cartesian coordinates, use our BubbleChartDataAdapter. It allows specifying a required coordinate system using BubbleChartDataAdapter.SourceCoordinateSystem.
        In case of the Cartesian coordinate system, use the X and Y mappings:

        C#
        BubbleChartDataAdapter adapter = new BubbleChartDataAdapter(); adapter.SourceCoordinateSystem = new CartesianMapCoordinateSystem(); adapter.Mappings.XCoordinate= "X column name"; adapter.Mappings.YCoordinate= "Y column name"; adapter.Mappings.Value = "Value column name";

        Also, I suggest you review the How to customize coordinate systems of a map and data source example that illustrates how to use the SourceCoordinateSystem property.
        Let me know if you have another scenario and this approach does not meet your requirements. Describe your scenario in greater detail in this case.

          Comments (2)
          PG PG
          Panagiotis Giannoulopoulos 9 years ago

            Hi John
            Following your comments I used the code below, it compiles well but it plots nothing:  I suspect maybe is a coordinate conversion issue.
            Private Function CreateData() As IMapDataAdapter
                   Dim adapter As BubbleChartDataAdapter = adapter = New BubbleChartDataAdapter With {.DataSource = LoadData()}
                   adapter.SourceCoordinateSystem = New CartesianSourceCoordinateSystem() With {.CoordinateConverter = New UTMCartesianToGeoConverter() With {.UtmZone = 35, .Hemisphere = Hemisphere.Northern}}
                   adapter.Mappings.XCoordinate = "X" '"X column name"
                   adapter.Mappings.YCoordinate = "Y" '"Y column name"
                   adapter.Mappings.Value = "Cl" '"Value column name"
                   Return adapter
               End Function

            DevExpress Support Team 9 years ago

              Hi Panos,
              I have managed to reproduce this issue on my side and passed this ticket to our R&D Team for further research. We will upade tehis topic once we have any news.

              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.