On Nov 13, 8:12 pm, visda04 <[email protected]> wrote:
> Is it possible to dynamically populate the LAT & LONG values within
> the Static Map URL? For 
> example:http://maps.google.com/maps/api/staticmap?center=$lat,$lng&zoom=6&siz...label:S|$lat,$lng&sensor=false&key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSsTL4WIgxhMZ0ZK_kHjwHeQuOD4xQJpBVbSrqNn69S6DOTv203MQ5ufA
>
> I want to replace:  center=29.740317,95.588457
> with something like: center=$lat,$lng
>
> so that I may populate the values via xml.
>
> Is it possible?

Yes, but you need to bear in mind you are dealing with a Javascript
string. A long string, but just a string.

You have <img src="http://maps...blah...blah...";> and you want to
insert a value $lat and $lng in it. Just concatenate them into the
string <img src="http://maps...center="+$lat+","+$lng+"...blah...";>

Andrew

--

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=.


Reply via email to