Forum


Replies: 2   Views: 3548
Google maps
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by wnha  · 21-11-2012 - 18:46

Hi,

I need to get google maps into word documents.
But it's not working the code below.

==================================================================

$url = "<img src=\"http://maps.googleapis.com/maps/api/staticmap?center=-15.800513,-47.91378&zoom=11&size=200x200&sensor=false\">";
$docx->embedHTML($url);

==================================================================

The <img> tag is available in the web page, but it is not able to embed to document file.

I also tested the code below, but it's not working at all.

==================================================================
$docx->replaceTemplateVariableByHTML('ADDRESS', 'inline', '<img src="http://maps.google.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=14&size=50x50&maptype=roadmap&sensor=false"/>');
==================================================================

Let me know how can I generate this document please.
Help me.

Thank you.

Posted by admin  · 11-04-2013 - 12:13

Hello,

You should get that image on your own and then add it do a new DOCX or a template.

Regards.