xcaliber2222
Programmer
Hello, I couldn't find a Google apps forum here but I'm using Classic ASP with the Google Maps API so I hope it is ok to post here. I have geocodes (lat, lng) I'm (trying) to pass in from a Session var. I can grab the value in a response.write but when I try to insert the session var in the Google Map API code it doesn't return a value. I am doing this (throughout my code):
Any help would be great.
Thanks,
Alejandro
Code:
Dim lat, lng
(grabbing from recordset I'm looping through):
Session("lat") = rs2("lat")
Session("lng") = rs2("lng")
//Display map, with some controls and set initial location
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
(line below returns empty):
map.setCenter(new GLatLng(<%=lat%>, <%=lng%>), 13);
//Set up marker with info window
(line below returns empty):
var point = new GLatLng(<%=lat%>, <%=lng%>);
var marker = createMarker(point,'Stuff to display')
map.addOverlay(marker);
(Getting values ok here):
LAT <%Response.Write(Session("lat"))%>
LNG <%Response.Write(Session("lng"))%>
Any help would be great.
Thanks,
Alejandro