User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 392,042 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,288 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 719 | Replies: 2
Reply
Join Date: Dec 2007
Posts: 3
Reputation: Renincuente is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Renincuente's Avatar
Renincuente Renincuente is offline Offline
Newbie Poster

Help Virtual Earth - Some pushpins dissappearing after map.Resize()

  #1  
Feb 22nd, 2008
Hello all:

I'm working on a user control that wraps some of the functionality of the VE maps. It can be "maximized" and "restored" by clicking on an image (just as the middle button of any window does).Initially the map is positioned in any city and can have several pushpins for different locations in that city. When the button is clicked and it is "maximized" some of the pushpins (actually most of them) dissappear , only 3 or 4 of 20 remain visible, BUT if i drag the map or move it with the arrows of the dashboard they appear again .

Inside the javascript function called by the onclick event for this image , the "core code" originally was as follows:

  1. //(...)Initialization stuff ...determining which is the new state , etc...
  2.  
  3. //Now the part that really do the change effect
  4.  
  5. var cent= mapVar.GetCenter();
  6. mapCtrl.className= newStateCSS; //the min-max effect is accomplished by a change of styles, mapCtrl is the container div
  7. mapVar.Resize(); //so the map fills the new size of the container
  8. mapVar.SetCenter(cent);

After that not working as intended, i've tried everything ...

First i was using the default shape layer and i thought "maybe is that" so later i decided to add the pushpins to another layer rather than the default one... Inside the onclick i've tested all of the following, (independently and combined... and c),d),e),f)g) also tested working only with the default layer ):

a)hide and show the layer,

b) create another layer, create pushpins on it with the info of the originals and then delete the original layer and add the new one

c)cycle through the pushpins and Hide/Show them

d)SetCenterAndZoom instead of only SetCenter

e)mapVar.Pan

f)mapVar.SetZoomLevel

g) used the "undocumented mapVar.m_vegraphicsmanager.Update();" some say it seems to solve things like this one in certain cases...

...All that and the result is always the same only 3 or 4 pushpins visible until the map is dragged/moved by the arrow control

Does anyone have another idea of how to "refresh" the map so all the pushpins are always visible?
Last edited by Renincuente : Feb 22nd, 2008 at 2:39 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2008
Location: Bangalore, India
Posts: 327
Reputation: DangerDev is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 31
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Whiz

Re: Virtual Earth - Some pushpins dissappearing after map.Resize()

  #2  
Feb 22nd, 2008
are you using any special framework library or you have written every thing by your self ?
A computer lets you make more mistakes faster than any invention in human history - with the possible exceptions of handguns and tequila.
~Mitch Ratcliffe
Reply With Quote  
Join Date: Dec 2007
Posts: 3
Reputation: Renincuente is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Renincuente's Avatar
Renincuente Renincuente is offline Offline
Newbie Poster

Re: Virtual Earth - Some pushpins dissappearing after map.Resize()

  #3  
Feb 22nd, 2008
No. Nothing special, just the Virtual Earth SDK for all the map-related behavior,and plain ASP.NET (C#) for the definition of the wrapper control and its server side (which consists only in its initialization and generation of the proper javascript functions, as all the work is performed at the client-side).
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 11:14 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC