Thank you, xelawho!
Your first link actually helped me get to the bottom of two of three
issues (stretched image dimensions and the default "shadow" that I
hadn't been able to get rid of. The solution to those problems was to
add the following three lines of code to my mashup.htm file (now lines
50-52):
icon.iconSize=new GSize(16,16);
icon.shadowSize=new GSize(0,0);
icon.iconAnchor = new GPoint(8, 16);
It'd be nice if I could turn shadows off altogether...but setting that
shadowSize GSize to 0,0 at least keeps them from being visible. Also
(for others reading this), the iconAnchor GPoint values directly
correlate to the iconSize GSize. i.e. if my icon GSize was 20,20, I
might want to change that iconAnchor GPoint to 10,20 instead.
Your second link for info windows is actually a link I had reviewed
before. However, the sample code on that page is so different from
the "standard" Xiaoxi Wu's MarkerClusterer solution that I'm just not
smart enough to put 2 and 2 together. From a great deal more reading
on the subject, however, it seems as though the following code in the
marketclusterer.js file holds the key:
GEvent.addDomListener(div, "click", function () {
var pos = map.fromLatLngToDivPixel(latlng);
var sw = new GPoint(pos.x - padding, pos.y + padding);
sw = map.fromDivPixelToLatLng(sw);
var ne = new GPoint(pos.x + padding, pos.y - padding);
ne = map.fromDivPixelToLatLng(ne);
var zoom = map.getBoundsZoomLevel(new GLatLngBounds(sw, ne),
map.getSize());
map.setCenter(latlng, zoom);
});
Lines 639-647 in my marketclusterer.js file code. So it's telling the
page what to do when a marker is "clicked," but since my skills on
this particular type of scripting and Google Maps API work are
apparently so poor, nothing is happening when said click occurs.
Again, I'm trying to launch a simple info window in Google that will
display the following fields of information for each appropriate
record/location in the data.json file:
"client_id"
"client_name"
"client_url"
"client_info"
"mapformation_link"
So again, thank you for helping me figure out two of my three
lingering issues! Two down, one to go. I'll keep working on the info
window problem too, but if anyone else has ideas related to how to
call that information from a data.json file on a "click," I would be
grateful. Thanks! - Derek
--
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.