RE: [PHP] A bad design decision or pure genius?
| From: | Daevid Vincent | Date: | Fri, 14 Jan 2011 01:53:46 +0000 |
| Subject: | RE: [PHP] A bad design decision or pure genius? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-310753@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: lists@pruimphotography.com [mailto:lists@pruimphotography.com]
> Sent: Thursday, January 13, 2011 4:50 PM
> To: php-general@lists.php.net
> Subject: [PHP] A bad design decision or pure genius?
>
> Hey Everyone,
>
> I have a question about php & javascript... Yes I know this forum is
> for php BUT I needed an opinion on where to look for stuff...
>
> I have a application that I'm working on that uses google maps to
> display interactive maps (using javascript) on the website. I
> now have
> the need to display multiple maps on the same page and from
> what I can
> tell I have to create new instances and variables for all of them...
>
> What I'm wondering is since I know very little javascript
> would it be
> bad to create a PHP function to write the java code for the proper
> number of maps I need to display? The map info is being
> pulled from a
> database where events are being added and could contain 2 or
> 200 maps...
>
> Or should I learn javascript and figure out how to create a loop in
> there so that I can just loop it in the java and not repeat code?
>
> Thanks for any assistance you can give!
>
> Jason Pruim
> pruimj@gmail.com
Not sure why you would need to show more than a single map at any given
time. Therefore why not use PHP to show a list of possible maps and when
the user clicks on one, use AJAX to populate a single map on demand?