I have solved the problem of running out of room in my markers string. Using the following example code eliminated the issue. I moved the LOOP that creates the markers to inside the creation of the packet.
Now - and maybe Bruce can answer this - the limitation may be how large the packet can be.
packet = clip(packet) & p_web.AsciiToUTF(|
' <<html><13,10>'&|
' <<body><13,10>'&|
' <<div id="map_canvas" style="width:800px; height:800px"><</div> <13,10>'&|
'<13,10>'&|
' <<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"><</script> <13,10>'&|
' <<script type="text/javascript"> <13,10>'&|
'<13,10>'&|
' var map;<13,10>'&|
' var markers = [];<13,10>'&|
'<13,10>'&|
' initialize();<13,10>'&|
'<13,10>'&|
'<09H>function initialize() {{<13,10>'&|
'<09H>var i;<13,10>'&|
'',net:OnlyIfUTF,net:StoreAsAscii)
packet = clip(packet) & '<09H>var arrDestinations = [<13,10>'
OPEN(Addresses)
SET(Addresses)
LOOP UNTIL Access:Addresses.Next()
LOC:MarkersString = ''
LOC:MarkersString = '<13,10><123><13,10>' & |
'lat: ' & CLIP(Add:Latitude) & '<44><13,10>' & |
'lon: ' & CLIP(Add:Longitude) & '<44><13,10>' & |
'title: <34>Name: ' & CLIP(Add:Name) & '<34><44><13,10>' & |
'description: <34>' & 'Record ID: ' & CLIP(Add:AddressId) & '<br />' & |
'Name: ' & CLIP(Add:Name) & '<br />' & |
'Address: ' & CLIP(Add:Address) & '<34>' & '<13,10>' & |
'<125><44><13,10>'
packet = CLIP(packet) & p_web.AsciiToUtf(CLIP(LOC:MarkersString),net:OnlyIfUTF,net:StoreAsAscii)
END
packet = clip(packet) & '<09H>];<13,10>'
packet = clip(packet) & p_web.AsciiToUtf(|
'<09H><13,10>'&|
'<09H>var myOptions = {{<13,10>'&|
'<09H,09H>zoom: 15,<13,10>'&|
'<09H,09H>center: new google.maps.LatLng(' & p_web.GSV('_Latitude_') & ',' & p_web.GSV('_Longitude_') & '),<13,10>'&|
'<09H,09H>mapTypeId: google.maps.MapTypeId.ROADMAP<13,10>'&|
'<09H>};<13,10>'&|
'<09H><13,10>'&|
'<09H>var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);<13,10>'&|
'<09H><13,10>'&|
'<09H>var infowindow = new google.maps.InfoWindow({{<13,10>'&|
'<09H,09H>content: ''''<13,10>'&|
'<09H>});<13,10>'&|
'<09H><13,10>'&|
'<09H>// loop over our array<13,10>'&|
'<09H>for (i = 0; i << arrDestinations.length; i++) {{<13,10>'&|
'<09H,09H>// create a marker<13,10>'&|
'<09H,09H>var marker = new google.maps.Marker({{<13,10>'&|
'<09H,09H,09H>title: arrDestinations[i].title,<13,10>'&|
'<09H,09H,09H>position: new google.maps.LatLng(arrDestinations[i].lat, arrDestinations[i].lon),<13,10>'&|
'<09H,09H,09H>map: map<13,10>'&|
'<09H,09H>});<13,10>'&|
'<09H,09H><13,10>'&|
'<09H,09H>// add an event listener for this marker<13,10>'&|
'<09H,09H>bindInfoWindow(marker, map, infowindow, "<<p>" + arrDestinations[i].description + "<</p>"); <13,10>'&|
'<09H>}<13,10>'&|
'<09H>}<13,10>'&|
'<13,10>'&|
'<09H>function bindInfoWindow(marker, map, infowindow, html) {{ <13,10>'&|
'<09H,09H>google.maps.event.addListener(marker, ''click'', function() {{ <13,10>'&|
'<09H,09H>infowindow.setContent(html); <13,10>'&|
'<09H,09H>infowindow.open(map, marker); <13,10>'&|
'<09H>}); <13,10>'&|
'<09H>} <13,10>'&|
'<13,10>'&|
'<09H>google.maps.event.addDomListener(window, ''load'', initialize);<13,10>'&|
'<13,10>'&|
' <</script> <13,10>'&|
' <</body><13,10>'&|
' <</html><13,10>'&|
'',net:OnlyIfUTF,net:StoreAsAscii)