Witam,

Znalazłem taki kod mapy który odpowiada za generowanie jej

[JAVASCRIPT] pobierz, plaintext
  1. var podgladFirmy = function(){
  2. this.map = null;
  3. this.locationMarker = null;
  4. this.markerIcon = new GIcon(null, "http://maps.google.com/mapfiles/kml/pal5/icon13.png", null, "http://maps.google.com/mapfiles/kml/pal5/icon13s.png");
  5.  
  6. this.lat = null;
  7. this.lng = null;
  8.  
  9. this.icon = new GIcon(G_DEFAULT_ICON);
  10. this.icon.iconSize = new GSize(32,32);
  11. this.icon.shadowSize = new GSize(56,32);
  12. this.icon.iconAnchor = new GPoint(16,32);
  13. this.icon.infoWindowAnchor = new GPoint(16,0);
  14. this.icon.image = "http://maps.google.com/mapfiles/kml/pal5/icon13.png";
  15. this.icon.shadow = "http://maps.google.com/mapfiles/kml/pal5/icon13s.png";
  16. };
  17.  
  18. podgladFirmy.prototype.init = function(){
  19. var that = this;
  20. var lokalizacja = $('div').is('#lokalizacja');
  21. if(lokalizacja){
  22. if (GBrowserIsCompatible()) {
  23. that.lat = $('#f_lat').val();
  24. that.lng = $('#f_lon').val();
  25. var zoom = 14;
  26. that.map = new GMap2(document.getElementById('coordinates'));
  27. that.map.setCenter(new GLatLng(that.lat, that.lng), zoom);
  28. that.map.addControl(new GLargeMapControl());
  29. that.map.addControl(new GMenuMapTypeControl());
  30.  
  31. that.putLocationMarker(new GLatLng(that.lat, that.lng));
  32. }
  33. }
  34. };
  35.  
  36. podgladFirmy.prototype.putLocationMarker = function(latlng, center){
  37. var that = this;
  38. var currentZoom = that.map.getZoom();
  39. $('#gmapsZoom').val(currentZoom);
  40. center = typeof(center) != 'undefined' ? center : false;
  41.  
  42. //usuwanie starego markera
  43. if (that.locationMarker){
  44. that.map.removeOverlay(that.locationMarker);
  45. }
  46.  
  47. //centrowanie mapy
  48. if(center){
  49. that.map.setCenter(latlng, 13);
  50. }
  51.  
  52. //tworzenie markera
  53. that.locationMarker = new GMarker(latlng, {
  54. icon : that.icon,
  55. title:'Przesuń by dokładnie określić położenie swojej firmy.',
  56. draggable:false
  57. });
  58. //dodawanie markera do mapy
  59. that.map.addOverlay(that.locationMarker);
  60. };
  61.  
  62. AC.registerController(new podgladFirmy);
[JAVASCRIPT] pobierz, plaintext


oraz w pliku html jest tak

  1. <div id="lokalizacja">
  2. <h1 class="myriad title">Lokalizacja</h1>
  3. <div id="coordinates" style="width:100%;height:250px;">Ładowanie mapy...</div>
  4. <input type="hidden" id="f_lat" value="{$firma.f_lat}" />
  5. <input type="hidden" id="f_lon" value="{$firma.f_lon}" />
  6. </div>


Tylko google wyrzuca mi komunikat że jest błąd a dokładniej chodzi o to że ten kod niby jest w API2 i tu pojawia się problem ponieważ nie znam się na tym i nie wiem jak to poprawić pod API3, mogę liczyć na waszą pomoc questionmark.gif