This is a migrated thread and some comments may be shown as answers.

Show custom Shapefiles in RadMap - EPSG

3 Answers 141 Views
Map
This is a migrated thread and some comments may be shown as answers.
Marcelo
Top achievements
Rank 1
Marcelo asked on 06 Dec 2013, 10:35 AM
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

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 10 Dec 2013, 08:47 PM
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 >>
0
Marcelo
Top achievements
Rank 1
answered on 17 Dec 2013, 11:19 AM
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


0
Andrey
Telerik team
answered on 18 Dec 2013, 11:13 AM

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 >>
Tags
Map
Asked by
Marcelo
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Marcelo
Top achievements
Rank 1
Share this question
or