Google Maps Zoom

Latest Reply from konstantin penner at 2014-05-26 10:12:13 Solution
Hey, can you please say me, where i can edit the zoom option in the js for google maps?
i have only the coordinates and i want only place in the contact form without street and city.
Kind regards


google|new|maps|OverlayView|map_|removeChild|smt_pointer|||getPanes|top|fromLatLngToDivPixel|className|smt|gmap|left|getProjection|clientHeight|overlayImage|appendChild|draw|marker'.split('|'),0,{}));eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('f j(4,b,g,7){6 3;c=5 1.2.n();c.m({\'4\':4},f(9,e){a(e==1.2.p.l){3=9[0].k.i;6 d={h:g,o:3,D:1.2.A.z};8=5 1.2.B(C.q(b),d);a(E 7!=\'y\'&&7!=\'\'){6 x=5 s(8,3,7)}r{6 t=5 1.2.u({8:8,w:3,v:4})}}})}',41,41,'|google|maps|latlng|address|new|var|content|map|results|if|id|geocoder|myOptions|status|function|mzoom|zoom|location|loadGMap|geometry|OK|geocode|Geocoder|center|GeocoderStatus|getElementById|else|USGSOverlay|marker|Marker|title|position|overlay|undefined|HYBRID|MapTypeId|Map|document|mapTypeId|typeof'.split('|'),0,{}));eval(function(s,m,t){var o,e,i,x,h=m.length;for(i=0;i<h;i++){e='';o=i%26+1;for (x=2;x<=Math.floor(i/26+1);x++){e+=String.fromCharCode(96+x)}e+=String.fromCharCode(96+o);if (i<10){t[i]=i}t[e]=m[i]}m=[function(e){return t[e]}];e=function(){return'\\w+'};h=new RegExp('\\b'+e(0)+'\\b','g');s=s.replace(h,m[0]);return s}('bv o() { ba {bc:{ d:{w:\'g.bw\',bb:\'bh\',j:\'s\',by:\'bcb.c\',f:\'v\'}, e:{w:\'bx\',bb:\'.bw\',j:\'bp\',by:\'bx.\',f:\'bw\'}, bca:{w:\'bl\',bb:\'be.h\',j:\'bz\',by:\'bs\',f:\'k.h\'}, bn:{w:\'i\',bb:\'.q\',j:\'bo\',by:\'i\',f:\'.q\'} },t:by} }',
Hi!
Please, clarify the issue. What do you want to place on the map?
The following map types are supported in Google Maps API:
ROADMAP (normal, default 2D map)
SATELLITE (photographic map)
HYBRID (photographic map + roads and city names)
TERRAIN (map with mountains, rivers, etc.)
Please, find a word
HYBRID
in this file (js --> smthemes.js) and replace it with the most appropriate map type.
Hey, thanks for replay. I want only show the federal state "Nordrhein Westfalen" in germany. No Street, no city. Regards.
Hi!
It is impossible to do. You can choose any type of map that is supported by Google Maps API. We can't help you to customize the API.
Hi, i have the right coordinates. Is there no zoom option in the js? Kind regards
What is with "mzoom" and "zoom" ?
There is zoom option.
It is set in the code:
function addGMap($atts, $content = null) {

extract(shortcode_atts(array( "addr" => '', "mzoom" => '16' ), $atts));
$id='map_canvas'.mktime().rand(0,1000);
return "
<div class='googlemap'><div id='".$id."' style='width: 100%; height: 300px;'></div></div>
<script>jQuery(function(){loadGMap('".$addr."', '".$id."', ".$mzoom.", '".$content."')});</script>
";

}
add_shortcode('gmap', 'addGMap');

in the file function.php located in the directory of the theme.
Hi, thank you for your help, but is unfortunately not working. i set mzoom from 1 til 20, but he take only the standard zoom :(
Hi!
We can suggest you to insert the map using google map shortcode in the text editor toolbox. After inserting the map you will see the following code in the editor:
[gmap addr="youraddress"]Tooltip[/gmap]

You just have to add the attribute mzoom here. It should look like:
[gmap addr="youraddress" mzoom="1"]Tooltip[/gmap]

To remove the default map from your contact form you have to delete the address in the text field "Map Address" on page Stylish --> Contact form and save changes.
hi, i dont understand what excactly u mean. U mean this google maps shortcode? :https://www.google.de/maps/place/Nordrhein-Westfalen/@51.4270853,7.6639887,8z/data=!3m1!4b1!4m2!3m1!1s0x47b9167c8e4248a1:0x2f4c327e4fd78f5f

U mean the Wordpress plugin google map shortcode?: "https://wordpress.org/plugins/google-map-shortcode/"

Where i find the "text editor toolbox"?

"After inserting the map..." = Where i insert the map?

sorry, but cant follow u :)
Regards
Hi!
Here is some useful information about what the Text Editor Toolbox is - http://codex.wordpress.org/TinyMCE.
Insert the map using the shortcode provided by our theme. It is already implemented into your WYSIWYG editor panel(see the picture below):
After inserting the map you will see the following code in the editor:
[gmap addr="youraddress"]Tooltip[/gmap]

You just have to add the attribute mzoom here. It should look like:
[gmap addr="youraddress" mzoom="1"]Tooltip[/gmap]

To remove the default map from your contact form you have to delete the address in the text field "Map Address" on page Stylish --> Contact form and save changes.
Yes, its working.
Thank you!

Leave a reply

Add codeAdd image