Zh GoogleMap component, new feature – dynamic content request

Hi

Today I’ve finished tests and fixes.
Now you can enable dynamic loading content in map properties.

Go to Map tab. Open your map details. Open Advanced options slider.
You can see Loading content data dynamically field.
If you set it to Yes, then when map is loading, there is no creation content string and onclick listeners for each placemarks. And when placemarks created, the only one loop to create onclick listener for placemarks, which do the same – get Action by Click, Zoom by Click and proceed it. And when, for example – Open infowin – it loads data to show and show it.

It can reduce page size and cause to more quickly response.

In next week I gonna do support that feature changes in module and plugin.

PS in large maps (more than 3-4 thousands placemarks) you can get a php error (if you enable show errors), or internal error – it means that you haven’t enough memory for script (memory_limit php parameter).
But do you think is it need to show this amount placemarks at once.

PPS Next big changes will be dynamic loading objects – I’ll try to do loading map objects (for example, placemarks) – get map bounds and load only placemarks for this bounds. But it is no so quickly I’ll do.

17 thoughts on “Zh GoogleMap component, new feature – dynamic content request

  • Anthonie

    Hi,

    I try this function but I can’t let it work.

    When I set the Loading content data dynamically field to NO the marker wil open with the info by a double click.

    When I set the load dynamic field to YES the is nothing happen by a double click.

    What am I doing wrong?

    Regards
    Anthonie.

    • Dima

      Hi Anthonie.
      Can you provide link to your page.
      It should be loading icon shown and done action, which set in action by click. Have you go any errors when page is loaded. Can you create simple text in infowin and try to show it. Do you use any plugin calls in infowin content (in additional html field)

  • zambala

    Как с вами связатся, на форуме никак немогу зарегистрироваться….

    Why “directions” are shown from location B to A, instead of A to B ?! How to turn it around?!

    • Dima

      Мне писали о проблемы регистрации – на днях посмотрю. может это из-за того, что на php 5.3 перешел

      Чтобы поменять направление – кликните на A или B

      • Dima

        Have you use sef plugin to change site paths
        Or Use URL rewriting.
        Can you switch it off and try again.

        I’ve temporary fix problem with forum registration (I’ll post now about that)

        • Anthonie

          Hi,
          I think I have found the problem.
          I do use a style for the infobubble and then it wil not work.
          When not a style is selected it works.

  • Anthonie

    Hi Dmitri,

    I have problems again.
    I have tried to create an account on the forum but I have not received a confirmation mail.
    Please can You sent me the confirmation mail again?

    Thanks,
    Anthonie.

    • Dima

      I activate ALL accounts!!
      Sorry, I’m on thinking on moving to the other hoster. I’ve decided to which, there is only time (I think)

  • Andrew

    Is there a caching option for geocoded markers? We have a map with 1200+ markers but cannot get it to load them. We were getting an error along the lines that the quota had been exceeded. We think it was related to the number of requests in a short time span.

    At this time we’re getting nothing on the map but haven’t been able to look into it.

    On another note, on this site it does not set the div surrounding placemarkContent is not large enough in Firefox. It sizes correctly in Chrome though. Here is the link.
    http://www.coodyformayor.com/index.php/administration/voter-locations

    • Dima

      Hi Andrew.
      There is a Google Map API restriction for geocoding. You can check documentation, as I right remember, it is about 10-12. May be you have (or want) a different license that change this limit.
      I can suggest in this case change text address to lat/lng coordinates. I agree that is time consuming work, but only that you can get over this problem. You can do that in admin panel. Check Troubleshooting
      http://zhuk.cc/wiki/index.php/Zh_GoogleMap_Troubleshooting#OVER_QUERY_LIMIT_message_when_displaying_map

      But 1200+ placemarks in addition to this can take time and memory to loading. Today I load all placemarks at one. But I’ve added dynamic loading content by mootools request. It can reduce memory consumption. in future I have plan to load placemarks for viewable map part.

      As for second question I not clear understand it.

      PS post on my forum, it is more convenient to discuss
      http://forum.zhuk.cc/

  • Roberts

    долго думал как сделать мульти языковую поддержку чтобы не делать новый объект для каждого языка.
    пришлось “хардкодить”.

    /components/com_zhgooglemap/helpers/placemarks.php

    dobavil include(‘ /components/com_zhgooglemap/helpers/placemarks.phptranslate.php’);

    abstract class comZhGoogleMapPlacemarksHelper{
    …public static function get_placemark_content_string( …)
    {
    ….$tulk = a_text( $currentmarker->title );
    … $returnText .= ‘\”.htmlspecialchars(str_replace(‘\\’, ‘/’, $tulk), ENT_QUOTES, ‘UTF-8′).’\’+’.”\n”;
    ну и так далее

    /components/com_zhgooglemap/helpers/placemarks.phptranslate.php’);
    getTag();
    $db = JFactory::getDBO();

    $query = “SELECT trans.`name` as name FROM asa_a_text AS orig
    LEFT JOIN asa_a_text AS trans ON orig.id_p = trans.id_p AND orig.p_type = trans.p_type AND orig.t_type = trans.t_type
    WHERE orig.`name` = ‘$name’ AND trans.lang_code = ‘$lang'”;
    $db->setQuery($query);
    $cps = $db->loadObjectList();
    $namet = ”;
    foreach ( $cps as $s ) {
    $namet = $s->name;
    }
    if ($namet != ”) {$name = $namet;}

    return $name;
    }
    ?>

    может как то можно предусмотреть этот фокус в системе ?

    • Dima

      Добрый день, Roberts
      Можно сделать универсальным механизм, но он будет неудобным 🙂
      Смотрите – есть
      Placemark – Title, Description, HTML text
      Map – Title, Description

      Это как минимум что может иметь переводы на несколько языков. Сейчас мы говорим о метках.
      Соответственно, надо писать на одном языке, потом сохранять переводы и т.п. Смотреть, что где перевели, где забыли и прочее.

      В случае же карты для определенного языка и меток для этой карты – сразу все видим, что есть, что выводим и т.п. Создали метку. Потом взяли, и сохранили ее как копию для других переводов, подправили перевод.

      Это на мой взгляд удобнее и гибче, чем отдельные структуры для перевода. Сложно будет найти, где Вы используете и какой перевод

      • Roberts

        И да и нет.
        я лично вобше не понимаю смысл сохранение пустых или дублированных записей.
        конечно компьютеры сeчас мощные и способны “переживать” болшои обём данных.
        У вас есть точка или карта или что-бы там небыло с одинаковыми параметрами в которой меняются только некоторые тексты.
        На мои взгляд легче сделать таблицу переводов.
        мне это было необходимо потому что тексты kонтeнта совпадают с текстами метки.
        потому переводя или меня перевод контента мне уже не надо некуда лазить и создавать или менять оно заменяется само.

        Но это так мысли в слух.
        Извини если что то сказал не так я не программист 🙂

  • Dima, thank you so much for your wonderful module!!!! It seems incredible to me that someone is possible to create something that complex himself.

    I added the full screen mode to the site I am making for my friend (go to http://www.i-amb.com/joomla/index.php/en/contact/where-we-are/by-public-transport-walking-see-the-closest-stations-plan-your-journey and click “Print View”) in the bottom.

    Unfortunately, when I want to print in Google Chrome or make a PDF the result is a blank page.

    Is there any way you could help???

    Thank you,

    Yves

Leave a Reply

Your email address will not be published. Required fields are marked *