I have MyMap installed, activated, etc. Have found where the user can create his own map. The question is, what do I need to do to get the maps to show on the profile or front page or whatever?
The readme.txt talks about adding it to your theme template and to use
Code
$pnRender = pnRender::getInstance('legal');
// create map
$coords[] = array(
'lat' => 48.922499263758255,
'lng' => 11.25
);
$coords[] = array(
'lat' => 42.922499263758255,
'lng' => 13.25,
'title' => 'testtitle',
'text' => 'and some <strong>content</strong> for this bubble',
);
$mapcode = pnModAPIFunc('MyMap','user','generateMap',array(
'coords' => $coords, // must be an array
'maptype' => 'HYBRID', // HYBRID, SATELLITE or NORMAL
'width' => 640, // width in pixels
'height' => 480, // height in pixels
'zoomfactor' => 13 // zoomfactor - 1 is closest
)); // zoomfactor only relevant if there is
// only one marker displayed!
$pnRender->assign('card_html_code',$mapcode);
// create map
$coords[] = array(
'lat' => 48.922499263758255,
'lng' => 11.25
);
$coords[] = array(
'lat' => 42.922499263758255,
'lng' => 13.25,
'title' => 'testtitle',
'text' => 'and some <strong>content</strong> for this bubble',
);
$mapcode = pnModAPIFunc('MyMap','user','generateMap',array(
'coords' => $coords, // must be an array
'maptype' => 'HYBRID', // HYBRID, SATELLITE or NORMAL
'width' => 640, // width in pixels
'height' => 480, // height in pixels
'zoomfactor' => 13 // zoomfactor - 1 is closest
)); // zoomfactor only relevant if there is
// only one marker displayed!
$pnRender->assign('card_html_code',$mapcode);
then it says: "The variable $card will have the generated HTML-text. You can
now assign this variable to your template and use the map where-
ever you need it!"
But I have no clue where to put that code. It seems that it's already in my default theme/template since I have the create/edit maps in the my account section.
Any and all help is greatly appreciated. Especially the "Dummies" version.
Thanks in advance,
Mickey
