Page 1 of 2

Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 3:42 am
by Tommy B

I would like to set my default view to satellite when displaying a googlemap. I've tried several options but cant seem to get anything to work.


Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 3:53 am
by maxkatz

Can you show us what you tried?


Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 4:14 am
by Tommy B

map.maptype("satellite");
map.maptype.satellite;
map.options['maptype']= ''satellite";


Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 4:46 am
by Igor

Please make your app link public and send us that link.


Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 4:50 am
by Tommy B

I have shared with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a.


Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 4:55 am
by Igor

What is the name of App?


Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 5:06 am
by Tommy B

AirMon


Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 4:21 pm
by Tommy B

Bump


Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 9:27 pm
by Igor

Hello Tommy,

Working on it now, I'll update.


Set Google Map to default to Satellite View with displayed

Posted: Sat Jun 08, 2013 10:54 pm
by Igor

To set default view to satellite you should use next steps:

  1. Remove success event for "ViewDataList" service

  2. Create new JS file with code:
    code
    function initialize() {
    var myOptions = {
    zoom :8,
    center: new google.maps.LatLng(37.63, -122.424),
    mapTypeId: google.maps.MapTypeId.SATELLITE
    };
    var map = new google.maps.Map($('div[dsid="googlemap_63"]').get(0), myOptions);
    }
    /code

  3. Remove "Page show event" from "resultsSingle" screen

  4. On "resultsSingle" screen add load event with JavaScript code
    code
    initialize();
    /code

  5. On "resultsSingle" screen add "Invoke service" select service name "ViewDataList"

    Please look at our tutorials:
    http://docs.appery.io/tutorials/build...
    http://docs.appery.io/tutorials/addin...