Virtual Earth SDKで正式にはIPアドレスから位置情報の取得はサポートしていませんが、次のアドレス http://maps.live.com/WiFiIPService/locate.ashx を利用して取得が可能です。ただし特定のIPアドレスを指定して位置情報を取得という使い方はできません。
上のURL先にアクセスすると
SetAutoLocateViewport(35.761944, 139.733194, 7, false, "お使いのコンピュータの IP アドレスから場所を特定しました。");
というような文字列が返ってきます。「35.761944, 139.733194」のところが経緯度になってます。SetAutoLocateViewportという名前の関数を呼び出す形になっているので、JavaScriptでこの名前の関数を用意しておいて、コールバックしてもらうというスンポーです。
たとえばこんな感じ。第3引数はたぶん ちょうどよいズームレベルで、第4引数はよくわかりません。
function SetAutoLocateViewport(latitude, longitude, lvl, bl, msg) {
var latlong = new VELatLong(latitude, longitude);
var pin = new VEShape(VEShapeType.Pushpin, latlong);
pin.SetTitle(msg);
pin.SetDescription(latitude + ', ' + longitude);
map.AddShape(pin);
map.SetCenterAndZoom(latlong, lvl);
}
もし何らかのエラーが発生した場合は、SetAutoLocateViewportではなく、ShowMessageを呼ぶ文字列が返ってくるようです。
function ShowMessage(msg) {
alert(msg);
}
MSDNライブラリには、AjaxによりURLにアクセスし 得られた文字列をevalするという記事がありますが、もはや動かないコードのようです。もっと単純にscriptタグで参照するようにすれば動きます。下のコードは、ページの最後にマップを初期化する自作関数pageLoadedを呼び出した後に挿入しています。
<body>
<div id='myMap' style="position:absolute; width:400px; height:400px;"></div>
<script type="text/javascript">
pageLoaded();
</script>
<script type="text/javascript" src="http://maps.live.com/WiFiIPService/locate.ashx"></script>
</body>
実行結果は以下の感じ。クリックすると実際のページに移動します。
日本というのはあってるのだけどねー。ちなみに、英語のLive Mapsにはこの機能が付いています。Optionsから「Locate Me」ボタン。
フィードバック
# AutoLocateUndetectable
2008/04/29 21:32 by
AutoLocateUndetectable
# EZcIKClSWijdqwb
2018/08/16 7:38 by
F6sFI7 It as not that I want to duplicate your web-site, but I really like the style and design. Could you let me know which style are you using? Or was it especially designed?
# nTlzeEBuKO
2018/08/17 21:17 by
Wow, amazing weblog format! How lengthy have you been blogging for? you make running a blog look easy. The whole look of your web site is fantastic, let alone the content material!
# NsNMHTnxYgPJuokVX
2018/08/17 22:59 by
This blog was how do you say it? Relevant!! Finally I ave found something that helped me. Appreciate it!
# wvtTXfwXiSOfMllIZCF
2018/08/18 4:35 by
Perfectly written content, thanks for selective information.
# NAqQLOoCmRCt
2018/08/18 5:41 by
Im obliged for the blog post.Much thanks again.
# kNmqmNElVQqAsqJSb
2018/08/18 6:00 by
I visited a lot of website but I think this one contains something special in it.
# KhLzEKuGasUowApXdsO
2018/08/18 15:14 by
It as not that I want to copy your web page, but I really like the style. Could you let me know which theme are you using? Or was it especially designed?
# zBQShJXpUgUGltgO
2018/08/18 17:59 by
This page definitely has all of the information and facts I needed about this subject and didn at know who to ask.
# CmdAIbmTvuuAa
2018/08/18 19:10 by
My brother recommended I might like this blog. He was entirely right. This post truly made my day. You cann at imagine simply how much time I had spent for this info! Thanks!
# GBduuCSEBAyCwjo
2018/08/18 19:35 by
We appreciate you the specific beneficial specifics! I might not have identified out this specific personally!
# YfPBbYDkig
2018/08/19 0:49 by
Well I definitely enjoyed reading it. This tip procured by you is very effective for proper planning.
# aIFCKwxPBdFlh
2018/08/19 1:05 by
Ia??a?аАа?аАТ?а? ve read some good stuff here. Definitely price bookmarking for revisiting. I surprise how so much effort you place to make this sort of magnificent informative website.
# pHPqnShJoz
2018/08/19 2:52 by
Im thankful for the blog article. Want more.
# KvLBwqWrJHznlXuEW
2018/08/20 20:30 by
Just desire to say your article is as surprising.
# YWTKkIollyfdIBT
2018/08/21 13:30 by
There is a bundle to know about this. You made good points also.
# ORHBaGTZyFM
2018/08/21 13:45 by
Its hard to find good help I am constantnly saying that its difficult to procure good help, but here is
# kZIptvFtrAxf
2018/08/21 22:16 by
This awesome blog is definitely entertaining and besides diverting. I have chosen helluva handy advices out of this blog. I ad love to return over and over again. Cheers!
# YXSqkgKQnzfYRmouiOh
2018/08/21 22:33 by
You made some decent points there. I did a search on the issue and found most individuals will agree with your website.
# lbDIXCTrHLrrYPhDCF
2018/08/22 13:25 by
Thanks again for the article post. Fantastic.
# uBKHeWrCHKDFE
2018/08/23 0:36 by
Really enjoyed this article.Thanks Again. Awesome.
# QUaYgCvyBKHIriiF
2018/08/23 13:28 by
You have made some good points there. I looked on the net for additional information about the issue and found most individuals will go along with your views on this site.
# ZmnmYxNupCuBzdNjhg
2018/08/23 15:57 by
You ave made some really good points there. I checked on the net to learn more about the issue and found most individuals will go along with your views on this website.
# hTgOAdsVagPTJCTO
2018/08/24 9:16 by
There is definately a great deal to know about this topic. I really like all of the points you made.
# uGcOMArkHloyKFeDuWa
2018/08/24 15:49 by
I'а?ve read several just right stuff here. Certainly price bookmarking for revisiting. I wonder how a lot effort you set to create such a fantastic informative web site.
# zHdBaTQWvUorrxEH
2018/08/27 22:02 by
My website is in the very same area of interest as yours and my users would truly benefit from
# DlbtXfUCnyresMEKLH
2018/08/27 22:16 by
Im grateful for the blog.Really looking forward to read more. Keep writing.
# xrpLQKYZGEGWLblccDo
2018/08/28 4:52 by
Wow, fantastic blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your web site is excellent, let alone the content!
# yrHTLFrJspLX
2018/08/28 10:19 by
Im obliged for the blog article.Really looking forward to read more. Fantastic.
# nJcbXUZzSif
2018/08/28 20:29 by
You can not believe simply how a lot time I had spent for this information!
# TkzOWKRPwBFguuPLe
2018/08/28 21:53 by
Thanks a lot for sharing this with all of us you really know what you are talking about! Bookmarked. Kindly also visit my web site =). We could have a link exchange arrangement between us!
# BPogXzWjtKiczd
2018/08/29 3:18 by
This unique blog is really awesome and besides amusing. I have chosen many useful tips out of this source. I ad love to return again and again. Cheers!
# VrXyIBjZvwhpuLlP
2018/08/29 7:43 by
It as very effortless to find out any topic on web as compared
# CnOSyzGkjMHj
2018/08/29 23:16 by
Thanks again for the blog.Thanks Again. Keep writing.
# wTrOydPafxtWHPEtJj
2018/08/30 0:46 by
I value the blog.Thanks Again. Keep writing.
# lkyAAVavfuRjrqqQ
2018/08/30 20:19 by
Your style is very unique compared to other people I ave read stuff from. Many thanks for posting when you have the opportunity, Guess I will just book mark this site.
# oytGOSmwtkjUFv
2018/08/30 21:47 by
Subsequently, after spending many hours on the internet at last We ave uncovered an individual that definitely does know what they are discussing many thanks a great deal wonderful post
# oMVLBRaasyOBQqM
2018/08/30 23:13 by
You made some good points there. I looked on the internet for the topic and found most guys will approve with your website.
# ekwYdQjQEUtKhNKS
2018/08/31 16:15 by
I value the blog post.Really looking forward to read more. Keep writing.
# JtMczmznCRbsoNYDa
2018/09/01 7:55 by
Wow! This blog looks exactly like my old one! It as on a completely different subject but it has pretty much the same layout and design. Outstanding choice of colors!
# kZtwhxEPNY
2018/09/01 10:18 by
I think other website proprietors should take this site as an model, very clean and wonderful user genial style and design, as well as the content. You are an expert in this topic!
# zDqGWcwqDx
2018/09/01 21:50 by
My brother recommended I might like this website. He was totally right. This post truly made my day. You cann at imagine simply how much time I had spent for this information! Thanks!
# JcJpupYdIJNEslbPh
2018/09/03 16:21 by
You have brought up a very excellent details, appreciate it for the post.
# ZKkhaUszWhq
2018/09/03 19:18 by
Simply wanna say that this is very useful, Thanks for taking your time to write this.
# dKRrHHofgcFXQ
2018/09/03 20:49 by
in the early hours in the dawn, because i love to gain knowledge of more and more.
# qlmGMGkiKfPeNV
2018/09/04 16:01 by
Wonderful article! We will be linking to this great post on our site. Keep up the good writing.
# vAcavXRpJBS
2018/09/04 21:01 by
Really informative article.Really looking forward to read more. Awesome.
# EyaCufeqzMMlJnX
2018/09/04 21:58 by
Thanks, I ave been hunting for facts about this topic for ages and yours is the best I ave found so far.
# SHgJLLvpFhFNJHowgd
2018/09/05 2:13 by
I think other web site proprietors should take this web site as an model, very clean and wonderful user friendly style and design, let alone the content. You are an expert in this topic!
# PlaDNZOEPHoclxeg
2018/09/05 2:38 by
these camera look like it was used in star trek movies.
# cUtbWFwlkoXOCxLBZ
2018/09/05 17:15 by
Major thankies for the article.Really looking forward to read more. Want more.
# YGjGaCBnczsoXmXkV
2018/09/05 18:22 by
lots up very fast! What host are you the usage of? Can I get
# zhPWQvtvzreNDY
2018/09/06 14:45 by
Looking forward to reading more. Great article.Really looking forward to read more. Great.
# IodgisjshB
2018/09/10 15:40 by
Muchos Gracias for your article.Thanks Again. Fantastic.
# GMafkzSZdB
2018/09/10 19:50 by
I was looking at some of your content on this site and I conceive this internet site is very instructive! Retain posting.
# yeNEpMWxwiAzre
2018/09/10 22:22 by
It as wonderful that you are getting ideas from this paragraph as well as from our argument made at this place.
# uQDNspmwPy
2018/09/12 0:02 by
ItA?Aа?а?s in reality a great and helpful piece of information. I am happy that you shared this helpful info with us. Please keep us up to date like this. Thanks for sharing.
# IDIQQkyRejBqq
2018/09/12 15:45 by
south korea jersey ??????30????????????????5??????????????? | ????????
# anPpEeTugFe
2018/09/12 17:20 by
you might have a terrific blog here! would you wish to make some invite posts on my blog?
# RtnYWuiBALSCDqicjiB
2018/09/12 18:58 by
I truly appreciate this article.Much thanks again. Keep writing.
# IavxooXtQsYNs
2018/09/13 1:20 by
Utterly pent articles , thankyou for entropy.
# WQKHRJICjNcKLZzftRC
2018/09/13 7:36 by
More Help What can be the ideal Joomla template for a magazine or feature wire service?
# OqjBdgNzlCVwIoWXZyv
2018/09/13 21:36 by
This site definitely has all the information and
# TLMTscMMhbbjoSHHpIA
2018/09/14 2:06 by
Thanks again for the blog article.Much thanks again. Keep writing.
# auMLebdmonc
2018/09/17 17:03 by
Thanks again for the blog article.Thanks Again. Great.
# ZnculLonvWVgGYCBY
2018/09/17 17:30 by
Very good blog post.Much thanks again. Much obliged.
# CjofFccHCfiobSgC
2018/09/18 4:59 by
This real estate product is a total solution that helps you through every step in the real estate market place, with document management and the best real estate analysis on the market.
# frXRYGOGGKeQoAjXp
2018/09/18 7:18 by
Thanks again for the article post.Really looking forward to read more. Want more.
# UXjCOJxYCYARVJQQvAe
2018/09/20 0:40 by
LOUIS VUITTON HANDBAGS ON SALE ??????30????????????????5??????????????? | ????????
# UyWqWdoETZRxhwb
2018/09/21 17:40 by
It as not that I want to duplicate your web site, but I really like the pattern. Could you tell me which theme are you using? Or was it tailor made?
# zasIMZXCIAegeMeP
2018/09/21 22:45 by
Im obliged for the article.Really looking forward to read more. Want more.
# JKVTUnvuNURnqjO
2018/09/22 3:25 by
It as hard to find experienced people in this particular subject, however, you sound like you know what you are talking about! Thanks
# aFKAwHSSlyOxmiC
2018/09/24 19:31 by
Just wanna admit that this is very helpful , Thanks for taking your time to write this.
# HSLnAmHAHdJhIV
2018/09/24 21:19 by
Really enjoyed this blog article. Great.
# vcEKUOVRdMZ
2018/09/24 23:27 by
This awesome blog is no doubt educating additionally factual. I have found a lot of useful stuff out of this amazing blog. I ad love to return over and over again. Thanks a bunch!
# rEZZdwAyNoZ
2018/09/25 16:10 by
You, my pal, ROCK! I found exactly the info I already searched everywhere and simply could not find it. What a perfect web site.
# rAKpTLTWyvE
2018/09/25 19:04 by
It as very effortless to find out any topic on web as compared
# okOrUALoWjgqahmg
2018/09/28 1:05 by
I truly appreciate this blog article.Much thanks again. Fantastic.
# hZFYOkundRpiTPY
2018/09/28 17:34 by
Major thanks for the article post.Thanks Again. Want more.
# YObqCJQUpcqAtOHQMas
2018/09/28 18:50 by
I truly appreciate this post. Much obliged.
# IturSkjNayizwalyd
2018/10/01 20:31 by
This very blog is without a doubt awesome and besides factual. I have picked many handy things out of it. I ad love to come back again and again. Thanks!
# EDBQYrlLZfjq
2018/10/02 4:03 by
Wow, fantastic blog layout! How long have you been blogging for? you made blogging look easy. The overall look of your website is wonderful, let alone the content!
# kmcxXMttGMpDycsW
2018/10/02 5:49 by
Your style is really unique in comparison to other folks I ave read stuff from. I appreciate you for posting when you have the opportunity, Guess I will just book mark this page.
# aRYpAHGcSsMY
2018/10/02 15:53 by
I was recommended this web site by my cousin. I am not sure whether this post is written by him as no one else know such detailed about my difficulty. You are incredible! Thanks!
# RCqnltSWXfkyOiKdj
2018/10/02 20:51 by
Its hard to find good help I am constantnly proclaiming that its hard to find quality help, but here is
# TltZqLYSBdGd
2018/10/03 20:58 by
Thanks so much for the article.Really looking forward to read more. Awesome.
# FNZKEdwsRXisqsdS
2018/10/03 21:48 by
Whoa! This blog looks just like my old one! It as on a entirely different topic but it has pretty much the same layout and design. Great choice of colors!
# uvVWzpcpsnbbqTld
2018/10/04 7:47 by
Thanks so much for the blog article.Thanks Again. Awesome.
# SuZeXLBTTonwFIV
2018/10/04 13:24 by
Thanks for the article.Really looking forward to read more. Awesome.
# DnhspuquTfVKWuITyo
2018/10/05 22:07 by
Yeah bookmaking this wasn at a risky conclusion great post!.
# ejWjXtmTbGOkTiPe
2018/10/05 22:54 by
Major thankies for the blog article.Thanks Again. Really Great. this site
# aqUjPNvMaJVAYTh
2018/10/06 3:10 by
I think this is a real great article.Thanks Again. Keep writing.
# adsQQZdbKwcVbMyubez
2018/10/06 4:03 by
Thanks a lot for sharing this with all people you actually recognize what you are talking about! Bookmarked. Please also consult with my site =). We could have a link exchange contract among us!
# HHjzznNUeRUbO
2018/10/06 22:26 by
Thanks again for the blog.Thanks Again. Much obliged.
# GTRermsyFYrSV
2018/10/07 0:46 by
Wow, amazing blog layout! How long have you been blogging for?
# fVENDfybtbYIQCc
2018/10/07 7:45 by
to take on a take a look at joining a world-wide-web dependent courting
# wMUkGeSOwH
2018/10/07 10:19 by
The information and facts talked about within the write-up are several of the best obtainable
# QtpXgALsRTB
2018/10/08 4:33 by
If you wish for to obtain a good deal from this piece of
# qKnFBkPeEsictw
2018/10/08 11:31 by
This web site really has all the information and facts I wanted concerning this subject and didn at know who to ask.
# UITJcuQDOZtpSPBQQDm
2018/10/08 16:54 by
Thanks for sharing this great piece. Very inspiring! (as always, btw)
# frEMbHdohzgbCxAXsx
2018/10/08 19:12 by
Im grateful for the article.Much thanks again. Want more.
# OEoMyJACLBCHkjEDAC
2018/10/09 11:56 by
Thanks for the post.Thanks Again. Really Great.
# OjxCpXKacilFthlVt
2018/10/10 14:18 by
You made some good points there. I looked on the internet for the issue and found most persons will go along with with your website.
# gAZULwrCrv
2018/10/10 18:09 by
Major thankies for the blog post.Much thanks again. Much obliged.
# vnrvcCRtIjrdDUa
2018/10/10 21:12 by
This content announced was alive extraordinarily informative after that valuable. People individuals are fixing a great post. Prevent go away.
# RGogdQcqbYUaX
2018/10/10 23:16 by
I was recommended this website by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my trouble. You are wonderful! Thanks!
# ljTbvbCkZfns
2018/10/11 13:37 by
I?ve read some just right stuff here. Definitely value bookmarking for revisiting. I surprise how so much attempt you place to make any such great informative website.
# khmgQnENwnRLBUkc
2018/10/11 22:25 by
My brother suggested I might like this web site. He was entirely right. This post actually made my day. You can not imagine just how much time I had spent for this information! Thanks!
# qRMUNiFmiTSaLSkvx
2018/10/12 2:11 by
Yay google is my queen assisted me to find this great internet site!.
# KNaZbVhYQqXlc
2018/10/12 6:05 by
Okay you are right, actually PHP is a open source and its help we can obtain free from any community or web page as it occurs at this place at this web page.
# QPvDOXZLNBZFlArZfjY
2018/10/12 21:39 by
I think this is a real great post. Keep writing.
# PhPxVgOUQca
2018/10/13 12:26 by
pretty handy stuff, overall I believe this is well worth a bookmark, thanks
# KklpMjoVKzCtA
2018/10/13 18:24 by
You ave made some decent points there. I checked on the web for more information about the issue and found most people will go along with your views on this site.
# gHkySPCYawyhuB
2018/10/13 21:19 by
Through Blogger, i have a blog using Blogspot. I would likie to know how to export all my posts from Blogspot to my newly created Weebly blog..
# CHwmlQnhVhadxnsZ
2018/10/14 5:32 by
This is the worst write-up of all, IaаАа?б?ТТ?а?а?аАа?б?ТТ?аБТ?ve read
# tosSSTVmZpYfbZo
2018/10/14 13:21 by
I went over this web site and I believe you have a lot of good info, saved to fav (:.
# hvHdQgEIJZ
2018/10/14 15:33 by
Thanks for the blog.Really looking forward to read more. Really Great.
# Air Max 270
2019/03/29 2:07 by
ggxxicmrrv,Definitely believe that which you said. Your favourite justification appeared to be on the net the simplest thing to remember of.
# Nike Vapormax Plus
2019/03/30 0:03 by
lfltoe,If you are going for best contents like I do, just go to see this web page daily because it offers quality contents, thanks!
# Yeezy
2019/04/05 6:10 by
ovoqgvnh,We have a team of experts who could get you the correct settings for Bellsouth net email login through which, you can easily configure your email account with MS Outlook.
# Nike Air Max 2019
2019/04/09 0:54 by
lyuwozthwee,This website truly has alll of the information and facts I wanted about this subject and didn?t know who to ask.
# Yeezys
2019/04/17 5:27 by
jezsxfwo Yeezy Boost 350,Thanks a lot for providing us with this recipe of Cranberry Brisket. I've been wanting to make this for a long time but I couldn't find the right recipe. Thanks to your help here, I can now make this dish easily.
# Nike Air Max 2019
2019/04/22 2:16 by
Rei Dalio, the founder of the Bridgewater Joint Fund, known as the "father of the hedge fund," said that capitalism is no longer applicable to most Americans. He said that the widening gap between the rich and the poor is creating a turbulent environment that has a disturbing resemblance to the economic and social unrest in the 1930s.
# Nike Outlet
2019/04/26 16:13 by
O'Neill expressed optimism about the economic outlook and stressed that according to the latest data released by Goldman Sachs Group, the global economic situation may soon stop falling.
# Nike Outlet
2019/04/28 16:26 by
Sanders, a leading Democratic presidential contender, said during a CNN town hall that he believes every American citizen ? presumably meaning those at least 18 years old ? should have the right to vote, even felons serving life sentences.
# Pittsburgh Steelers Jerseys
2019/05/04 19:50 by
"A lot of people believe (Rosen) is a better prospect than the quarterbacks in this draft," he said. "And so you get a chance to trade maybe a second round pick and get Josh Rosen and still use your first round picks on other players. I think that would be the route I would lean and look to go if I were one of these teams like the Dolphins, Redskins or Giants."
# Yeezy Boost 350
2019/05/05 1:10 by
Dorsey explained to the president that the number of followers fluctuates due to the company’s attempts to delete spam accounts and bots, per the paper. The White House essentially confirmed the Post’s reporting the next day.
# Yeezys
2019/05/11 11:42 by
Nouman Raja, 41, was fired from the Palm Beach Gardens Police Department shortly after he killed Corey Jones, 31, while on plainclothes duty, and was convicted last month by a jury of manslaughter and first-degree murder.
# NFL Jerseys
2019/05/13 3:33 by
The president continued: When Bernie Sanders made certain statements the other day, I said, ‘Well, that’s the end of his campaign.’ Then, what happened is everybody agreed with him.
# Nike Outlet
2019/05/17 11:27 by
# Jordan 12 Gym Red 2018
2019/05/31 10:00 by
# Travis Scott Jordan 1
2019/05/31 11:37 by
I think in two weeks,Jordan I will be 100 percent,Jordan he told TideSports.com. They won’t let me play golf for six weeks for some reason,Jordan but I am going to try and get that reduced.
# VaporMax Plus
2019/06/20 6:09 by
# NFL Jerseys Cheap
2019/06/29 9:14 by
# Nike Outlet store
2019/07/07 20:30 by
# Nike Outlet
2019/07/15 3:40 by
# Yeezy
2019/07/28 22:48 by
# Yeezy
2019/08/04 9:33 by
# VwooVuThCHQ
2021/07/03 2:47 by
Some truly prize blog posts on this internet site , bookmarked.
# hBilcUwyqvYD
2021/07/03 4:16 by
Im no expert, but I think you just made an excellent point. You undoubtedly fully understand what youre talking about, and I can really get behind that. Thanks for being so upfront and so honest.
# http://perfecthealthus.com
2021/12/24 10:41 by