Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Marker data in google maps 07 Aug 2016 15:42 #14367

  • MorganL
  • MorganL's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
I am using your code for a list of markers in a map.. here is my version (api removed)
<div>
        <?php echo JDom::_('html.fly.map.google', array(

            'keyAPI' => 'xxxxx',

            'markers' => array(

                'fitBounds' => true,

                // Set the markers datas from a list
                'list' => $this->items,

                'dataKeys' => array(
                    'lat' => 'lat',
                    'lng' => 'lng',

                    // Search by name, or address, when the coordinate are missing or empty
                    'address' => '{name} {postcode}',

                    // Set the marker title
                    'title' => '{name}',

                    // Template Description
                    'content' => '<span style="font-size:16px;">{summary}</span>'
                ),
            ),

        )); ?>
    </div>

The markers are all showing correctly (so model is pulling data) , but the content in {name} etc are just blank
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla

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

Marker data in google maps 07 Aug 2016 16:25 #14369

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Did you included 'name' in the SELECT of your query ?
Because this is not automatic. JDom can only use the values, but does not create the SQL according to its needs such as an ORM.
Coding is now a piece of cake

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

Marker data in google maps 07 Aug 2016 16:35 #14373

  • MorganL
  • MorganL's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
Ah found it

I did have a.summary missing in the model.. now added and content is OK

Also, if I put {name} in the content it renders.. it looks like the TITLE part of the JDOM is not rendering i.e
// Set the marker title
                    'title' => '{name}',

is empty when I render content. I dont think you use it in your example as you create a layout for your box
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla

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

Marker data in google maps 09 Aug 2016 11:09 #14403

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
What do you mean ?
It works for me.

'title', 'content', 'address' are parsing the {tags} without problem.
Coding is now a piece of cake

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

  • Page:
  • 1
Time to create page: 0.076 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started