Re: Points of interest
According to this thread: http://groups.google.com/group/Google-Maps-API/browse_thread/thread/5910bf6d775c68b9
getOverviewMap() always returns null so it appears google has taken
away functionality and placing markers on the "Over View map" is no
longer possible.
bnhcomputing
On Dec 15, 1:05 pm, Alchemy Code <lukasz.kosz...@gmail.com> wrote:
> Hi,
>
> You can create markers on the map inside a GOverviewMapControl just
> like you do it on map object.
>
> The only problem is that you can't add an overlay to any map until
> that map has been given a zoom level, and for GOverviewMapControl you
> must wait a while. If you're reading your marker information from
> something like an XML file it's fine, because the GOverviewMapControl
> zoom level will become defined before the status change. If you're
> using Javascript to create markers, then you can set up a timeout, and
> create your overlay markers when the timeout completes.
>
> You should try the following:
>
> // create the overview and obtain a reference to its GMap2
> var overview = new GOverviewMapControl();
> map.addControl(overview);
> ovmap=overview.getOverviewMap();
>
> // function to display a marker in the overview
> function displayOverviewMarkers() {
> var marker=new GMarker(new GLatLng(43.82589,-79.10040), smallIcon);
> ovmap.addOverlay(marker);
>
> }
>
> // queue a timeout to invoke that function
>
> setTimeout("displayOverviewMarkers()",1);
>
> On 15 Gru, 18:38, bnhcomputing <bnhcomput...@yahoo.com> wrote:
>
> > Using the Google Maps API, I have added a map to my site. I also have
> > the "small map control" in the lower right corner. My question is, is
> > there a way to get google maps to display "points of
> > interest" (churches, schools, hospitals, parks, etc.) automatically on
> > both the large and small versions without me having to manually supply
> > additional coordinates?
>
> > Thanks in advance.
>
> > bnhcomputing
--
You received this message because you are subscribed to the Google Groups "Google Maps API" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home