How to highlight the buildings/houses?

2,320 views
Skip to first unread message

Andrey Pas

unread,
Jan 8, 2011, 3:59:12 AM1/8/11
to KML Developer Support - Google Earth Plug-in
I want to highlight some buildings with different colors (from green
to red) on my web site. The list of buildings will be changing so I
need to put it in html. Please, advise how to do it better or where
can I find code example.

Josh L

unread,
Jan 10, 2011, 5:34:15 PM1/10/11
to KML Developer Support - Google Earth Plug-in
Hi Andrey,

It would be useful to know a bit more about what you have so far. For
example, do you have existing KML of your buildings? Are your
buildings that you need to color simply polygons, or also Models (for
example created using sketchup)?

Cheers,

-Josh

Andrey Pas

unread,
Jan 11, 2011, 4:04:28 PM1/11/11
to KML Developer Support - Google Earth Plug-in
I just have the addresses (or coordinates of the buildings). I want to
put the code in html or javascript to make some icons or polygons or
whatever with size equal about 20m above these houses coordinates.

Josh L

unread,
Jan 11, 2011, 5:54:14 PM1/11/11
to KML Developer Support - Google Earth Plug-in
Hi Andrey,

Thanks for clarifying. There are a number of ways to accomplish
this. Assuming you have the point coordinates for each building, you
can programmatically create some icons for each one. To save some
code, I recommend using the Earth API Utility Library (see
http://code.google.com/p/earth-api-utility-library/).

Here is an example of creating a point placemark (with custom icon)
and styled polygon/polyline:
http://earth-api-utility-library.googlecode.com/svn/trunk/extensions/examples/create-features.html

Note if you want to add altitude to the geometries, you can do
something like (for a Point):
gex.dom.addPointPlacemark([longitude, latitude, altitude], {
stockIcon: 'paddle/blu-circle',
name: 'House #1'
});

Cheers,

-Josh

imp

unread,
Jan 12, 2011, 8:14:19 PM1/12/11
to KML Developer Support - Google Earth Plug-in
Hi Josh,

I'm also a lot of interesting in highlight 3d object for mouse over.
Would you explain more about creating icon for building?

one more thing is, after finish Sketchup modeling and place them into
GE. how to get point coordinate from model?
Thanks,
Bernard

On 1월12일, 오전7시54분, Josh L wrote:
> Hi Andrey,
>
> Thanks for clarifying.  There are a number of ways to accomplish
> this.  Assuming you have the point coordinates for each building,  you
> can programmatically create some icons for each one.  To save some
> code, I recommend using the Earth API Utility Library (seehttp://code.google.com/p/earth-api-utility-library/).
>
> Here is an example of creating a point placemark (with custom icon)
> and styled polygon/polyline:http://earth-api-utility-library.googlecode.com/svn/trunk/extensions/...
Reply all
Reply to author
Forward
0 new messages