Lazy cat

oh ya

add XML to google map

Posted by eoe1985404 on April 27, 2009

new GGeoXml(urlOfXml)

e.g

var map;

function loadXML(url)
{
var gx = new GGeoXml(url);
map.addOverlay(gx);
}

<input  type=”button” value=”addXML” onclick=”loadXML(url)” />

Posted in Google Maps Api | Leave a Comment »

Address Search

Posted by eoe1985404 on April 22, 2009

GClientGeocoder.getLatLng(address, callback)

e.g

var geocoder = new GClientGeocoder();
geocoder.getLatLng(address, function(point)
{
if(!point)
{
alert(address+”not found”);
}
else
{
map.panTo(point);
}
var marker = new GMarker(point);
map.addOverlay(marker);
}
});
}

function load() {
if (GBrowserIsCompatible()){
map = new GMap2(document.getElementById(“map”));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());

var geoPoint = new GLatLng(39.92, -116.46);

map.setCenter(geoPoint, 4);

GEvent.addListener(map, “click”, function()
{
locate(prompt(“please enter your address”, “”));
});
}
}

Posted in Google Maps Api | Leave a Comment »

GMarker

Posted by eoe1985404 on April 1, 2009

Create a base GMarker:

new GMarker(point, opts)

e.g.

//create a variable of GLatLng

var geoPoint0 = new GLatLng(-41.277338815652385, 173.26722621917725);

map.setCenter(geoPoint0, 13);

//create a GMarker object

var marker0 = new GMarker(geoPoint0);

//create a mark and display marker0

map.addOverlay(marker0);

Create a GInfoWindow on GMarker:

1.openInfoWindowHtml()

GMarker.openInfowindowHtml(content, opts)

e.g.

marker0.openInfoWindowHtml(“<div style=’color:red;’>this is a testing</div>’);

2.openInfoWindow()

var div = document.createElement(“div”);

div.style.color = “red”;

div.innerHTML = “this is a openInfoWindow for GInfoWindow”;

marker0.openInfoWindow(div);

Create a GInfoWindow on GMap2:

GMap2.openInfoWindowHtml()

GMap2.openInfoWindowHtml(point, content, opts)

e.g.

map.openInfoWindowHtml(map.getCenter(), “<div style=’color:red;’>GInfoWindow on map</div>”)

Create GInfoWindowTab objects

new GInfoWindowTab(label, content)

e.g.

var tabs = [new GInfoWindowTab("Tab1", "This is tab1"),
new GInfoWindowTab("Tab2", "This is tab2"),
....
new GInfoWindowTab("TabN", "This is tabN")];
OR
var tabs =[];
…..
tabs[0] = new GInfoWindowTab(“Tab1″, “This is tab1″);
tabs[1] = new GInfoWindowTab(“Tab2″, “This is tab2″);
tabs[N] = new GInfoWindowTab(“TabN”, “This is tabN”);

Posted in Google Maps Api | Leave a Comment »

GControl

Posted by eoe1985404 on March 31, 2009

setting the controler:

map.addControl(new GSmallMapControl());

e.g.

var map;

function load(){

if (GBrowserIsCompatible())

{

map = new GMap2(document.getElementById(“map”));

map.addControl(new GSmallMapControl());

map.setCenter(new GLatLng(-41.277338815652385, 173.26722621917725),13);

}

}

Posted in Google Maps Api | 1 Comment »

Embed maps

Posted by eoe1985404 on March 31, 2009

Embed maps

plus in the maps:

<script src=”http://maps.google.com/maps?file=api&amp;v=2&amp;key=?” type=”text/javascript”></script>
<div id=”map” style=”width:500px; height:300px”></div>

pages load event:

<body onload=”load()” onunload=”GUnload”>

create object “GMap2”:

new GMap2(container, opts)

e.g.

map = new GMap2(document.getElementById(“map”));

setting the center of the map:

GMap2.setCenter(point, zoomlevel, opts)

e.g.

map.setCenter(new GLatLng(-41.277338815652385, 173.26722621917725), 13);

Moving to the map center:

GMap2.panTo(point)

setting maps type:

GMaps.setMapType(type)

e.g.

(G_NORMAL_MAP)   (G_STELLITE_MAP)  (G_HYBRID_MAP)

Posted in Google Maps Api | Leave a Comment »

Project Proposal

Posted by eoe1985404 on March 22, 2009

Fundamental Project Goal

To develop a website for travellers, and let them use their mobile devices to find a good deal for their meals. Such as Google maps, which you can search information and show location. But this website is let registrars publish their restaurant menu. Then travelers can search information from those restaurants, which nearby themselves.

Background

Mobile devices and wireless networks became popular. A Google map was a way to find out the things what the people looking for. Many countries setup 3G network or WI-FI in the city centre. Then website will become a tourist’s travel handbook, because it has a friendly interface, easy to update, faster and convenient. Other hands, many tourists want to save their travel expenses. Then a way to find out some good deal would be necessary.
Project Activities
Following questions will be found out the solution through the research and skill learning:
1. About the compatibility problems of the website. (Including uses different browser in laptop or uses mobile phone.)
2. How to deny the rubbish messages on the map.
3. How to let the shopkeepers have their own shops on the map. (This website will let shopkeeper to create an account on the maps and update the menu every day.)
4. How to let the shopkeepers to set the menu by themselves.
5. Display the name when tourists search their location. (E.g. search “Hardy Street”, it will show all restaurants in the Hardy Street. And Check the name it will show today’s menu.)
6. How to create a database for the maps including the street name and local name.
7. Route planning to selected restaurants.
8. Website security problem.
9. Normal tradition mapping website only has some administrators to edit the information but this website will be edit by many registrars.
10. Website extenuation problems

Skills Required

Website technical:
C#.NET
CSS+DIV
JavaScript and client side web development.
Ajax
Google maps API
Database technical:
SQL statement
Anticipated Outcomes
A prototype website will be implemented.
Required Resources
Website:
Microsoft Visual Studio 2008.
MSSQL/MYSQL
Google maps API
Web server:
Domains
Web hosting server with windows 2003
Support ASP.NET v2.0, ASP.NET AJAX, MSSQL/MYSQL.
Books:
Some books about Ajax and Google maps API

Possible Limitations

The limitations of the web server:
1. Server load.
2. Server connection speed.
3. Server security problems.
Inexperience with Web Service Programming.
Hardware availability may make mobile testing difficult.

Anticipated Timeline

Period Estimated Time (hours) Task
13/Feb – 15/Mar 50 Technique research
Create questions
16/Mar – 19/Apr 50 Skill learning
20 – 27/Apr 50 Solution of questions
27/Apr milestones Task 3 complete & consider designing
28/Apr – 17/May 50 Design the website structure
18 – 19/May 50 Modify and complete the structure
20/May milestones Task 5 complete & Consider programming
28/Jul-29/Aug 50 Start programming
30/Aug-25/Sep 50 Modify the website
26/Sep-10/Oct 30 Website testing
10/Oct milestones Task 8 complete & Website implement
11/Oct-24/Oct 30 Complete and evaluation the website
24/Oct milestones Report writing
25/Oct-Nov 120 Write report and prepare for presentation
Total: 530 Hours

Anticipated Ethical Issues

A project of this nature will require users to submit maybe personal information and their current location to the website so data of this type will be kept private as per the New Zealand Privacy act.

Posted in Others | Leave a Comment »

testing

Posted by eoe1985404 on February 25, 2009

Posted in Others | Leave a Comment »

Hello world!

Posted by eoe1985404 on February 25, 2009

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Posted in Others | Leave a Comment »