Page 1 of 1

Google Maps: Map Options in JavaScript

Posted: Fri Jun 12, 2015 1:22 am
by bob

I am trying to customize my Google Map in Appery, but I cannot seem to get the Appery map object to accept map options (specifically I am trying to remove the zoom slider and street view icons). I have followed the Google Maps API documentation for using Javascript, but I still cannot get it to work. Any ideas on how to allow map options in Appery with Javascript? Thank-you.


Google Maps: Map Options in JavaScript

Posted: Fri Jun 12, 2015 9:49 am
by Serhii Kulibaba

Hello Bob,

Could you clarify what have you tried and what exactly does not work?


Google Maps: Map Options in JavaScript

Posted: Sat Jun 13, 2015 6:02 am
by bob

Yes, thank-you for the reply.
I have tried creating creating a map object (as per the Google Maps API for Javascript), and then assigning it to the appery map object (Apperyio("google_map").gmap). I have also tried using the set function to set options for the map:

var map = Apperyio("google_map").gmap;

var mapOptions = {

Code: Select all

     zoomControl: false,  

     mapTypeControlOptions: { 

         mapTypeControlOptions: { 

             mapTypeIds: [google.maps.MapTypeId.ROADMAP, 'map_style'] 
         } 
     } 
 }; 

map.set(mapOptions);

as well as map.set('zoomControl', false);

Thank-you


Google Maps: Map Options in JavaScript

Posted: Sat Jun 13, 2015 3:32 pm
by Evgene Karachevtsev

Hello Bob,

Maybe in your case it would be better to use an HTML component instead of map component. You would have more possibilities to work with google api. Please look at this tread, it will provide you a few examples:
https://getsatisfaction.com/apperyio/...