budimir Posted December 23, 2010 Share Posted December 23, 2010 Hey guys, I have stored a google map link into a database. When I try to display it from database using the command below <?php echo $google_map; ?> I get this output, but I can't display a map. <iframe width="640" height="480" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=hr&geocode=&q=smi%C4%8Diklasova+3,+karlovac,+croatia&sll=37.0625,-95.677068&sspn=50.910968,135.263672&ie=UTF8&hq=&hnear=Tadije+Smi%C4%8Diklasa,+Karlovac,+Republika+Hrvatska&t=h&ll=45.487155,15.55089&spn=0.028883,0.054932&z=14&iwloc=A&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&source=embed&hl=hr&geocode=&q=smi%C4%8Diklasova+3,+karlovac,+croatia&sll=37.0625,-95.677068&sspn=50.910968,135.263672&ie=UTF8&hq=&hnear=Tadije+Smi%C4%8Diklasa,+Karlovac,+Republika+Hrvatska&t=h&ll=45.487155,15.55089&spn=0.028883,0.054932&z=14&iwloc=A" style="color:#0000FF;text-align:left">Prikaz veće karte</a></small> Can you tell me why?? When try to copy that directly to HTML it works perfectly!!! I'm confused! Quote Link to comment https://forums.phpfreaks.com/topic/222525-echo-google-map/ Share on other sites More sharing options...
BlueSkyIS Posted December 23, 2010 Share Posted December 23, 2010 chances are that you need to encode/decode the url to make it valid before sending it to the browser. have you viewed source in your browser to see if the output is exactly what it should be? have you checked for javascript errors? Quote Link to comment https://forums.phpfreaks.com/topic/222525-echo-google-map/#findComment-1150882 Share on other sites More sharing options...
budimir Posted December 23, 2010 Author Share Posted December 23, 2010 No, I didn't get any error messages. That's why I'm confused. As I understand I just get displayed what is stored in the variable, but the map won't run. Is there anything else I need to do to run the map? Quote Link to comment https://forums.phpfreaks.com/topic/222525-echo-google-map/#findComment-1150890 Share on other sites More sharing options...
BlueSkyIS Posted December 23, 2010 Share Posted December 23, 2010 chances are that you need to encode/decode the url to make it valid before sending it to the browser. have you viewed source in your browser to see if the output is exactly what it should be? Quote Link to comment https://forums.phpfreaks.com/topic/222525-echo-google-map/#findComment-1150901 Share on other sites More sharing options...
budimir Posted December 23, 2010 Author Share Posted December 23, 2010 OK, I solved it! I have used TinyMCE to insert the code to database and probably TinyMCE ut something inside the code. I just copied the code as plain text and now it's OK. Thanks for the effort! Quote Link to comment https://forums.phpfreaks.com/topic/222525-echo-google-map/#findComment-1150902 Share on other sites More sharing options...
BlueSkyIS Posted December 23, 2010 Share Posted December 23, 2010 yes, tinymce probably changed the html entities into their html encoded counterparts. that's why it often helps to look at the actual HTML so you can see the odd encoding. Quote Link to comment https://forums.phpfreaks.com/topic/222525-echo-google-map/#findComment-1150903 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.