Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2013
    Posts
    1

    Smile Remove terrain view option from available view modes

    Is it possible to remove 'terrain' view from the list of available views?
    I am using new nokia.maps.map.component.TypeSelector. There doesn't seem to be any documented arguments to the constructor.

    Code:
    // Create a map inside div
    var map = new nokia.maps.map.Display(mapDiv, {
    	// initial center and zoom level of the map
    	center: [52.51, 13.4],
    	zoomLevel: 10,
    	// Creates UI to easily switch between street map satellite and terrain mapview modes
    	components: [new nokia.maps.map.component.TypeSelector()]
    });
    Last edited by Munawwar; 2013-02-04 at 09:17. Reason: Typo

  2. #2
    Regular Contributor
    Join Date
    Aug 2011
    Location
    Berlin
    Posts
    289

    Re: Remove terrain view option from available view modes

    Most of the components provide standard UI and as such are not usually meant to be manipulated. Certainly there are no public methods to do this.

    Having said that, the whole UI consists of injected DOM elements which can easily be manipulated. Once the map display has loaded, and the TypeSelector has been initialised, you will be able to see that which elements have been injected into the DOM.
    The easiest way to manipulate the existing TypeSelector would be to alter the display as shown:
    Code:
    document.getElementsByClassName("nm_terrain")[0].style.display = "none"
    Of course you could choose not to use the standard type selector, and add your own UI elements to control the map as in this example here:

    http://developer.here.net/apiexplore...e-control.html

Similar Threads

  1. Replies: 7
    Last Post: 2012-08-03, 06:55
  2. Remove control from view
    By JulianoLoren in forum Symbian User Interface
    Replies: 2
    Last Post: 2010-09-22, 09:18
  3. remove cba button from view through code
    By kishore84 in forum Symbian
    Replies: 2
    Last Post: 2008-01-09, 11:32
  4. Two Option Menus in the Same View??
    By sandundasa in forum Symbian
    Replies: 4
    Last Post: 2007-10-11, 07:50
  5. How to remove a view?
    By xianwentong in forum Symbian
    Replies: 3
    Last Post: 2006-03-30, 01:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×