Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 962095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:27:03+00:00 2026-05-16T01:27:03+00:00

I have successfully implemented code to plot multiple locations on google maps dynamically. Solution:

  • 0

I have successfully implemented code to plot multiple locations on google maps dynamically.

Solution: (link)

I am trying to create customized labels, like this:

http://www.codeproject.com/KB/scripting/Use_of_Google_Map/ex7.JPG

using Tom Morgan’s marker:

http://abhi2434.googlepages.com/tlabel.2.05.js

adapted with this code below. (!My goal is to keep the first code I am already using but allow the custom markers from the second code! Every time I try to adapt the second code, it fails….)

Google Maps

<div id="map" style="width: 550px; height: 450px"></div>

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

if (GBrowserIsCompatible()) {
    var openbubble=true;
    var agent = navigator.userAgent.toLowerCase();
// For IE We need to Do this
    if ((agent.indexOf("msie") > -1) && (agent.indexOf("opera") < 1)){
    var loader = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
        src='gmarker.png', sizingMethod='crop');";
    icon = '<div  style="height:34px; width:20px; ' +loader+ '" ></div>'
  }  

  var n=0;
    function createTLabel(point,html) {
    var label = new TLabel();
     label.id = 'Label '+n;
     label.anchorLatLng = point;
     label.anchorPoint = 'bottomCenter';
     label.content = html;
     label.markerOffset = new GSize(-1,-5);
     map.addTLabel(label);
     var obj=document.getElementById(label.id);
     GEvent.addDomListener(obj, "click", function() {
            //map.openInfoWindowHtml(point, html, {pixelOffset: new GSize(0,-34)} );
     });         

     n++;
  }

  var map = new GMap2(document.getElementById("map"));
  map.addControl(new GLargeMapControl());
  map.addControl(new GMapTypeControl());
  map.setCenter(new GLatLng(43.907787,-79.359741),8);
  // Creating the HTML to show markers
  var hContent = '<div style="padding: 0px 0px 13px 0px; background: url(
      images/pt_bot_ctr_ora.png) no-repeat bottom center;">
      <div style="text-align: center; background-color: #f2c30c; padding: 2px;
       font-size: 0.75em; font-weight: bold;" onclick="openInfo(\'hInfo\')">MyInfo
       </div>';
  hContent+='<div id="hInfo" style="position: absolute; display: none;">';
  hContent+='<div style="width: 81px; background-color: #000; padding: 3px;
       font-size: 0.75em; color: #fff; text-align: left; border: 1px solid #f2c30c;">
       This is my content</div>';
  hContent+='</div></div>';
  createTLabel(new GLatLng(43.65654,-79.90138),hContent);

}

else {
  alert("Sorry, the Google Maps API is not compatible with this browser");
}
function openInfo(d)
{
    var obj = document.getElementById(d);
    if(openbubble==true)
    {
        obj.style.display="block";
        openbubble=false;
    }
    else
    {
        obj.style.display="none";
        openbubble=true;
    }
}
//]]>
</script>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:27:03+00:00Added an answer on May 16, 2026 at 1:27 am

    tlabel is out-dated. I solved this using Mike Williams’ elabel:

    http://econym.org.uk/gmap/elabel.htm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 509k
  • Answers 509k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In a hypothetical language that offers both mutable and immutable,… May 16, 2026 at 4:44 pm
  • Editorial Team
    Editorial Team added an answer One good way could be to use firebug(firefox) or debugbar… May 16, 2026 at 4:44 pm
  • Editorial Team
    Editorial Team added an answer If you don't want to create a new activity for… May 16, 2026 at 4:44 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have successfully implemented this from android to a java httpservlet on google app
I have successfully implemented the scrollTo jQuery plugin which scrolls to the next div
I have successfully implemented this method of using the Win32 API to set the
I have successfully implemented my GridView now, but, as always, the whole ASP.NET life
I have successfully implemented printing and print preview for my app using the PrintDocument,
I'm a complete noob to jquery and jquery ui but have successfully implemented a
On my new customer page , I have successfully implemented a jQuery show/hide toggle
I have successfully implemented a custom SimpleCursorAdapter for an AutoCompleteTextView, which suggests entries from
I have implemented a HttpModule in ASP.NET (framework 2.0). From my logging on the
I have a custom object that I am trying to bind to a control.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.