Solved

Overlaying a PNG Mask over a Google MAP

Posted on 2010-09-06
8
2,509 Views
Last Modified: 2013-11-19
Hi,

As most of you know, the Google Map uses the javascript and then you put the following code in the HTML
<div id="map"></div>
and it inserts it on the fly - I would like to make the map have rounded corners by overlaying a PNG on the top, but cant seem to work out how to do it or even if its possible.

Thanks for your comments!

Ben
0
Comment
Question by:intangiblemedia
8 Comments
 
LVL 50

Expert Comment

by:Steve Bink
ID: 33615109
Duplicate of http://www.experts-exchange.com/Software/Server_Software/Web_Servers/Microsoft_IIS/Q_26454485.html

Have you tried using CSS rounded corners, instead of a PNG? CSS3 has that functionality, and most browsers support it now.

http://jonraasch.com/blog/css-rounded-corners-in-all-browsers
0
 

Author Comment

by:intangiblemedia
ID: 33615555
Hi Routinet,

I did incorporating that styling to the DIV ID MAP of Google maps but it didnt work.

Regards,

Ben
0
 
LVL 50

Expert Comment

by:Steve Bink
ID: 33620816
What browser are you using (make and version)?  Please post the CSS you used for div#map.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:intangiblemedia
ID: 33623375
#map {
      width:982px;
      height: 499px;
      background-image: url(../images/map-loading.jpg);
      position: relative;
}

Using Firefox v 3.6.8
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 33817588
You can get a Google static map, and it may be more suitable for your needs.  Please see the article here.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_3350-Using-the-Google-Maps-API-in-PHP.html

What I would envision goes something like this.

1. Create a "mask" PNG image with a transparent center and opaque corners in the color that matches your background.
2. Acquire the Google map.
3. Use z-index to control the overlay of the two images.
0
 
LVL 38

Accepted Solution

by:
puppydogbuddy earned 500 total points
ID: 33817862
From this link:
          http://code.google.com/u/Ben.Talberg/updates
               (see api issues # 1654)
          http://code.google.com/p/gmaps-api-issues/

 Load gmap with the following commands:
    var mask = new MTrickOverlay();
    gmap.addOverlay(mask);

0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
html Uncheck Checkbox 2 25
Load data upon clicking a button 8 34
Code Manager | Snippits 2 36
Ouput in html in powershell 2 18
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question