Jump to content
  • 0

Defining default map view to display


Redding

Question

Is there a way to choose the default type of map view to display when using the Google or Yahoo map mashups?

Preferably I would like to be able to display the Google terrain view as the default map view in search results. Failing that the satellite view would be the second best option.

Can this be done?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello,

It is possible to change the map view. I've tried it with Google maps and it worked.

Basically you'd need to set it via javascript in your webpage source code.

The following snippet

//begin snippet

function init () {

map.setMapType(G_PHYSICAL_MAP);

}

google.setOnLoadCallback(init);

//end snippet

should be placed after the Google or Yahoo deploy code provided in the Map Mashup Instructions by Caspio.

Note that:

- the snippet above is for Google maps API - for Yahoo maps, proper changes should be made to conform with Yahoo Maps API.

- The constant G_PHYSICAL_MAP defines the physical map view. You can also use G_NORMAL_MAP (default), G_SATELLITE_MAP, or G_HYBRID_MAP. Again, these constants are defined under Google maps API.

You can refer to Google maps API at:

http://code.google.com/apis/maps/docume ... index.html

and Yahoo maps API at:

http://developer.yahoo.com/maps/flash/V ... rence.html

Hope this helps.

Silvio.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...