Keyword

Google Map or other Map Integration

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 3 weeks ago #68440 by Nick Texidor
Replied by Nick Texidor on topic Google Map or other Map Integration
Hi Stavros,

The version that Simon posted above is slightly outdated, there is now a component involved :^)

I'll forward you the latest package.

Regards
Nick

Stavros said:I have install the mod_k2dynamap.zip and show normally the google map but it doesn't show the attributes that I have set on the plg_k2maps_V13.zip So I can't see the items on the google map.

Please Log in or Create an account to join the conversation.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
14 years 3 weeks ago #68441 by Nick Texidor
Replied by Nick Texidor on topic Google Map or other Map Integration
Further to Simons post above, please note the files are slightly out of date now... I'm about to make the K2DynaMap extension available from my web site (and then JED), but for now, here's the latest version for you to play with and pick a part!

Please note, this uses a re-named version of Simon's plugin, so if you have K2 Maps installed, you'll need to disable, or uninstall.

Please Log in or Create an account to join the conversation.

More
14 years 2 weeks ago #68442 by PapakiGr
Replied by PapakiGr on topic Google Map or other Map Integration
are you looking something like this: www.mykorinthia.gr/epagelmaties ?

Please Log in or Create an account to join the conversation.

More
14 years 2 weeks ago #68443 by stavroch
Replied by stavroch on topic Google Map or other Map Integration
Exactly. How did you fix it?

Please Log in or Create an account to join the conversation.

  • Nick Texidor
  • Nick Texidor's Avatar
  • Visitor
13 years 9 months ago #68444 by Nick Texidor
Replied by Nick Texidor on topic Google Map or other Map Integration
Hi Frank,

 

I'm actually looking at updating the plugin that is included with the K2DynaMap extension to do just what you've asked.  I'll try and get to this soon, and will let you know when it's available.

 

Regards

Nick


Frank said:

Hi - I just installed the plugin and it works fine. I am wondering if there is also a way to give the user the normal google maps functionality within the K2 map, so he can zoom in/out and scroll away directly on the website?? Now it is more or less a plain picture without functionality. Thanks in advance - Frank
Simon Wells (K2 Support) said:
I also have a K2 Maps Plugin, available on simon.getk2.org, but I attach it here along with a couple of other Map Plugins in case you want to test. Feel free to modify as you wish, but please drop me a message when you have a new version, so that we can share ideas.

Simon,

K2 Support

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #68445 by Thomas Evans
Replied by Thomas Evans on topic Google Map or other Map Integration
Constantinos

I looked at the link you have listed here and we are interested in doing exactly the same thing for our website. We presently have the map but like Frank said it is a static map.  How did you integrate the google map to the items where they are not static?  Maybe you can direct us to where we can download the files you used?  Thanks for the help

Constantinos Griponisiotis said:

are you looking something like this: www.mykorinthia.gr/epagelmaties ?

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #68446 by Mark Beddis
Replied by Mark Beddis on topic Google Map or other Map Integration
Hi Constantinos

I also had a look at your site and it is exactly what I need to do - it is really good. 

 

Would it be possible to let me know what you used and how you did it?

 

Thank you

 

Mark

 

 

Constantinos Griponisiotis said:

are you looking something like this: www.mykorinthia.gr/epagelmaties ?

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #68447 by stavroch
Replied by stavroch on topic Google Map or other Map Integration
You have to wait the new version of nick.texidor.com/

Great job ;)

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #68448 by Mark Beddis
Replied by Mark Beddis on topic Google Map or other Map Integration
Hi Stavros

Thanks for the reply. 

 

In case anyone else is looking for a solution, what I have done is mododify Nicks great component.

 

I did some experimenting and realised that with some minor code changes I could use the great Joomla plugin from Mike Reumer  at tech.reumer.net/ in conjunction  with Nicks in place of the single article call.

 

I installed Mikes GogleMaps plugin (see extensions.joomla.org/extensions/1147/details)

 

I then modified the file K2dynamap.php file located in plugins/k2in the region of line 89 to call Mikes googlemap plugin as follows:

 

