I have not. Do I just put it in frontend/templates/layout.php? I tried that now, and it added <script type="text/javascript" src="http://www.google.com/jsapi? key=ABQIAAAA5obbqtnOwlU7fJ78TAw-0BT4JpDCwIgIRnp1ddTI6MvRVBGLbhQyWub0Cef- VHzdDo70uUVQrZtOIA"></script> to the source, but it is still not loading the map, just a large blank area where the map would be....
- Zach On Jul 15, 10:03 am, Sebastian Müller <[email protected]> wrote: > Hi Zach, > > have you setup <?php include_javascripts() ?> in the header of your > layout.php ? > > BR > Sebastian > > Zach schrieb: > > > > > > > Sebastian, > > > I double checked my API keys and they are correct, but I'm not sure it > > is being used... > > The code in your test template is the same as what I'm using. > > > Hi Fabrice, > > I am already using $gMap = $sf_data->getRaw('gMap'); > > I double checked, and I am connected to the Internet :) > > I think your last suggestion is my problem and goes along with what > > Sebastian has been suggesting... I viewed the html source, but could > > not find src="..." > > this is what I have: > > > <h1>The Map</h1> > > <div id="map" style="width:512px;height:512px;"></div> > > Search on the map: > > <form onsubmit="geocode_and_show(document.getElementById > > ('search_location_input').value);return false;"> > > <input type="text" id="search_location_input" /> > > <input type="submit" id="search_location_submit" value="Search" / > > </form> > > <br /> > > <br /> > > <br /> > > <div id="console_div" style="font-size:large"> > > </div> > > > <br /> > > <!-- Javascript included at the bottom of the page --> > > <script type="text/javascript"> > > //<![CDATA[ > > > google.load("maps", "2"); > > > var map = null; > > // Call this function when the page has been loaded > > function initialize() > > { > > if (GBrowserIsCompatible()) > > { > > map = new google.maps.Map2(document.getElementById("map")); > > map.setCenter(new google.maps.LatLng(48.845398, 2.34258), 10); > > map.enableDoubleClickZoom(); > > map.addControl(new google.maps.LargeMapControl()); > > > marker = new google.maps.Marker(new google.maps.LatLng > > (51.245475,6.821373));map.addOverlay(marker); > > marker = new google.maps.Marker(new google.maps.LatLng > > (46.262248,6.115969));map.addOverlay(marker); > > marker = new google.maps.Marker(new google.maps.LatLng > > (48.848959,2.341577));map.addOverlay(marker); > > marker = new google.maps.Marker(new google.maps.LatLng > > (48.718952,2.21918));map.addOverlay(marker); > > marker = new google.maps.Marker(new google.maps.LatLng > > (47.37642,8.547995));map.addOverlay(marker); > > > } > > } > > google.setOnLoadCallback(initialize); > > document.onunload="GUnload()"; > > > //]]> > > </script> > > > I have done a symfony cc. > > When looking through the sf web debug toolbar code in the source I > > found this: > > > parameterHolder: > > helper/asset/auto/httpmeta: > > Content-Type: text/html; charset=utf-8 > > helper/asset/auto/javascript: > > /sf/sf_web_debug/js/main: /sf/sf_web_debug/js/main > > /sfEasyGMapPlugin/js/sfEasyGMapPlugin.js: /sfEasyGMapPlugin/js/ > > sfEasyGMapPlugin.js > > /sfPrototypePlugin/js/prototype: /sfPrototypePlugin/js/prototype > > /sfPrototypePlugin/js/scriptaculous: /sfPrototypePlugin/js/ > > scriptaculous > > http://www.google.com/jsapi?key=ABQIAAAA5obbqtnOwlU7fJ78TAw-0BT4JpDCw... > >http://www.google.com/jsapi?key=ABQIAAAA5obbqtnOwlU7fJ78TAw-0BT4JpDCw... > > > That has the correct API key, but I don't know why it's not displaying > > as the src like you showed. > > > Thanks for continuing to help me! > > I appreciate it very much, > > > Zach > > > On Jul 15, 4:29 am, Fabrice B <[email protected]> wrote: > >> Hi Zach, > > >> possible sources of errors : > >> - you are using output escaping. In this case you should write in > >> your template $gMap = $sf_data->getRaw(’gMap’); to disable output > >> escaping on the $gMap variable > >> - you are not connected to the Internet. This may seem stupid but > >> that can happen :-) In that case, you will see using firebug that the > >> javascript file of Google is empty > >> - you did not set your api keys correctly. This is easy to check, you > >> just need to find the > >> <script type="text/javascript" src="http://www.google.com/jsapi? > >> key=ABQIAAAAR8dhgMmvaR96TE0zbrZpPhQFiMk9rCRpAVfjZuYFZtH1h1BR3xSPD2PKz9UJARR > >> HopRTimtYjbDKAA"></ > >> script> > >> line in your html source. If the key is empty, then that's where you > >> should look for your mistake. symfony cc might be a solution in that > >> case :-) > > >> Regards, > > >> Fabrice Bernhard > >> --http://www.theodo.fr > > >> On Jul 15, 10:25 am, Sebastian Müller > > >> <[email protected]> wrote: > >>> Hi Zach, > >>> no. Because for the normal test, you didn't need the web folder from > >>> this plugin. I think there is something wrong with your API key. > >>> Loog on you html source code and check which API key is used. Make sure > >>> thats the right key for you local/test url! > >>> Here is my test template: > >>> <?php use_helper('GMap') ?> > >>> <?php $gMap = $sf_data->getRaw('gMap'); ?> > >>> <?php include_map($gMap); ?> > >>> <?php include_map_javascript($gMap); ?> > >>> Test this, maybe it works also for you. > >>> BR > >>> Sebastian > >>> Zach schrieb: > >>>> Sample 1 does not work for me. When I go here mydomain/ > >>>> frontend_dev.php/sfEasyGMapPlugin/sample1 I just get the text "The > >>>> Map" a big white space where the map should be and a search box to > >>>> search the map. > >>>> Did you move the the entire contents of plugins/sfEasyGMapPlugin/web > >>>> to web/sfEasyGMapPlugin when you were setting it up? > >>>> Thanks, > >>>> Zach > >>> -- > >>> Sebastian Müller > >>> [email protected]http://www.new-mediafactory.de > > -- > Sebastian Müller > [email protected]http://www.new-mediafactory.de --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
