How to create an interactive map in ASP.NET - asp.net

I've created a page that shows a map of my complex. The idea is to put icons on the map representing where computers are located, and the user will be able to click on the icon to remote into the machine.
But I also want the icons to be moveable. Everyone should be able to open the page and drag the computer icon around. Is this possible using only ASP.NET?

you can use following options but not limited :)
Google Maps
Bing Maps
bing map sdk

You could use the html <map> and <area> tags along with an image of your complex to create a map that has points on it.
You can see an example of this here, however this is probably overkill for your requirements. All you need to do is set the coord and shape attributes for each area, this will give you an element that would represent the computers.
I'm not sure if you can manipulate these in javascript or jQuery though, as I have never tried, but hopefully this will give you a starting point.

Related

Asp.net How to set position for link buttons on a map

I am creating a search page based on continents. And I need to let the user click(choose) a continent and based on this choice. I do backend logic.
What I tried is to set a world map as a background of a div. And on this map I put the linkbuttons that represent the continent (as attached).
The problem is when I resize the screen the linkbuttons go into wrong positions. So please help me to find a way to PIN the buttons (continent names) to the map when resize or open the page on different screens.
Thank you.
Here is a link to a youtube video that shows you how to use google maps API. This may make what you are doing a little easier. I recently used this to create a mobile tour app.
Google Maps API
Thanks for trying to help. I just solved the problem and likeed to share the solution.
I have solved this using map on the image. So I made the continents clickable on the image without putting any controls on the image.

Tool for creating preview images from equirectangular Panoramas

I am looking for a tool or library that will allow me to generate a preview image for an equirectangular panoramic image. I am using the pannellum library [https://pannellum.org] to present panoramas, which works great. What I'd like to add, however, is a way to generate lightweight preview images to display on initial page load. I would like to have a small sized preview image that does not look warped. Does such a tool/library/script exist?
Thank you!
Dave
Some people like to convert panoramas to cube maps, which is a lot easier to google.
I've been looking at https://github.com/denivip/panorama, or also at https://stackoverflow.com/a/43469036/2471983 if you want a pure JavaScript approach (check out that entire question page for lots of info). Both of these will by default create all six cube faces; you can either edit them or just throw out the five extra faces.
Once you have this unprojected image, you can resize it using whatever utility you like.

Specific way of selecting a location on a google map

I've inherited a small project. The person before me created a native app for iPhone, implemented in objective-c, and my job is to remake it as a webapp with PhoneGap for iOS and Android.
In my predecessor's original implementation, part of the app has the functionality of allowing the user to drop a marker on a map to select a location. I found a comparable way of doing this, but the supervisor wants the exact way she'd done it, which I'm having a little trouble with. Let me describe:
In her native app, the map appears with a marker in the center of it. The user then slides the map around beneath the marker (which stays in place on the screen), until the marker is positioned over the spot they want. Then they hit a button marked "Select," and those coordinates are sent to the app for irrelevant other operations.
I'm trying to do the exact same thing with the google-maps javascript api and html/css, and I can't figure it out. Do any of you Gmaps pros have any ideas?
You may observe the center_changed-Event of the map. When it fires set the position of the marker to the new center of the map.
Another suggestion:
For a better effect instead of a marker you may use a custom control. You may insert a marker-image there so it will look like a marker. To place it in the center, push the control to
map.controls[google.maps.ControlPosition.RIGHT_CENTER]
(it will be vertically centered then) and apply the horizontal centering by adding a right-margin to the control

Changing nodes icon and clickable area in Google Maps Drawing Library (polygon)

As you know, Google Maps Drawing Library is easy to implement, but it gives very little control to the developer.
(Here is a sample of the library at use http://gmaps-samples-v3.googlecode.com/svn/trunk/drawing/drawing-tools.html )
I would like to change the default settings of drawing polygons in two ways:
first, I'd like to use another icon for the nodes connecting lines instead of the small square icon
second, I like to increase the clickable area around the initial node.
Do you know if it's possible to do these changes to the drawing library?
I appreciate your help.
It is not possible with the existing drawing manager functionality. Please go through the following issue in Google maps api issues
http://code.google.com/p/gmaps-api-issues/issues/detail?can=2&start=0&num=100&q=drawing%20library&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Stars%20ApiType%20Internal&groupby=&sort=&id=3760

Creating an interactive map with CSS

Based on the design below, is it possible to create the map just using CSS? If so, how?
So as you can see, when you hover over a state the name will appear and change the color of the state. On clicking it will info below the map per state.
UPDATE 1:
Can it be done using absolute positioning, z-index and hover states on a button?
UPDATE 2:
With a slight tweak to the design, would it be possible to have a flat image for the map and plotting dot's on it for each state that would include a hover (using the same tab style as the image example)? Each dot being an image. Am I right in saying that the complication of the design is to highlight the right area when hovered? Therefore, just having a dot would solve it right?
I was interested in this too and found this example (USA) MAP if you look into the source code there is area for each state that look like <area onmouseover="show(this)" onmouseout="hide()" onclick="fform.tg.checked=false;togl()" shape="poly" coords="179,33,174,66,230,67,225,35,179,33,179,33" href="us-nd.html">. You can read more about and tags in W3C link. I think its the only way how to do this without flash or something... But it cant be done without a little JS. To get the coords, I would asume you just open your image in some editor that shows coords(gimp or something) and manually find them out...
No. If it had rectangular shapes yes but with a lot of work.
You really need javascript on this one.
You might want to try a Javascript mapping library - www.openlayers.org is the market leader (and free and open source).
You get your US state map in the right format (GML for example) then you can pretty much cut n paste from one of the openlayers examples. Hovering and clicking are handled by event functions. They can then do things like updating your info box below the map.
Note that if you want Alaska and Hawaii as in the picture and all you can find is a geographic state map, you might have to use a GIS to shift the features around. Quantum GIS is a free and open-source GIS that can do this for you. Help for that can be found on gis.stackexchange.com!
If you're willing to use javascript, jQuery more specifically, here is a nice plug-in/tutorial on how to do what it seems like you'd like to. http://playground.mobily.pl/jquery/mobily-map.html. It won't do the states exactly, but it will allow you to drop pins and such.
Update: This seems to be exactly what you're looking for: http://playground.mobily.pl/tutorials/building-an-interactive-map-with-raphael.html. It includes a rather indepth tutorial as well.
Here is another interactive US map I found myself: http://www.fla-shop.com/products/html5/united-states/us/ It is purely javascript with customizable popups.

Resources