if ($view == 'item') {            $plugins         = new K2Parameter($item-&gt;plugins, '', $this-&gt;pluginName);            $latitude         = trim($plugins-&gt;get('latitude', ''));            $longitude         = trim($plugins-&gt;get('longitude', ''));            $hidemap         = $plugins-&gt;get('hidemap', 0);            if ((!$hidemap) &amp;&amp; ($latitude != "") &amp;&amp; ($longitude != "")) {                $marker         = $plugins-&gt;get('marker', '');                $color             = $plugins-&gt;get('color', 'red');                $zoom             = $plugins-&gt;get('zoom', 12);                $width             = $plugins-&gt;get('width', 400);                $height         = $plugins-&gt;get('height', 200);                $type             = $plugins-&gt;get('type', 'roadmap');                                //$popuptxt     = $plugins-&gt;get('popuptxt'); - Not needed here.. used only by K2 DynaMap Module                /*  Marks comment out  */                //$output  = '&lt;br /&gt;';                //$output .= '&lt;center&gt;&lt;img src="maps.google.com/maps/api/staticmap?center='.$latitude.','.$longitude.'&zoom='.$zoom.'&size='.$width.'x'.$height.'&maptype='.$type.'&markers=color:'.$color.'|label:'.$marker.'|'.$latitude.','.$longitude.'&sensor=false"/></center>;';                                $output  = '<br />';                $output .= '<center>';                $output .= "{mosmap width='500'|height='400'|lat='".$latitude."'|lon='".$longitude."'| zoom='3'|zoomType='Large'|zoomNew='0'|mapType='Satellite'|showMaptype='1'|overview='0'|text='sv DWO'|tooltip='DWO'|marker='1'|align='center'}";                $output .= '</center>';                                /*  Marks Edit */                $o = new stdClass();                $o->text = $output;                JPluginHelper::importPlugin('content');                $dispatcher = & JDispatcher::getInstance();                $results = $dispatcher->trigger('onPrepareContent', array (&$o, array(), 0));                $output = $o->text;                            }        }

 

 

Hope this helps someone

 

Regards

 

 

Mark

 

 

 

 


Stavros said:

You have to wait the new version of nick.texidor.com/

Great job ;)

Please Log in or Create an account to join the conversation.

More
13 years 7 months ago #68449 by Mark Beddis
Replied by Mark Beddis on topic Google Map or other Map Integration
Hi

 

I forgot to say this was a simple test (and it works for me) - but obviously, we need to pass ALL the map parameters (rather than my simple 2 parameter test) to the googlemap joomla plug-in.

 

What we are doing is importing a joomla plugin and then triggering the googlemap plugin with the $dispatcher-&gt;trigger call (as if it were standard Joomla article content).

 

I need to complete the mod this week and I am very happy to post the updated K2dynamap.php file if anyone wants this. 

 

No credit to me - all I did was make a simple modification to the great work from Nick and Frank to allow Mike's fantastic plugin to operate on the K2 content. 

 

Mark Beddis said:

Hi Stavros

Thanks for the reply. 

 

In case anyone else is looking for a solution, what I have done is mododify Nicks great component.

 

I did some experimenting and realised that with some minor code changes I could use the great Joomla plugin from Mike Reumer  at tech.reumer.net/ in conjunction  with Nicks in place of the single article call.

 

I installed Mikes GogleMaps plugin (see extensions.joomla.org/extensions/1147/details)

 

I then modified the file K2dynamap.php file located in plugins/k2in the region of line 89 to call Mikes googlemap plugin as follows:

 

if ($view == 'item') {            $plugins         = new K2Parameter($item-&gt;plugins, '', $this-&gt;pluginName);            $latitude         = trim($plugins-&gt;get('latitude', ''));            $longitude         = trim($plugins-&gt;get('longitude', ''));            $hidemap         = $plugins-&gt;get('hidemap', 0);            if ((!$hidemap) &amp;&amp; ($latitude != "") &amp;&amp; ($longitude != "")) {                $marker         = $plugins-&gt;get('marker', '');                $color             = $plugins-&gt;get('color', 'red');                $zoom             = $plugins-&gt;get('zoom', 12);                $width             = $plugins-&gt;get('width', 400);                $height         = $plugins-&gt;get('height', 200);                $type             = $plugins-&gt;get('type', 'roadmap');                                //$popuptxt     = $plugins-&gt;get('popuptxt'); - Not needed here.. used only by K2 DynaMap Module                /*  Marks comment out  */                //$output  = '&lt;br /&gt;';                //$output .= '&lt;center&gt;&lt;img src="maps.google.com/maps/api/staticmap?center='.$latitude.','.$longitude.'&zoom='.$zoom.'&size='.$width.'x'.$height.'&maptype='.$type.'&markers=color:'.$color.'|label:'.$marker.'|'.$latitude.','.$longitude.'&sensor=false"/></center>;';                                $output  = '<br />';                $output .= '<center>';                $output .= "{mosmap width='500'|height='400'|lat='".$latitude."'|lon='".$longitude."'| zoom='3'|zoomType='Large'|zoomNew='0'|mapType='Satellite'|showMaptype='1'|overview='0'|text='sv DWO'|tooltip='DWO'|marker='1'|align='center'}";                $output .= '</center>';                                /*  Marks Edit */                $o = new stdClass();                $o->text = $output;                JPluginHelper::importPlugin('content');                $dispatcher = & JDispatcher::getInstance();                $results = $dispatcher->trigger('onPrepareContent', array (&$o, array(), 0));                $output = $o->text;                            }        }

 

 

Hope this helps someone

 

Regards

 

 

Mark

 

 

 

 

Stavros said:

You have to wait the new version of nick.texidor.com/

Great job ;)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum