/    Sign up×
Community /Pin to ProfileBookmark

can u plz help me out ……

i m using google map i want to place an image out of the map depending on the zoom value with the help of switch…..i m not getting how can i place image on form…
the code is as follows….
<%@ Page Language=”VB” AutoEventWireup=”false” CodeFile=”Default2.aspx.vb” Inherits=”Default2″ %>

<%@ Register Assembly=”RadAjax.Net2″ Namespace=”Telerik.WebControls” TagPrefix=”radA” %>

<%@ Register Assembly=”MapControl” Namespace=”MapControl” TagPrefix=”cc1″ %>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>

<html xmlns=”http://www.w3.org/1999/xhtml” >
<head runat=”server”>
<title>Untitled Page</title>
<script src=”http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAr4lvJZZsbnE2KTEc0sZMAhRdzl_O507dDvdwDQeXLjhTE3KqthSejeMuX86CEQReaOjdMkJVSCwBUg” type=”text/javascript”></script>
<script type=”text/javascript”>

function initialize()
{
if (GBrowserIsCompatible())
{

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

map.setCenter(new GLatLng(-26.007, 133.6), 04);
GEvent.addListener(map,”zoomend”,function()
{addSlider(); });
}
function addSlider()
{
var temp = map.getZoom();
var imag = document.createElement(“img”);
//imag = new GControl();
imag.id=”silder”;
imag.src=”Images/line.GIF”;
imag.style.top = “10px”;
imag.style.right = “15px”;
imag.style.left=”100px”;
imag.style.position = “absolute”;
switch(temp)
{
case 3://i hav to place an image here
imag.getDefaultPosition = function()
{
return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(500, 320));
}

break;
case 4:
alert(temp);
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
case 11:
break;
case 12:
break;

}
}

can any one plz help me………..

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @sonal spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...