On Feb 15, 7:26 pm, Barry Hunter <[email protected]> wrote: > I see three (identical) maps on that page. > > How the URL is created is irrelevant. the HTML is being generated > server side, so the browser only sees the final html output - already > containing whole urls. It then just loads them. > > maybe you just need to clear your browser cache - or try a different browser. > > > >
Hi Barry I managed to sort it (that's why you see the maps all working). I need to add echo statement - changed php $dbm_lat TO php echo $dbm_lat Thanks for looking anyway, > > > > On Wed, Feb 15, 2012 at 6:29 PM, motty <[email protected]> wrote: > > I'm trying to insert Google Static Maps into a site and am getting > > running into problems when trying to replace coordinates for the > > marker. > > > 1. Showing the map using numbers for the centre and marker coordinates > > produced the map correctly. > > 2. Showing the map using variables for the centre coordinates and > > numbers for the marker coordinates produced the map correctly. > > 3. Showing the map using variables for both the centre and marker > > coordinates resulted in a blank map. > > > There problem appears to be something to do with using variables for > > the marker coordinates. > > > Can anybody throw any light on this? Thanks in advance. > > > Output is here:http://www.visitkievukraine.com/test/ > > > Code > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:// > >www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > <html xmlns="http://www.w3.org/1999/xhtml"> > > <head> > > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> > > <title>Untitled Document</title> > > </head> > > > <body> > > <?php > > $dbm_lat = 50.450100; > > $dbm_lon = 30.523400; > > ?> > > <!--This works - regular static map input --> > > <p><img src="http://maps.google.com/maps/api/staticmap? > > center=50.450100,30.523400&zoom=16&markers=50.450100,30.523400&size=500x300&sensor=false" > > / > >></p> > > > <!--This also works - replacing centre coordinates with php variables > > --> > > <p><img src="http://maps.google.com/maps/api/staticmap?center=<?php > > $dbm_lat?>,<?php $dbm_lon? > >>&zoom=16&markers=50.450100,30.523400&size=500x300&sensor=false" > >> / > >></p> > > > <!--This produces blank map - replacing marker coordinates with php > > variables --> > > <p><img src="http://maps.google.com/maps/api/staticmap?center=<?php > > $dbm_lat?>,<?php $dbm_lon?>&zoom=16&markers=<?php $dbm_lat?>,<? > > php $dbm_lon?>&size=500x300&sensor=false" /></p> > > > </body> > > </html> > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Maps API V2" 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 > > athttp://groups.google.com/group/google-maps-api?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
