Register  |  Login   Search
ThinkGeo - GPS Tracking and Mapping Solutions  |  Home  |  Cygnus Track  |  Developer Community
 
LivePerson Chat

Discussion Forums

The online community for users of Map Suite GIS components

Not use predefined ZoomLevels?
Last Post 10-06-2008 06:14 AM by Batman. 3 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
TedUser is Offline
Level 1
Level 1
Posts:19

--
10-03-2008 04:22 AM

Keywords: zoomlevel, zoomlevels, predefined, custom

Hey!

Right now I've been testing the ZoomLevels and how to use them. Since its a lot of work to get the graphics right so that the map looks OK I want to build a sort of "editor" for my map/layers so that I can, in runtime, change the colors, width and display option (such as when to display a layer). Since ZoomLevels are properties of the Layer its hard to code it, but there must be a way to set your own ZoomLevels?

Then I can have fields and let the user specify Upper and Lower boundaries and within those boundaries specify how the layer should look. If I always print the Map.CurrentScale that shouldnt be a problem I think.

So, in short: How can I define my own ZoomLevels?

BatmanUser is Offline
MVP
MVP
Posts:99
Avatar

--
10-04-2008 09:27 PM
Ted,

Great Question!

This is very easy to do with the CustomZoomLevels API, you can easily create as many zoom levels as you want and add them to the CustomZoomLevels collection off of the Layer. You can add GeoStyles and TextStyles to the custom zoom levels just like a predefined zoom level. Below is some sample code that I hope will help.

Dim mYZoomLevel As New ZoomLevel(upperExtent, lowerExtent)
'Put all your rendering logic for the zoom level just like a regular zoom level

'Add Custom zoom level to Layer
myLayer.CustomZoomLevels.Add(mYZoomLevel)

Let us know if you have any questions!
TedUser is Offline
Level 1
Level 1
Posts:19

--
10-06-2008 06:05 AM

Hey!

Yep, I found it just after I posted, hehe =) Tried to abort the thread, but I couldnt. Anyways, good to have in the archive if someone does a search =)

BatmanUser is Offline
MVP
MVP
Posts:99
Avatar

--
10-06-2008 06:14 AM
No problem, the more posts the better!
You are not authorized to post a reply.

Active Forums 4.1