dmdave114 Posted December 13, 2016 Share Posted December 13, 2016 Hi, I have a problem with add api to map. Somebody can help? / Cześć, mam problem z dodanie api do map. Ktoś potrafi pomóc? Link to comment Share on other sites More sharing options...
0 dmdave114 Posted December 14, 2016 Author Share Posted December 14, 2016 (edited) moduł od prestabrain. Wszystko już ogarnięte.dziękuje w pomocy przy nakierowaniu. Edited December 14, 2016 by dmdave114 (see edit history) Link to comment Share on other sites More sharing options...
0 endriu107 Posted December 13, 2016 Share Posted December 13, 2016 Zobacz to: http://blog.belvg.com/how-to-fix-google-maps-api-error-missingkeymaperror-in-prestashop.html Link to comment Share on other sites More sharing options...
0 dmdave114 Posted December 14, 2016 Author Share Posted December 14, 2016 niestety wszystko wykonałem jak trzeba nadal nic. Robiłem tym modułem tego z mijnprestashop.nl i również nie działa. Link to comment Share on other sites More sharing options...
0 e_com Posted December 14, 2016 Share Posted December 14, 2016 Bo to nie jest standardowa strona sklepów tylko contact. A tą mapkę do kontaktu dodaje pewnie jakiś moduł od tego szablonu, albo jest na chama w contact-form.tpl. I tam trzeba szukać i do kodu dodać api_key. Link to comment Share on other sites More sharing options...
0 dmdave114 Posted December 14, 2016 Author Share Posted December 14, 2016 (edited) <div class="box"> <div class="maplocal"> {hook h='displayMapLocal'} </div>to jest z contact-form.tpl Edited December 14, 2016 by dmdave114 (see edit history) Link to comment Share on other sites More sharing options...
0 e_com Posted December 14, 2016 Share Posted December 14, 2016 To sprawdź w pozycjach modułów jaki moduł masz doczepiony do hooka displayMapLocal. I to w tym module trzeba wprowadzić poprawki. Link to comment Share on other sites More sharing options...
0 dmdave114 Posted December 14, 2016 Author Share Posted December 14, 2016 (edited) Mam coś takiego ale tutaj nie widzę opcji dodania APIModuł który jest w contact to Pts Map Locator<div class="ptsmaplocator"> <h3 class="page-subheading">{l s='Map Locator' mod='ptsmaplocator'}</h3> <div class="box-content"> {if !empty($pts_description)} <div class="description">{$pts_description}</div> {/if} <div class="maplocator"> <div id="directory-main-bar-{$mod_id}" class="gmap"></div> </div> <div class="box-shop"> {if isset($pts_stores)} {assign var='i' value=0} {foreach $pts_stores as $key=>$location} {math equation="x + y" x=$i y=1 assign=i} <div class="item-location" id="location-{$location["id_store"]}" data-id="shop{$i}" data-lat="{$location["latitude"]}" data-lon="{$location["longitude"]}"> <div class="shop-title"> <i class="icon-map-marker"></i>{$location['name']} </div> <div class="shop-address">{$location['address1']}</div> </div> {/foreach} {/if} </div> </div> </div> <script type="text/javascript"> {literal} var mapDiv, map, infobox; jQuery(document).ready(function($) { mapDiv = $("#directory-main-bar-{/literal}{$mod_id}{literal}"); mapDiv.height({/literal}{$pts_height}{literal}).gmap3({ map: { options: { "draggable": true ,"mapTypeControl": true ,"mapTypeId": google.maps.MapTypeId.ROADMAP ,"scrollwheel": true //Alow scroll zoom in, zoom out ,"panControl": true ,"rotateControl": false ,"scaleControl": true ,"streetViewControl": true ,"zoomControl": true } } ,marker: { values: [{/literal} {assign var='i' value=0} {foreach $pts_stores as $location}{literal} [spam-filter]/literal} {math equation="x + y" x=$i y=1 assign=i} {literal} latLng: [{/literal}{$location['latitude']}, {$location['longitude']}],{literal} options: { {/literal} icon: "{$location['icon']}", //shadow: "icon-shadow.png", {literal} }, {/literal} data: '<div class="marker-holder">\n\ <div class="marker-content with-image">{if $location.has_picture}<img src="{$img_store_dir}{$location.id_store}.jpg" alt="">{/if} \n\ <div class="map-item-info">\n\ <div class="title">'+"{$location['name']}"+'</div>\n\ <div class="address">'+"{$location['address1']}"+'</div>\n\ <div class="description">'+"{$location['working_hours']}"+'</div>\n\ </div><div class="arrow"></div>\n\ <div class="close"></div>\n\ </div>\n\ </div>\n\ </div>', 'id':'shop{$i}' {literal[spam-filter],{/literal} {/foreach} {literal} ], options:{ draggable: false, //Alow move icon location }, cluster:{ radius: 20, // This style will be used for clusters with more than 0 markers 0: { content: "<div class='cluster cluster-1'>CLUSTER_COUNT</div>", width: 90, height: 80 }, // This style will be used for clusters with more than 20 markers 20: { content: "<div class='cluster cluster-2'>CLUSTER_COUNT</div>", width: 90, height: 80 }, // This style will be used for clusters with more than 50 markers 50: { content: "<div class='cluster cluster-3'>CLUSTER_COUNT</div>", width: 90, height: 80 }, events: { click: function(cluster) { map.panTo(cluster.main.getPosition()); map.setZoom(map.getZoom() + 2); } } }, events: { click: function(marker, event, context){ map.panTo(marker.getPosition()); infobox.setContent(context.data); infobox.open(map,marker); // if map is small var iWidth = 260; var iHeight = 300; if((mapDiv.width() / 2) < iWidth ){ var offsetX = iWidth - (mapDiv.width() / 2); map.panBy(offsetX,0); } if((mapDiv.height() / 2) < iHeight ){ var offsetY = -(iHeight - (mapDiv.height() / 2)); map.panBy(0,offsetY); } } } } },"autofit"); map = mapDiv.gmap3("get"); infobox = new InfoBox({ pixelOffset: new google.maps.Size(-50, -65), closeBoxURL: '', enableEventPropagation: true }); mapDiv.delegate('.infoBox .close','click',function () { infobox.close(); }); $(".box-shop .item-location").click(function(){ var id = $(this).attr('data-id'); var marker = $("#directory-main-bar-{/literal}{$mod_id}{literal}").gmap3({ get: { id: id } }); google.maps.event.trigger(marker, 'click'); map.setCenter(marker.getPosition()); map.setZoom(15); }); }); {/literal} </script> Edited December 14, 2016 by dmdave114 (see edit history) Link to comment Share on other sites More sharing options...
0 e_com Posted December 14, 2016 Share Posted December 14, 2016 Pewnie moduł ma jeszcze plik javascript łączący się z google map. Albo w kontrolerze modułu może to równie dobrze siedzieć. To niestandardowy moduł od presty, to tylko powróżyć mogę. Link to comment Share on other sites More sharing options...
Question
dmdave114
Hi, I have a problem with add api to map. Somebody can help? / Cześć, mam problem z dodanie api do map. Ktoś potrafi pomóc?
Link to comment
Share on other sites
8 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now