开发者

Displaying website visitors on a map in real-time

I want to develop a webpage (in ASP.NET, C#) with a world map which can display pop-up bubbles whenever someone visits and logs in to our company's website. The bubbl开发者_高级运维es should appear in real-time, and it should display the user's name and location. Whenever the user logs in to our website, we have name and other personal information available in our database for that user.

Please suggest ways to implement this.

Thanks!

Updated:

By real-time update I mean a page with the map which gets refreshed as soon as any general public visits the home page, or one of our clients logs in to our website. These clients have login IDs provided by us to login to our website and they can be anywhere in the world.

Is there any way I can get to know when someone logs in to our website, and display the user's location on the map? Is it possible to do this without entering the login information in the database?


I hope you want to show like this http://forums.digitalpoint.com/usermap.php.

My suggestion is :- use some web service like getting Geo-location using users IP address. which will return Latitude and Longitude Check this URL using freegeoip.appspot.com http://shareourideas.com/2009/08/27/iplocation/

Using that lat and long positions you can add pin on map with bubble. check with this URL to add pin http://code.google.com/apis/maps/documentation/javascript/overlays.html#InfoWindows


I did tried with Gmaps on this, though not exactly as you want. But all i could do was getting static images from Gmaps v2 APIs since i was using WinForms. But V3 APIs shall provide javascript stuffs which are interactive. Dont know about bing APIs.


If you want to zoom arbitrary in/out of map then you should use map web services from Google or Microsoft. All these services allows you to put some pin (or images/tags) at some longitude/latitudes in the map, so you can use that for showing bubbles.

If you are OK with fixed resolution maps - for example, with map of say of 1000x1000 pixels, you can only show location with that accuracy. If this is acceptable then you can go with such approach because it will be faster (because you can cache map images at browser side etc) because there can be some lag in accessing map services.

You need to define what do you mean by real time updates? Who will access your web page - general public over internet or some inside people on corporate n/w having great connectivity to your server? Essentially, you have two ways to propagate updates from web server to browser - either you can do polling (that firing a async web service from browser or refreshing the entire web page at periodic intervals) or you can use long running HTTP requests (aka COMET). Advantage with later is that updates can be more real time/frequent - there are few implementations available for ASP.NET - see this SO thread for the same: Comet implementation for ASP.NET?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