sg

Çarşamba, Ocak 18, 2006

Changing center without reloading markers


I'm working on my first app that loads addresses and lats/longs from
sql server via ASP, loops through the records and creates about 600
markers on my map, which is zoomed to a regional level (either 4 or 5,
not sure which is going to be best yet.)

I then offer users the ability to pick from a list of towns and other
landmarks -- if they pick something from the list, it takes them to a
new page that reloads all the same data and sets all the same markers,
but now they are zoomed into level 2 of where they want to look. I use
vbscript to pass on the lat and long of the new zoom level, such as

<a href
="default2.asp?frmx=-74.1711880409&frmy=40.7700270667&frmzoom=2">

I then insert the values into my map like this:

<%
lng=request("frmx")
lat=request("frmy")
zoom = request("frmzoom")%>
.....
map.centerAndZoom(new GPoint(<%=lng%>, <%=lat%>),<%=zoom%>);

This works, but doesn't seem very efficient -- is there any way I can
do the same job without having to loop through and reload all 600+
markers?

Thanks!

0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık