here

shrubberystatuesqueData Management

Dec 1, 2012 (4 years and 8 months ago)

178 views

Lesson 3 (GEOG863 MASHUP)
-

Questions


Question 1:

I would like to know how to change the background color of
the
information window or the border, or
margin, or padding.
I think I have read that it is not very flexible and hard to change the format of the
information window but I am not sure what can be changed and what is not.

Question 2:

I used

FOR

loop to create markers for each location. I don’t want to assume that I
know the center
location of all markers, so I tried to calculate the average point of all markers and made another for loop
and some function. Thus, if I have more points to make markers, I don’t need to change the center
coordinates of the map. But I am n
ot sure this is the best way to get an average of all points. If there is
an easier way or shorter code of calculating an average of an array

in JavaScript
, I would like to know.

Question 3:

Also I had to assume the zoom level to cover all points. It is po
ssible that if I don’t know where all points
will be located, the zoom level I chose might not show all points. When I checked, the center point of
the map is required and I don’t see any other options from Google MAP API reference. Is there a way to
set t
he map extent to cover all layers?

Question
4:

When I checked the samples of Google map API, there is one using
Google Fusion Table. It was shocking
to me that a map using database can be made by just a line of code, and I tried to use the same format
for
this project. After several tries, I was able to create a map using the Google Fusion Table that I
uploaded through my
Google

account from an excel table that I exported from the sample shapefile.
One thing I missed is that I couldn’t use the customized co
ne icon. I would like to know if I can use
customized icon when I use Google Fusion Table. Also,
I would like to set a visibility on columns
in the
information window
but don’t know how to. I tried to use query statement from the tutorials like “layer
= ne
w google.maps.FusionTablesLayer(817182, {query: "SELECT NAME, POPULATION FROM 817182"});”,
but it did not work.

It only lets you set a query and choose records you wa
nt to show, but I couldn’t find
a way to make only certain columns visible.

Question
5
:

In

most cases, this type of site would use a database like SQL or ORACLE. I would like to learn

how

to
create this site using a database

(MySQL, PostgreSQL, or any)
.


Question6:

When I tested my site at the local machine, the map type control is shown as on
e row. But when I
uploaded it to the PSU server and tested, it is shown as two rows. Why is it and how can I fix that?

Concern 1:

The HTML validator gave me one error for this code because of “&” in
src=
http://maps.google.com/maps/api/js?v=3.3&sensor=false
. I directly quoted this from
http://code.google.com/apis/maps/documentation/javascr
ipt/basics.html#Versioning

so I don’t know
how to fix it.