Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #458907

    on google_maps.php i added two new arrays to set up weather there is a frontend choice of the MapTypeID
    (Terrain, Roadmap, Hybrid, Satellite) by this:

    array(	
    	"name" 	=> __("Display MapType Control?", 'avia_framework' ),
    	"desc" 	=> __("Check to display the MapType control at the top right side of the map", 'avia_framework' )  ,
    	"id" 	=> "maptype_control",
    	"std" 	=> "",
    	"type" 	=> "checkbox"),
    							
    							
    array(
    	"name" 	=> __("Map View Setup", 'avia_framework' ),
    	"desc" 	=> __("Choose the Map View of your map", 'avia_framework' ),
    	"id" 	=> "mapview",
    	"type" 	=> "select",
    	"std" 	=> "",
    	"required" 	=> array('maptype_control', 'not', ''),
    	"subtype" => array(
    							
    		__('ROADMAP',  'avia_framework' ) => '',
    		__('SATELLITE',  'avia_framework' ) => 'SATELLITE',
    		__('HYBRID',   'avia_framework' ) => 'HYBRID',
    		__('TERRAIN',  'avia_framework' ) => 'TERRAIN'),
    						
    ),	

    and i do this on line 408:

    $first_level = array('hue', 'zoom', 'saturation', 'zoom_control' , 'pan_control', 'maptype_control', 'mapview', 'mobile_drag_control');
    	foreach($first_level as $var)
    			{
    				self::$js_vars[$this->config['shortcode']][$index][$var] = $atts[$var];
    			}

    but now i realy don’t know what i have to change in shortcode.js

    i did this :

    this.mapVars = {
    	mapMaker: false, //mapmaker tiles are user generated content maps. might hold more info but also be inaccurate
    	mapTypeControl: this.$data.maptype_control,
    	backgroundColor:'transparent',
    	streetViewControl: false,
    	panControl: this.$data.pan_control,
    	zoomControl: this.$data.zoom_control,
    	draggable: mobile_drag,
    	scrollwheel: false,
    	zoom: zoomValue,
    	mapTypeId: google.maps.MapTypeId.(this.$data.mapview),
    	center: new google.maps.LatLng(this.$data.marker[0].lat, this.$data.marker[0].long),
    	styles:[{featureType: "poi", elementType: "labels", stylers: [ { visibility: "off" }] }]
    	};

    but it works for the checkbox decision but not for the selectbox

    how do i solve it ?
    i tried this: on line 543:

    _applyMapStyle: function()
    	{
    		var stylers = [], style = [], mapType;
    			
    		if(this.$data.hue != "") stylers.push({hue: this.$data.hue});
    		if(this.$data.saturation != "") stylers.push({saturation: this.$data.saturation});
                    if(this.$data.mapview != "") stylers.push({mapview: this.$data.mapview});
    • This topic was modified 9 years, 4 months ago by Yigit.
    #459981

    Hi,

    Can you post the link to the site in question? an admin account would be helpful too.

    Regards,
    Josue

    #460002
    This reply has been marked as private.
    #467446

    I wonder if you were able to solve this issue? I’d also like to include the satellite function on an embedded Google map. If you could share the final code changes you used in shortcode.js I’d be very grateful!

    Andrew

    #467931

    this is the point (as i mentioned in the E-Mail to you) i dont know how to change shortcode.js that the selected “View” is set for MapTypeID

    #468011

    Hi!

    Everything is possible, but that would need a lot of work to be done.

    You can contact one of our Customization Contractors, who will help you out with the process.
    http://kriesi.at/contact/customization

    Let us know if we could do anything else, regarding our theme we would be happy to assist you.

    Again we are really sorry that we do not include that on the theme, you can always submit an idea here:
    https://kriesi.at/support/enfold-feature-requests/

    and we can try to product an update that includes it.

    Best regards,
    Basilis

    • This reply was modified 9 years, 4 months ago by Basilis.
    #469866

    I found the following plugin (free version) solved my problem. I paid the few pounds for the full version in order to be able to customise the colour of the map too.
    huge-it.com/google-map

    Andrew

    #470134

    Well this is for a featured request best. I have map press pro for a long time and it works well in my way. But it might be a nice option to stand appart from competition to other framework wordpress themes!

    so can be closed now

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘adding on Google Maps a select box for MapTypeID’ is closed to new replies.