Loading

Google Map For Your Web Applications

Submitted by: 
Language: 
Visitors have accessed this post 6696 times.


Hey , its so simple.

Where am I?

[inline:whereamid.jpg=Where Am I]

The current location of the map is where I am situated. Copy and paste the code to you web projects making it NEAT.

You can also use the ff. link to get the coordinates of the location you want to appear.

http://www.gorissen.info/Pierre/maps/googleMapLocation.php

Get the latitude and longitude from the link and replace the line below.

  1. map.setCenter(new GLatLng(x, y), 12);

x is your latitude and y is your longitude.

Future updates.

Location change by coordinates
Location change by hotspots

Cheers!




Comments

Hi I'm joi... were doing a community security system for our capstone.. How can we make a searching map for a subdivision only... Example if I'm a visitor and I don't know the exact location of the person I wanted to go... all i need is to search the name of the person....then the X mark would say the location I'm looking at.... Please help me..Thanks :))

Sorry for not getting back to you the soonest.

Anyway, since your scope is smaller than what Google Map can offer, you can use Image Maps to do this. There are a lot of examples out there using Image Maps. I'm saying this in ASP.NET view because I've never tried Image Maps in other languages.

If you're not into .NET, you can still use the code above.

Here are the steps you can use. (Please, do correct me if I'm wrong)

1. You should be able to get the map location of that person. Somebody written a tool for that found here.

http://www.gorissen.info/Pierre/maps/googleMapLocation.php

If the page is not available, do search on Google on how to get coordinates for google map.

Use the tool to get coordinates of the specific address, copy and save it to your database.

2. Rewrite the script of the map used during the return query of the person's location specifically this part of the script

> map.setCenter(new GLatLng(x, y), 12);

where x and y are the saved values of the coordinates. Don't mind the value "12" , it has something to do with the zoom level of the map. Play with it anyway.

To rewrite means to supply the x and y values in "map.setCenter(new GLatLng(x, y), 12);" code.

There are also many ways to do this, either via javascript or the server code(your choice of language)

HTH

Cheers,

 

johnnyraventray@gmail.com
.NET Web And Winforms Applications Developer / C# / VB.NET / ASP.NET
Yahoomail ! fanged_raven@yahoo.com

Add new comment

(If you're a human, don't change the following field)
Your first name.
(If you're a human, don't change the following field)
Your first name.

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
To prevent automated spam submissions leave this field empty.