On Dec 1, 2:01 pm, Amelia Griza-Padilla <[email protected]>
wrote:
> Hi Larry,
> Thanks so much for all your help!  Sorry, this is probably really
> simple but not sure how to do parse the coordinates out of the <Point>
> element so that it zooms to the point.
>
> Can you please explain?

My main point was you have two columns "geometry" and "Coordinates".
In row 1 for example, geometry contains:
<Point><coordinates>-118.246208,33.923831,0.0</coordinates></Point>

Coordinates contains:
33.923831,-118.246208

You need to extract those coordinates (latitude=33.923831,
longitude=-118.246208), use them to create a google.maps.LatLng
object, then use that as the argument to a call to map.setCenter().

It would be simpler to use the Coordinates column (just do a
String.split(",")), but you can parse it out of the kml.  I thought I
saw an example posted to the group that did that, you could try
searching for it (or maybe someone else can point to that reference, I
can't find it right now)

  -- Larry

>
> Best,
> Amelia
>
> On Nov 30, 11:41 pm, "[email protected]" <[email protected]>
> wrote:
>
>
>
>
>
>
>
> > On Nov 30, 5:38 am, "[email protected]" <[email protected]>
> > wrote:
>
> > > On Nov 29, 3:19 pm, Amelia Griza-Padilla <[email protected]>
> > > wrote:
>
> > > > Hello,
> > > > Having some issues with trying to zoom to selected features from a
> > > > drop down menu.  For some reason it changes the icon from blue to red,
> > > > does not zoom to the point and there is nothing in the info window
> > > > once you select a location from the drop down menu.
>
> > > Your "kml" column in the fusion table now contains markers, not
> > > polygons (if I recall your original map correctly, the kml column only
> > > contained polygons defining regions).
>
> > > The code assumes that kml will be polygons, you need to change it to
> > > account for the change in your fusion table.
>
> > geoxml3 is probably overkill for what is needed if all you have in the
> > fusion table are markers (it is pretty easy to parse the coordinates
> > out of the <Point> element),   and you already have the coordinates in
> > a separate column, that is redundant information (look at the kml in
> > the geometry column, that is all it contains), however, you will need
> > to decide how close you want to zoom for each marker.
>
> >   -- Larry
>
> > > There are examples that zoom to a group of 
> > > markers:http://www.geocodezip.com/www_vciregionmap_comC.html
>
> > > You could modify that to provide your required functionality.  The
> > > reason it looks like it is changing the icon to red, is that geoxml3
> > > puts a red marker on top of the existing blue one, you can hide it
> > > (like was done for the polygons) by calling setMap(null) on the
> > > _marker_ that is being places on the map by geoxml3:
>
> > > geoXml.docs[0].markers[0].setMap(null);  // (untested)
>
> > > (and probably remove other line that references
> > > geoXml.docs[0].gpolygons)
>
> > > > My goal is to be able to zoom to the feature once you select it from
> > > > the drop down menu and have the info window instantly pop up once the
> > > > location is selected.  (Ideally I would have liked a sidebar instead
> > > > but I'm having issues with the drop down, not sure if the code changes
> > > > a lot to achieve this instead).
>
> > > I have examples with sidebars also:
>
> > >http://www.geocodezip.com/geoxml3_test/v3_FusionTables_Watershed_Stew...
>
> > > However, note that each example depends heavily on the format of the
> > > Fusion Table being used, you will need to either change your Fusion
> > > Table to be consistent with the code or change the code to deal with
> > > the format of your Fusion Table.
>
> > >   -- Larry
>
> > > > Any help greatly appreciated.
>
> > > > Here is the 
> > > > link:http://www.advocacy.ucla.edu/Maps/UCLACommunityBanners.html
>
> > > > Thanks in advance for any assistance.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to