bob
Posts: 0
Joined: Fri Jun 12, 2015 1:22 am

Google Maps: Map Options in JavaScript

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.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Google Maps: Map Options in JavaScript

Hello Bob,

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

bob
Posts: 0
Joined: Fri Jun 12, 2015 1:22 am

Google Maps: Map Options in JavaScript

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

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Google Maps: Map Options in JavaScript

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/...

Return to “Issues”