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

Map Report Item - Map Bounderies & Zoom

1 Answer 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
JOHN STRUCHYNSKI
Top achievements
Rank 1
JOHN STRUCHYNSKI asked on 21 Mar 2014, 06:18 PM

Hi,

I am working on a report that will show the number of enrollments affiliated with a particular school. Only one state can be picked for the report.

Example:
Show the state of North Dakota along with plotted schools throughout the state.

I need help finding the following information:

a) How do I set the map boundaries to only display North Dakota?
When I have plotted schools in North Dakota only sounding states are also being displayed on the map. This makes it harder to see where is ND the schools are located due to map being too big.

b) Is there a way to set the initial zoom?

Any help with this is greatly appreciated.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Ivan Hristov
Telerik team
answered on 26 Mar 2014, 03:28 PM
Hi John,

We have already answered to your inquiry through the support ticketing system, but it would be better to share some parts of our answer here as well for anyone concerned, because it explains in details how the zoom and the automatic positioning of the map works.

Quote:
The surrounding states are visible because we are using tiles to display the map. We "stitch" these tiles to form a background image and plot the location points onto it. That's why we can't exclude a region or a polygon of the map - it would simply remove the tile where its bounds lie. Our plans for Telerik Reporting Q2 2014 include using shape files and geometry/geography data types from SqlServer - this way you will be able to show only the desired polygons. As soon as we are done, we will announce it on our What's New page, so you can take a peek every now and then.

Now up to your questions:
    The map control automatically changes the viewport location and zoom level based on the location points you have provided only if you have not set a map extent (i.e. its LatitudeMin, LatitudeMax, LongitudeMin and LongitudeMax properties should be reset to NaN. You can reset the properties right-clicking on them in the property grid and selecting Reset from the context menu). Such a behavior is demonstrated in our sample report SalesByRegionDashboard (distributed along with the Telerik Reporting installation), where the user selects a country and the viewport is being preselected according to the location points.

    In case you have defined the extent coordinates (usually by dragging or zooming the map control), the viewport becomes static and will not be changed when new location points are supplied by the data source. In this state the map control could be used as a static map with default position and zoom level.
 


Hope it helps. If you have more questions, please do not hesitate to ask.

Regards,
Ivan Hristov
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
General Discussions
Asked by
JOHN STRUCHYNSKI
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Share this question
or