Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Google Map API


  • Please log in to reply

#1
Gamer2bn

Gamer2bn

    Member

  • Member
  • PipPip
  • 48 posts
I want to upload an image I have into the google map api and add custom markers to it. I can already get as far as having my map in the API I just can't figure out how to set markers. Is there an easy to use a program or anything I can use to simply click on the map where I want a marker and then upload a file to me webhosting?

This is the map I want to add markers too but I will be adding them on a different domain and host.
http://gmapuploader....rame/qVEbTx4juO

It's a mapdump for an online mmo.
Any help or links to tutorials would be appreciated.
Thanks in advance.

Edited by Gamer2bn, 16 March 2008 - 08:07 PM.

  • 0

Advertisements


#2
Metallica

Metallica

    Spyware Veteran

  • GeekU Moderator
  • 33,101 posts
Hi Gamer2bn,

This is a piece of a php script I used to place markers on the coordinates fed by another program.
I think this is more or less similar to what you are looking for.
There isn't much php in this piece, so I'm hoping you can figure out what I did.



function createMarker(point, iconname, info) {
		var icon = new GIcon(baseIcon);
		icon.image = "<?php echo $urlAddress1 ?>/Images/now.png";
		var title = "<?php echo $tijdstip ?>";
		icon.iconAnchor = new GPoint(10, 35);
		var marker = new GMarker(point, icon);
		  var point1 = new GLatLng(  <?php echo $latmineen ?>,   <?php echo $longmineen ?>);
		  var point2 = new GLatLng(  <?php echo $latmintwee ?>,   <?php echo $longmintwee ?>);
		  var point3 = new GLatLng(  <?php echo $latmindrie ?>,   <?php echo $longmindrie ?>);
		  var point4 = new GLatLng(  <?php echo $latminvier ?>,   <?php echo $longminvier ?>);
		  var point5 = new GLatLng(  <?php echo $latminvijf ?>,   <?php echo $longminvijf ?>);
		  var now = "<?php echo $tijdstip ?>";
		  var icon = "<?php echo $urlAddress1 ?>/Images/now.png";
		  var icon1 = new GIcon();
		  icon1.image = "<?php echo $urlAddress1 ?>/Images/blauw1.png";
		  icon1.iconAnchor = new GPoint(10, 35);
		  var title1 = "<?php echo $tijdmineen ?>";
		  var title2 = "<?php echo $tijdmintwee ?>";
		  var title3 = "<?php echo $tijdmindrie ?>";
		  var title4 = "<?php echo $tijdminvier ?>";
		  var title5 = "<?php echo $tijdminvijf ?>";
		  var icon2 = new GIcon();
		  icon2.image = "<?php echo $urlAddress1 ?>/Images/blauw2.png";
		  icon2.iconAnchor = new GPoint(10, 35);
		  var icon3 = new GIcon();
		  icon3.image = "<?php echo $urlAddress1 ?>/Images/blauw3.png";
		  icon3.iconAnchor = new GPoint(10, 35);
		  var icon4 = new GIcon();
		  icon4.image = "<?php echo $urlAddress1 ?>/Images/blauw4.png";
		  icon4.iconAnchor = new GPoint(10, 35);
		  var icon5 = new GIcon();
		  icon5.image = "<?php echo $urlAddress1 ?>/Images/blauw5.png";
		  icon5.iconAnchor = new GPoint(10, 35);
		map.addOverlay(new GMarker(point1, {title: title1, icon: icon1}))
		map.addOverlay(new GMarker(point2, {title: title2, icon: icon2}))
		map.addOverlay(new GMarker(point3, {title: title3, icon: icon3}))
		map.addOverlay(new GMarker(point4, {title: title4, icon: icon4}))
		map.addOverlay(new GMarker(point5, {title: title5, icon: icon5}))
		map.addOverlay(createMarker(point, {title: now, icon: icon}))

I found a lot of usefull stuff about Google maps at this site:
http://econym.google...m/reference.htm

Regards,
  • 0

#3
Gamer2bn

Gamer2bn

    Member

  • Topic Starter
  • Member
  • PipPip
  • 48 posts
Thanks, that should work. I was hoping someone had made a user interface to add markers by now. I wanted other people to be able to add markers without access to any files. I should be able to at least just have them send me a screenshot to show where they want the markers though.
  • 0

#4
Metallica

Metallica

    Spyware Veteran

  • GeekU Moderator
  • 33,101 posts
The php script does get the latitude and longitude from an xml file it gets fed from another program.

We use it to follow the trucks at our company. :)

Not sure if you can use php on your site, but then you might be able to work out an interface.
  • 0

#5
Gamer2bn

Gamer2bn

    Member

  • Topic Starter
  • Member
  • PipPip
  • 48 posts
I can use php the problem is I don't know the language :).
  • 0

#6
Metallica

Metallica

    Spyware Veteran

  • GeekU Moderator
  • 33,101 posts

I can use php the problem is I don't know the language :).


Bummer. :)

It's not that difficult though. Can you tell me a little more about what you had in mind?
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP