Mam taki kod

  1. <script type="text/javascript">
  2. //<![CDATA[
  3.  
  4. var geocoder ;
  5. var icon ;
  6. var gicon ;
  7. var map ;
  8.  
  9. function load()
  10. {
  11. map = new GMap2(document.getElementById("map"));
  12. var start = new GLatLng(52.23492253262223, 20.981011390686035);
  13. map.setCenter(start, 3);
  14.  
  15. map.addControl(new GLargeMapControl());
  16. map.addControl(new GMapTypeControl());
  17. map.addControl(new GScaleControl()) ;
  18. map.addControl(new GOverviewMapControl()) ;
  19. geocoder = new GClientGeocoder() ;
  20.  
  21. var address = unescape(location.search.substring(1,location.search.length)) ;
  22. address = address.replace(/\+/g, ' ') ;
  23. showAddress(address) ;
  24.  
  25. }
  26.  
  27. function showAddress(address)
  28. {
  29.  
  30. document.title = "Mapa google" ;
  31. geocoder.getLatLng( address, function(point)
  32. {
  33. if (!point)
  34. {
  35. alert(address + " Nie znaleziono lokacji")
  36. } else
  37. {
  38. map.setCenter(point, 13);
  39. var marker = new GMarker(point);
  40. map.addOverlay(marker);
  41.  
  42. marker.openInfoWindowHtml('<span style="color: #2A1FAA; font-weight: bold;" >Lokacja właściciela aukcji</span> <br /><br /><small><small>Wpisz adres aby sprawdzić dojazd forma kod miasto (np. 73-100 miechatów) </small></small><br /><form action="dir_map.htm" onsubmit="post"><input type="text" size="50" id="fromAddress" name="from" value=""/><input type="hidden" size="50" id="toAddress" name="to" value="' + address + '" /><br /><input name="submit" type="submit" value="Do adresu ..." /></form>');
  43. }
  44. }) ;
  45. }
  46.  
  47. //]]>
  48.  
  49. </script>
  50.  
  51.  
  52. </style>
  53.  
  54. </head>
  55. <body bgcolor="#ffffff" text="black" link="#444444" alink="gray" vlink="#111111" onload="load();" onunload="GUnload()">
  56. <div align="center" valign="center" >
  57.  
  58.  
  59. <table width="100%" height="100%" border=0 valign="center" align="center" cellPadding=2 cellSpacing=2>
  60. <tr width="100%">
  61. <script language="javascript">
  62. <!--
  63. if( window.innerHeight )
  64. {
  65. var width = 500 ;
  66. var height = 500 ;
  67. } else
  68. {
  69. var width = 500 ;
  70. var height = 500 ;
  71. }
  72. document.write('<td valign=center align=center width=' + width + '><div valign="center" align="center" id="map" style="width: ' + width + 'px; height:' + height + 'px; border: thin solid black;"></div>') ;
  73. // -->
  74. </script>


WYmuszany jest z linku

  1. <a class="mapping_link" href="java script:winimage('./mapa-google.html?73-110, Zachodnio-Pomorskie stargard szczeciński Polska','630','550')">mapa</a>


no i jest problem bo działa wszystko oki puki w nazwie miasta nie pokaże się polski znak

Próbowałem nadać charset utf8 ale i tak nie działa

tyle co zobaczyłem że title czyta z

  1. document.title = "Mapa google" ;
  2. geocoder.getLatLng( address, function(point)


niewiem czy dobrze myśle bo na api się nie znam ale czy kodowanie może wyznaczać geocoder ?