Hi,
I created a kml file in Google Earth Pro and uploaded it to my server. Works fine and displays, but now I can't set the Zoom level in the Phoca Maps. Its opens to a default zoom that i can't control. Is there a fix for this?
Thanks.
KML file zoom size
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: KML file zoom size
Hi, if you load the KML, then you should set the zoom in KML
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 29 Jul 2016, 13:53
Re: KML file zoom size
No! I have same problem. In KML file i cant find ZOOM paremeter.
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: KML file zoom size
Hi, and as in the first post, you cannot set the zoom in map? (edit of map in Phoca Maps administration?)
See: https://www.phoca.cz/joomlademo/phoca-maps-kml - zoom is set in Map
Jan
See: https://www.phoca.cz/joomlademo/phoca-maps-kml - zoom is set in Map
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 29 Jul 2016, 13:53
Re: KML file zoom size
i can set 3,5,6,7,8 zoom level in administrator panel. But! Maps with marker initialized first with right zoom, but after load kml file - zoom out.
so. My kml file - all world. From America to Japan. With my map widht not all world u can watch. Bu its ok. I can see part of america.
And i set normal zoom and great center position.
KML file i thik wanna see ALL kml objects and set zoom level to 1
so. My kml file - all world. From America to Japan. With my map widht not all world u can watch. Bu its ok. I can see part of america.
And i set normal zoom and great center position.
KML file i thik wanna see ALL kml objects and set zoom level to 1
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: KML file zoom size
Hmmm, hard to say, testing here: https://www.phoca.cz/joomlademo/phoca-maps-kml - the kml is automatically zoomed to see the marked area
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 29 Jul 2016, 13:53
Re: KML file zoom size
YES! But, a don't wanna auto zoom to KML area.
That my map after load KML file http://shot.qip.ru/00Qtrh-5mIrA3NYm/
But i want like that http://shot.qip.ru/00Qtrh-6mIrA3NYn/
Like without KML - set center, set zoom in administrator panel and get great look.
That my map after load KML file http://shot.qip.ru/00Qtrh-5mIrA3NYm/
But i want like that http://shot.qip.ru/00Qtrh-6mIrA3NYn/
Like without KML - set center, set zoom in administrator panel and get great look.
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: KML file zoom size
Hi, it is possible, that Google Maps API automatically wants to display all the areas so it automatically adds the low zoom to display all the area. Realyl hard to say, as I am not the developer of the Google Maps API but in some examples I have seen, the area set in KML was automatically zoomed so it is displayed as whole
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Member
- Posts: 11
- Joined: 29 Jul 2016, 13:53
Re: KML file zoom size
Thats not solution? How i can use it in Phoca?
http://stackoverflow.com/questions/1148 ... map-center
http://stackoverflow.com/questions/1148 ... map-center
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: KML file zoom size
Hi, where do you display the maps - in plugin or component?
administrator/components/com_phocamaps/helpersphocamapsmap.php line cca 1070
change
FROM:
TO:
Please let me know if this work for you, if yes, I will add it as parameter.
Thank you, Jan
administrator/components/com_phocamaps/helpersphocamapsmap.php line cca 1070
change
FROM:
Code: Select all
$js = ' var kmlLayer'.$this->_id.' = new google.maps.KmlLayer({ url: \''.$kmlFile.'\', suppressInfoWindows: true, preserveViewport: false, map: '.$this->_map.'});'."\n";
Code: Select all
$js = ' var kmlLayer'.$this->_id.' = new google.maps.KmlLayer({ url: \''.$kmlFile.'\', suppressInfoWindows: true, preserveViewport: true, map: '.$this->_map.'});'."\n";
Thank you, Jan
If you find Phoca extensions useful, please support the project