Hi!
I am reading geocodes from a database to show an icon on a google map. Now the center point is displying, but the rest of the code is dispayed as text in the browser, so I actually see the javascript code in my browser. How can I send javascript to the browser, and that the browser understands it's javascript? Here's my asp code:
Code:
I am reading geocodes from a database to show an icon on a google map. Now the center point is displying, but the rest of the code is dispayed as text in the browser, so I actually see the javascript code in my browser. How can I send javascript to the browser, and that the browser understands it's javascript? Here's my asp code:
Code:
Code:
<div id='boxmap'><center><div id="map" style="width: 600px; height: 350px;"></div></center>
<script type="text/javascript">
//<![CDATA[
function mapload() {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.setCenter(new GLatLng(40.42249, -3.69105), 5);
map.addControl(new GMapTypeControl());
<%
if Not googleRS.EOF then
Do While Not googleRS.EOF
'SET VARIABLES
latitude = googleRS("latitude")
longitude = googleRS("longitude")
%>
var ai<% = i %> = new GIcon(G_DEFAULT_ICON);
ai<% = i %>.image = 'images/m2p4.png';
var point<% = i %> = new GLatLng(<% = latitude %>, <% = longitude %>);
var marker<% = i %> = new GMarker(point<% = i %>, ai<% = i %>);
var marker<% = i %> = map.addOverlay(marker<% = i %>);
GEvent.addListener(marker<% = i %>, 'mouseover', function() {
marker<% = i %>.openInfoWindowHtml("<div style=\"font-family:arial; text-align:center; width:200px;\"><center><b>2002 Volvo C70</b><br><img src=\"/userfiles/104/thumbs/aseo_main.jpg\"><br>< ; ;a href=\"[URL unfurl="true"]http://www.mijnsite.nl/search_results.[/URL] asp?id=79bc3a36b5a3582562d488804b2d4cc5\" target=\"_BLANK\">View Details</a></center></div>");
});
GEvent.addListener(marker<% = i %>, 'click', function() {
map.closeInfoWindow();
});
}
//]]>
</script>
<%
i = i + 1
googleRS.MoveNext
Loop
end if
googleRS.Close
Set googleRS = Nothing
%>