Hello,
I need only my country on my map, not the whole world. How can I do that, I am working on that for 4 hours still couldn't solve.
Could you please help me?
Thanks in advance.
Hello,
I need only my country on my map, not the whole world. How can I do that, I am working on that for 4 hours still couldn't solve.
Could you please help me?
Thanks in advance.
We are going to need more information from you. With what data are you working on? Do you have your own layers such as shapefile? For that, you might want to use some techniques such as stopping some features from drawing. There is a sample app in the section "Feature Layers" of the "How Do I" samples. Or you might want to generate a spatial index for only the records you need. Or you might even want to create new layers from existing ones with only the records that you need.
Are you using the World Map Kit overlay, or the Google map overlay etc? For those scenarios, what you can do is restrict the viewing area so that your users are not allow to pan to other countries. Or you can have a hiding layer on top of the other countries.
You see that there are many ways to approach what you are facing. Please, give us more details so that we can guide you. Thank you.
I am using World Map Kit overlay. For now, what I need is Turkey map with cities only. I will display the GSM and 3G Call success rate values with a label under cities names.
How can I restrict the viewing area?
Thank you.
We have a sample app in the "How Do I" samples, "Restricted extent" under "Moving Around the map". For Turkey the restricted extent would be something like (24.86,43.97,45.16,34.11). See code below:
using System;
using ThinkGeo.MapSuite.Core;
using ThinkGeo.MapSuite.WebEdition;
namespace CSSamples.Samples.NavigateTheMap
{
public partial class RestrictedExtent : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.FromHtml("#E5E3DF"));
Map1.CurrentExtent = new RectangleShape(28.75,41.18,29.31,40.85); //Sets the initial extent to Istambul.
Map1.MapUnit = GeographyUnit.DecimalDegree;
Map1.RestrictedExtent = new RectangleShape(24.86, 43.97, 45.16, 34.11);//Restricts the extent to Turkey.
WorldMapKitWmsWebOverlay worldMapKitWmsWebOverlay = new WorldMapKitWmsWebOverlay();
Map1.CustomOverlays.Add(worldMapKitWmsWebOverlay);
}
}
}
Thanks alot Val,
It really helped me. Its exactly what I want.
Regards.
You are welcome. If you have any other request, let us know.