- Posts: 295
COMMUNITY FORUM
Google Map or other Map Integration
- stavroch
- Offline
- Elite Member
Less
More
13 years 7 months ago #68450
by stavroch
Replied by stavroch on topic Google Map or other Map Integration
Can you explain as what your code is doing?
What we will taking with your new module version?
What we will taking with your new module version?
Please Log in or Create an account to join the conversation.
- Mark Beddis
- Offline
- New Member
Less
More
- Posts: 7
13 years 7 months ago #68451
by Mark Beddis
Replied by Mark Beddis on topic Google Map or other Map Integration
Hi Stavros
My changes are simple to write out the $output variable to include the joomla {mosmap .........} plugin.
In the file K2dynamap.php file located in the plugins/k2 folder (in the region of line 89).....
Step 1)
I commented out the original lines that created the $output variable ....
/* Marks comment out */ //$output = '<br />'; //$output .= '<center><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>';
Step 2)
and added these new lines ......
$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>';
Where {mosmap ....} is a valid call to mikes googlemap plugin.
Just to restate, I only plugged in the $latitude and $longitude variables above - the other settings for width, height, zoom and so on also need setting.
Step 3)
K2 doesnt seem to process standard joomla plugins like this one for K2 article content views, so what i did below was to import all the joomla content plugins and force the modified $output variable to be processed by the joomla content plugins.
/* 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;
So, the {mosmap ....} statement was then turned to full googlemap code by Mikes Googlemap plugin. We still get standard the category view map showing all the K2 items that have been geocoded.
It seems pretty close (close enough for what I need) to what Constantinos showed.
- It is as simple as that - nothing complicated at all. Of course, there can be a performance impact if we process the Joomla plugins - I'll look later and see if I can just import the googlemap plugin to reduce this.
I am sorry but I cant show this on the test site right yet as it contains a client project that is confidential to them and not to be seen at this point, but I'll move it to a demo site later today or tommorrow.
Stavros said:
Can you explain as what your code is doing?
What we will taking with your new module version?
My changes are simple to write out the $output variable to include the joomla {mosmap .........} plugin.
In the file K2dynamap.php file located in the plugins/k2 folder (in the region of line 89).....
Step 1)
I commented out the original lines that created the $output variable ....
/* Marks comment out */ //$output = '<br />'; //$output .= '<center><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>';
Step 2)
and added these new lines ......
$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>';
Where {mosmap ....} is a valid call to mikes googlemap plugin.
Just to restate, I only plugged in the $latitude and $longitude variables above - the other settings for width, height, zoom and so on also need setting.
Step 3)
K2 doesnt seem to process standard joomla plugins like this one for K2 article content views, so what i did below was to import all the joomla content plugins and force the modified $output variable to be processed by the joomla content plugins.
/* 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;
So, the {mosmap ....} statement was then turned to full googlemap code by Mikes Googlemap plugin. We still get standard the category view map showing all the K2 items that have been geocoded.
It seems pretty close (close enough for what I need) to what Constantinos showed.
- It is as simple as that - nothing complicated at all. Of course, there can be a performance impact if we process the Joomla plugins - I'll look later and see if I can just import the googlemap plugin to reduce this.
I am sorry but I cant show this on the test site right yet as it contains a client project that is confidential to them and not to be seen at this point, but I'll move it to a demo site later today or tommorrow.
Stavros said:
Can you explain as what your code is doing?
What we will taking with your new module version?
Please Log in or Create an account to join the conversation.
- stavroch
- Offline
- Elite Member
Less
More
- Posts: 295
13 years 7 months ago #68452
by stavroch
Replied by stavroch on topic Google Map or other Map Integration
Ok we are waiting your demo site. Although and the Nick project display the long - lat of items in the module position and under of each k2 item.
Please Log in or Create an account to join the conversation.
- Mark Beddis
- Offline
- New Member
Less
More
- Posts: 7
13 years 7 months ago #68453
by Mark Beddis
Replied by Mark Beddis on topic Google Map or other Map Integration
Hi Stavros
I think I answered a different question to what you asked.
Whay my mod does is give all the google map zoom, switch view, etc functionality provided by Mikes googlemap plugin - to provide a bit more map functionality than that provided by the static image generated in the K2DynaMap extension (for single items).
Take a look at Mike Reumer's site at tech.reumer.net/ and you will see what his plugin can do. I have found it very good in the past.
Mark
Stavros said:
Ok we are waiting your demo site. Although and the Nick project display the long - lat of items in the module position and under of each k2 item.
I think I answered a different question to what you asked.
Whay my mod does is give all the google map zoom, switch view, etc functionality provided by Mikes googlemap plugin - to provide a bit more map functionality than that provided by the static image generated in the K2DynaMap extension (for single items).
Take a look at Mike Reumer's site at tech.reumer.net/ and you will see what his plugin can do. I have found it very good in the past.
Mark
Stavros said:
Ok we are waiting your demo site. Although and the Nick project display the long - lat of items in the module position and under of each k2 item.
Please Log in or Create an account to join the conversation.
- stavroch
- Offline
- Elite Member
Less
More
- Posts: 295
13 years 7 months ago #68454
by stavroch
Replied by stavroch on topic Google Map or other Map Integration
Ok I see what you mean. So now I am waiting your new version and the changes that we have to do for having better mod functionalities.
Please Log in or Create an account to join the conversation.
- Nick Texidor
- Visitor
13 years 7 months ago #68455
by Nick Texidor
Replied by Nick Texidor on topic Google Map or other Map Integration
Hi Mark,
This feature was requested a while ago by Stavros, and is actually something I'm working on adding to K2DynaMap at the moment. However, in addition to dynamic zooming, we'll also be showing the other K2 Items on the Map.
I hope to have it completed soon.
Nick
Mark Beddis said:
Hi Stavros
I think I answered a different question to what you asked.
Whay my mod does is give all the google map zoom, switch view, etc functionality provided by Mikes googlemap plugin - to provide a bit more map functionality than that provided by the static image generated in the K2DynaMap extension (for single items).
Take a look at Mike Reumer's site at tech.reumer.net/ and you will see what his plugin can do. I have found it very good in the past.
Mark
Stavros said:
Ok we are waiting your demo site. Although and the Nick project display the long - lat of items in the module position and under of each k2 item.
This feature was requested a while ago by Stavros, and is actually something I'm working on adding to K2DynaMap at the moment. However, in addition to dynamic zooming, we'll also be showing the other K2 Items on the Map.
I hope to have it completed soon.
Nick
Mark Beddis said:
Hi Stavros
I think I answered a different question to what you asked.
Whay my mod does is give all the google map zoom, switch view, etc functionality provided by Mikes googlemap plugin - to provide a bit more map functionality than that provided by the static image generated in the K2DynaMap extension (for single items).
Take a look at Mike Reumer's site at tech.reumer.net/ and you will see what his plugin can do. I have found it very good in the past.
Mark
Stavros said:
Ok we are waiting your demo site. Although and the Nick project display the long - lat of items in the module position and under of each k2 item.
Please Log in or Create an account to join the conversation.
- Mark Beddis
- Offline
- New Member
Less
More
- Posts: 7
13 years 7 months ago #68456
by Mark Beddis
Replied by Mark Beddis on topic Google Map or other Map Integration
Hi Nick
That sounds great - really looking forward to seeing it.
One feature request I would love to suggest is the ability to geocode an additional K2 field (a postal address) to the lat / lon fields with an override to the true lat lon fields if these are entered (as errors geocoding occur!!). I have done this in the past by calling the google API to perform this. It just makes life for the end user when they go in and edit stuff.
Regards - I think your extension is really good.
Mark
Nick Texidor said:
Hi Mark,
This feature was requested a while ago by Stavros, and is actually something I'm working on adding to K2DynaMap at the moment. However, in addition to dynamic zooming, we'll also be showing the other K2 Items on the Map.
I hope to have it completed soon.
Nick
Mark Beddis said:
Hi Stavros
I think I answered a different question to what you asked.
Whay my mod does is give all the google map zoom, switch view, etc functionality provided by Mikes googlemap plugin - to provide a bit more map functionality than that provided by the static image generated in the K2DynaMap extension (for single items).
Take a look at Mike Reumer's site at tech.reumer.net/ and you will see what his plugin can do. I have found it very good in the past.
Mark
Stavros said:
Ok we are waiting your demo site. Although and the Nick project display the long - lat of items in the module position and under of each k2 item.
That sounds great - really looking forward to seeing it.
One feature request I would love to suggest is the ability to geocode an additional K2 field (a postal address) to the lat / lon fields with an override to the true lat lon fields if these are entered (as errors geocoding occur!!). I have done this in the past by calling the google API to perform this. It just makes life for the end user when they go in and edit stuff.
Regards - I think your extension is really good.
Mark
Nick Texidor said:
Hi Mark,
This feature was requested a while ago by Stavros, and is actually something I'm working on adding to K2DynaMap at the moment. However, in addition to dynamic zooming, we'll also be showing the other K2 Items on the Map.
I hope to have it completed soon.
Nick
Mark Beddis said:
Hi Stavros
I think I answered a different question to what you asked.
Whay my mod does is give all the google map zoom, switch view, etc functionality provided by Mikes googlemap plugin - to provide a bit more map functionality than that provided by the static image generated in the K2DynaMap extension (for single items).
Take a look at Mike Reumer's site at tech.reumer.net/ and you will see what his plugin can do. I have found it very good in the past.
Mark
Stavros said:
Ok we are waiting your demo site. Although and the Nick project display the long - lat of items in the module position and under of each k2 item.
Please Log in or Create an account to join the conversation.
- Pasquale Luisi
- Offline
- New Member
Less
More
- Posts: 9
13 years 7 months ago #68457
by Pasquale Luisi
Replied by Pasquale Luisi on topic Google Map or other Map Integration
i'm lookink for this...can you help me?
Constantinos Griponisiotis said:
are you looking something like this: www.mykorinthia.gr/epagelmaties ?
Constantinos Griponisiotis said:
are you looking something like this: www.mykorinthia.gr/epagelmaties ?
Please Log in or Create an account to join the conversation.
- vaishumon.r
- Offline
- New Member
Less
More
- Posts: 2
13 years 4 months ago #68458
by vaishumon.r
Replied by vaishumon.r on topic Google Map or other Map Integration
I would also love to know if there is one avaliable.Anywayz
Google Maps apps are easy to make thanks to google codes
If you want to integrate Google My Map then you can
check this out bestfromgoogle.blogspot.com/2011/05/google-my-maps-kml-integration-for-your_4609.html
If there was a easy way to do it with some plugins please tell me
Thanks
Google Maps apps are easy to make thanks to google codes
If you want to integrate Google My Map then you can
check this out bestfromgoogle.blogspot.com/2011/05/google-my-maps-kml-integration-for-your_4609.html
If there was a easy way to do it with some plugins please tell me
Thanks
Please Log in or Create an account to join the conversation.
- vaishumon.r
- Offline
- New Member
Less
More
- Posts: 2
13 years 4 months ago #68459
by vaishumon.r
Replied by vaishumon.r on topic Google Map or other Map Integration
I would also love to know if there is one avaliable.Anywayz
Google Maps apps are easy to make thanks to google codes .
If you want to integrate Google My Map then you can check this out
bestfromgoogle.blogspot.com/2011/05/google-my-maps-kml-integ... there was a easy way to do it with some plugins please tell me.
Thanks
Google Maps apps are easy to make thanks to google codes .
If you want to integrate Google My Map then you can check this out
bestfromgoogle.blogspot.com/2011/05/google-my-maps-kml-integ... there was a easy way to do it with some plugins please tell me.
Thanks
Please Log in or Create an account to join the conversation.