Real Estate Forums

Website Usability Website usability is determined by user satisfaction, ease of learning, user ability to remember an organization and its functionalities.

Reply
 
Thread Tools Display Modes
Old 03-15-2006, 08:50 AM
coastal's Avatar
coastal coastal is offline
Advanced Webmaster
 
Join Date: Aug 2005
Location: Delaware
Posts: 1,209
coastal is on a distinguished road
Default Google Map manipulation

If someone could point me in the right direction it would be greatly appreciated.

I downloaded my google map api key and began to play around with some maps for my website. I have no problem creating the size of the map, pulling up coordinates and displaying these maps. But after trying for an hour I still can't set a simple red marker on a location.

Great free coordinate tool http://www.infosports.com/m/map.htm

My test site
http://www.coastalmobile.com/google-map-test.html

This is the code I have to create the map:
var map = new GMap(document.getElementById("map"));
map.addControl(new GSmallMapControl());

map.centerAndZoom(new GPoint(-75.15223503112793, 38.622302334540215), 4);

What do I add for a simple red dot in the middle?

I tried the examples at google with no luck.

btw, I saw some of your examples with custom icons rather than red dots. Very cool, I won't even ask how you made them. For now I'd be thrilled with simple red dots.
Reply With Quote
Old 03-15-2006, 09:58 AM
skipfactor skipfactor is offline
banned
 
Join Date: Jan 2005
Posts: 126
skipfactor is on a distinguished road
Default Re: Google Map manipulation

Try this, change the coordinates from 00.00 to where you want the marker to go & change the 'marker text' to the description you want on the marker:

Quote:
<script type="text/javascript">
//<![CDATA[

function createMarker(point, number) {
var marker = new GMarker(point);

// Show this marker's index in the info window when it is clicked.
var html = "" + number + "";
GEvent.addListener(marker, 'click', function() {
marker.openInfoWindowHtml(html);
});

return marker;

}
function onLoad() {
if (GBrowserIsCompatible()) {
var map = new GMap(document.getElementById("map"));
map.addControl(new GSmallMapControl());

map.centerAndZoom(new GPoint(-75.15223503112793, 38.622302334540215), 4);

var point = new GPoint(-00.00, 00.00);
var marker = createMarker(point,'marker text')
map.addOverlay(marker);

}
}

//]]>
</script>
Reply With Quote
Old 03-15-2006, 10:34 AM
coastal's Avatar
coastal coastal is offline
Advanced Webmaster
 
Join Date: Aug 2005
Location: Delaware
Posts: 1,209
coastal is on a distinguished road
Default Re: Google Map manipulation

Thank you SOOOOOO much. It took me another 30 minutes to get this to work (screwed up my google api key code) but this will certainly do the trick!

Thank you, thank you, thank you!!! If you want a few free one way links just let me know!
Reply With Quote
Old 03-15-2006, 11:30 AM
coastal's Avatar
coastal coastal is offline
Advanced Webmaster
 
Join Date: Aug 2005
Location: Delaware
Posts: 1,209
coastal is on a distinguished road
Default Re: Google Map manipulation

Weeeee!!!

http://www.coastalmobile.com/open-test.html

Just playing with my new toy!
Reply With Quote
Old 03-15-2006, 12:35 PM
skipfactor skipfactor is offline
banned
 
Join Date: Jan 2005
Posts: 126
skipfactor is on a distinguished road
Default Re: Google Map manipulation

No problem, thanks for the coordinates tool; I've been doing it the hard way.

By the way, here's the code to add a thumbnail to the marker bubble:

Quote:
var point = new GPoint(-00.00, 00.00);
var marker = createMarker(point,'<img src="http://www.domain.com/thumbnail.jpg"><br>marker text')
map.addOverlay(marker);

Last edited by skipfactor : 03-15-2006 at 12:45 PM.
Reply With Quote
Old 03-16-2006, 04:26 AM
coastal's Avatar
coastal coastal is offline
Advanced Webmaster
 
Join Date: Aug 2005
Location: Delaware
Posts: 1,209
coastal is on a distinguished road
Default Re: Google Map manipulation

Indeed it works!!! http://www.coastalmobile.com/cm-test2.html

And to add colored text and multiple lines of text to the marker bubble?

I tried html and all I got was a map that did not work.

How about the code to make my actual markers my company logo gif instead of the red marker?

Then I need to learn how to stick a whole home tour (8 homes on one map)

Argh, I think I should just stick with one home- one map, or sign up for some computer code classes at the local community college. I know just enough that after hours of manipulating other peoples code I can sometimes get things to work.
Reply With Quote
Old 03-16-2006, 10:00 PM
Aaron Aaron is offline
Real Estate Webmasters Staff
 
Join Date: Jun 2005
Location: Nanaimo
Posts: 5,978
Aaron is on a distinguished road
Send a message via MSN to Aaron
Default Re: Google Map manipulation

Nice Google Map :-) I suppose you've seen this guys site?
http://www.econym.demon.co.uk/googlemaps/

It is the best resource for google map examples I have found..

It helped me make this
http://www.thesarasotamls.com/gmap.php

:-D
Reply With Quote
Old 03-17-2006, 02:49 AM
coastal's Avatar
coastal coastal is offline
Advanced Webmaster
 
Join Date: Aug 2005
Location: Delaware
Posts: 1,209
coastal is on a distinguished road
Default Re: Google Map manipulation

Thank you again. You guys are absolutely incredible. I think I have found a new home. There is more than enough information at this site to keep me busy for the next few years!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

REW Conference

For our members

Main Sections

IDX Coverage Areas

Spiders Welcome

All times are GMT -7. The time now is 09:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.