Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-09-05
4
Medium Priority
?
2,063 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
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…

670 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