Missing Controls...

Phoca Maps - displaying maps in Joomla! CMS
exlemor
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 30 Sep 2009, 01:52

Missing Controls...

Post by exlemor »

Hi Jan,

1st off - THANK YOU for making great Joomla apps... in this case PhocaMaps...

I needed a KML powered Google Map to act like a static map basically i.e. HIDE all the controls
that come with the standard Google Map.

So, being that I am NO coder, but can hack things a bit...

I took the file: /components/com_phocamaps/views/map/tmpl/default.php and modified it to go from:

Code: Select all

line 111	//	echo $map->setMapOption('googleBar', $this->map->googlebar).','."\n";// Not ready yet
line 112	//	echo $map->setMapOption('continuousZoom', $this->map->continuouszoom).','."\n";// Not ready yet
line 113	        echo $map->setMapTypeOpt($this->map->typeid)."\n";
to

Code: Select all

line 111	//	echo $map->setMapOption('googleBar', $this->map->googlebar).','."\n";// Not ready yet
line 112	//	echo $map->setMapOption('continuousZoom', $this->map->continuouszoom).','."\n";// Not ready yet
line 113	        echo $map->setMapOption('draggable', $this->map->scrollwheelzoom).','."\n";
line 114	        echo $map->setMapOption('panControl', $this->map->scrollwheelzoom).','."\n";
line 115	        echo $map->setMapOption('zoomControl', $this->map->scrollwheelzoom).','."\n";
line 116	        echo $map->setMapOption('streetViewControl', $this->map->scrollwheelzoom).','."\n";
line 117	        echo $map->setMapTypeOpt($this->map->typeid)."\n";
I USED $this->map->scrollwheelzoom to simulate a state of FALSE as I had turned off that value in the PhocaMaps settings area.
[and I wouldn't have truly been able to figure out how to add those new variables in there in the right place without crashing the php code]

It would be cool if you add these settings to the back end - it allows someone to end up with a map centered on what they want [i.e. dictated
a bit in this case by the KML data] and not have any controls in the way AND still get the benefit of popup info boxes or whatever they have
entered in their KML data...

Hope this helps!
Cheers and thanks again

Emmanuel.

P.S.: I will get my customer to donate to you for Phoca Maps...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Missing Controls...

Post by Jan »

Ok, great to hear it and thank you for the guide.

Jan
If you find Phoca extensions useful, please support the project
Post Reply