Show custom Shapefiles in RadMap - EPSG

4 posts, 0 answers
  1. Marcelo
    Marcelo avatar
    14 posts
    Member since:
    Jun 2011

    Posted 06 Dec 2013 Link to this post

    Hi, 

      I have a several shapefiles and I'm trying show  in RadMap. I save it using many ESPG but anyone is showned in component.
      I used a Quantum GIS software to edit shapefiles, however I can't open Telerik examples in software.


    Best Regards,
    Marcelo Videira
  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 10 Dec 2013 Link to this post

    Hi Marcelo,

    Currently Geospatial data can be represented using the following projections which are supported by the map control:
      - The Mercator projection EPSG:4326 (default) that refers to WGS84 as (latitude, longitude) pair coordinates in degrees
      - The OSGB-1936 projection which also known as EPSG:27700 (require using of the converter).
      - The EPSG:900913 projection which also known as EPSG:3857 and Pseudo-Mercator projection that refers to WGS84 as (latitude, longitude) pair coordinates in meters (require using of the converter)

    You can use third party utilities like GDAL (http://www.gdal.org/) to convert the shape-file to the WGS84 Mercator projection (EPSG:4326) before using it in a RadMap project.

    The RadMap control displays shp-file or shp/dbf pair without using the shx-file. So, our examples do not contain them. Most of the shape file edit tools require the shx-file. You can use the Shape Viewer to create the shx-file from shp-file. It is a free tool, which you can use to view ESRI Shape files. You can download it through the following link: http://www.qarah.com/shapeviewer/

    When you create the shx-file then you can use tools like ArcGIS or MapWindow to edit the shape file.

    Regards,
    Andrey Murzov
    Telerik

    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.

    Sign up for Free application insights >>
  3. DevCraft banner
  4. Marcelo
    Marcelo avatar
    14 posts
    Member since:
    Jun 2011

    Posted 17 Dec 2013 Link to this post

    Hi Andrey,

    Many thanks for your comment.

    Now I have other problem. I need made a heatmap  but using one colunm that not exist in ExtendedData.

    I added one property to my ExtendedData but I can't use it to colorize. 


                                ExtendedData extendedData = mapShape.ExtendedData;
                                if (extendedData != null)
                                {
                                    // add new property to ExtendedData  
                                    if (!extendedData.PropertySet.ContainsKey(ColorBase))
                                    {
                                        extendedData.PropertySet.RegisterProperty(ColorBase, "", typeof(int), 0);
                                    }

                                    string country = mapShape.ExtendedData.GetValue("NOMEMESO").ToString();
                                    decimal additionalFieldValue = Model.lstColorizeMap[i];   //this.GetHugsByCountry(country);

                                    // assign value to new property  
                                    mapShape.ExtendedData.SetValue(ColorBase, Convert.ToDouble(additionalFieldValue));
                                }

                             ColorMeasureScale colorScale = new ColorMeasureScale();
                            colorScale.ExtendedPropertyName = "COLORBASE";
                            colorScale.Mode = ColorScaleMode.Ranges;
                            this.StateLayer.Colorizer = colorScale;

    Best Regards
    Marcelo Videira


  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 18 Dec 2013 Link to this post

    Hello Marcelo,



    I don't see from your code how the ColorBase extended property is defined. But you should keep in mind that property name is case sensitive. I.e. when you set name of the extended property to the color measure scale (colorScale.ExtendedPropertyName = "COLORBASE";) you should specify it the same way as it is done in the property declaration.



    You set mode of the color measure scale to the "Range". This mode suppose that you specify ranges by yourself in the code or in the XAML You can find example here: http://demos.telerik.com/silverlight/#Map/USA



    You also didn't set colors which will be used by the color measure scale (ShapeFillCollection property). You can find example here: http://demos.telerik.com/silverlight/#Map/USA



    You can find details on using of the color measure scale in our online help:



    http://www.telerik.com/help/silverlight/radmap-features-colorizer.html


    I hope this information is helpful. Please do not hesitate to ask if there are other questions.


    Regards,

    Author nickname

    Telerik

    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.

    Sign up for Free application insights >>
Back to Top