Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to add point to gis map using asp.net c#

Posted on 2010-09-05
4
Medium Priority
?
2,081 Views
Last Modified: 2012-05-10
Hello,
I have this case ,
- I have asp.net c# web  application stores information about Incidents including the coordinates of that indecent The XY that he already taken by a GPS device ,all these info. is stored in sql server 2008 DB

what I want is to plot that XY point on the map with some info on it ,
the map should be web application too  

what I have : - ArcGis server 9.3.1 (installed )
                         ArcGis desktop 9.3 (installed )
                         ArcSde 9.2 (installed and successfully connected with sql server)
                         MS VS.NET 2008 (installed )
                        Sql server 2008 (installed on a remote machine )

the question is how to accomplish that , what is the steps should I walk through ?
thanks in advance  
0
Comment
Question by:palserv
4 Comments
 
LVL 3

Assisted Solution

by:AndyEastham
AndyEastham earned 1000 total points
ID: 33609712
Hi,

Have you considered doing this with the Google Earth API?
http://code.google.com/apis/earth/

Andy
0
 
LVL 13

Accepted Solution

by:
Molnar István earned 1000 total points
ID: 33644516
i didn't work with arcgis, but here is some idea how you can accomplish that in google map:
a.) you can use google map api
1. retrieve data from the database with asp.net (c#)
2. after you get the data from the database, create some variables for X and Y coordinates in C# and add the data from the database to these variables
3. pass these server variables to javascript which contains the coords
    (ex: java script:
                               var ClientVariableX = '<%= ServerVaraibleX %>';
                                var ClientVariableY = '<%= ServerVaraibleY %>';)
4. create markers with info window from the x, y data in google map
(see JS code below))
5. add the JS in the body of page
b.) you can use for free the Subgurim google map asp.net user control http://en.googlemaps.subgurim.net/ to accomplish the above

if you deside to use google map, here is a good starting site with many useful examples:
http://econym.org.uk/gmap/

hope it helps you
<script type="text/javascript">

    var ClientVariableLat = '<%= ServerVaraibleLat %>';
    var ClientVariableLng = '<%= ServerVaraibleLng %>';
    
    if (GBrowserIsCompatible()) 
    { 

      function createMarker(point,html) 
      {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});
        return marker;
      }

      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(43.907787,-79.359741),8); //set the initial location
    

      var point = new GLatLng(ClientVariableLat,ClientVariableLng);
      var marker = createMarker(point,'write here some stuff to display in the info Window')
      map.addOverlay(marker);

    }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }

    </script>

Open in new window

0
 

Author Comment

by:palserv
ID: 33661243
I appreciate your help , but the institution I work for is using ArcGis software and have its own maps and gis database , so google maps doesn't apply my needs

thanks
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…

972 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question