Was going through this link:
http://code.google.com/apis/maps/documentation/overlays.html
But how can I alter this code to incorporate the markers at different
zoom levels?
Do i have a new field which can have integer values. Assigning the
same integer value to all which needs to be shown at a particular zoom
level. Will that be the way to go about?!! Then use an If-else to
load based on the integer value?
**********************************
function createMarker(point,html,icon) {
var marker = new GMarker(point,icon);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
};
<?php
$link = pg_connect("host=localhost port=5432 dbname=place user=abc
password=xyz") or die("Could not connect: " . pg_error());
$result = pg_query($link,"SELECT * FROM places");
if (!$result)
{
echo "no results ";
}
while($row = pg_fetch_array($result))
{
echo "var point = new GLatLng(" . $row['lat'] . "," . $row['long'] .
");\n";
echo "var marker = createMarker(point, '" . addslashes($row
['place_name']) . "',pin);\n";
echo "map.addOverlay(marker);\n";
echo "\n";
}
*************************
What changes to be made here?! Also right now all the 1200+ markers
are loading at the same time. So its taking time to load them. Will
need to scale this to 32000+ markers. So it has to be zoom levels
which I should be working on I guess.
Thanks in advance
Ricky
On Nov 13, 8:46 pm, Ricky <[EMAIL PROTECTED]> wrote:
> Thanks everyone.. Looked at the error log and finally understood it
> was cos the php_pgsql.dll was not present.. Downloaded it.. Made
> changes on the php.ini file and yipee..!! It now works..
>
> Also deleted this line--- pg_selectdb("places",$link) or die ("Can\'t
> use dbmapserver : " .pg_error());
>
> Can go sleep in peace.. :)
>
> On Nov 13, 5:59 pm, tunerGeek <[EMAIL PROTECTED]> wrote:
>
> > You won't ever see PHP code (<?php) in your view source, only the HTML
> > that PHP generates. That's one reason for require'ing / include'ing
> > your db connection info... if PHP fails on your server, it cannot
> > expand the connect info and thus not ever release that info to the
> > public.
>
> > For PHP errors, take a peek at your apache error log.
>
> > On Nov 13, 5:07 am, Ricky <[EMAIL PROTECTED]> wrote:
> > <snip>
>
> > > So the code starting from "<?php " is not to be seen.
>
> > > Some error there..!!
>
> > > On Nov 13, 3:58 pm, Rossko <[EMAIL PROTECTED]> wrote:
>
> > > > You might get a clue by doing a simple 'view source' on your blank
> > > > page - what's really in there?
>
> > > > cheers, Ross K
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---