Search Results

Search found 34 results on 2 pages for 'pushpin'.

Page 1/2 | 1 2  | Next Page >

  • Silverlight - Adding Text to Pushpin in Bing Maps via C#

    - by Morano88
    I was able to make my silverlight Bing map accepts Mousclicks and converts them to Pushpins in C#. Now I want to show a text next to the PushPin as a description that appears when the mouse goes over the pin , I have no clue how to do that. What are the methods that enable me to do this thing? This is the C# code : public partial class MainPage : UserControl { private MapLayer m_PushpinLayer; public MainPage() { InitializeComponent(); base.Loaded += OnLoaded; } private void OnLoaded(object sender, RoutedEventArgs e) { base.Loaded -= OnLoaded; m_PushpinLayer = new MapLayer(); x_Map.Children.Add(m_PushpinLayer); x_Map.MouseClick += OnMouseClick; } private void AddPushpin(double latitude, double longitude) { Pushpin pushpin = new Pushpin(); pushpin.MouseEnter += OnMouseEnter; pushpin.MouseLeave += OnMouseLeave; m_PushpinLayer.AddChild(pushpin, new Location(latitude, longitude), PositionOrigin.BottomCenter); } private void OnMouseClick(object sender, MapMouseEventArgs e) { Point clickLocation = e.ViewportPoint; Location location = x_Map.ViewportPointToLocation(clickLocation); AddPushpin(location.Latitude, location.Longitude); } private void OnMouseLeave(object sender, MouseEventArgs e) { Pushpin pushpin = sender as Pushpin; // remove the pushpin transform when mouse leaves pushpin.RenderTransform = null; } private void OnMouseEnter(object sender, MouseEventArgs e) { Pushpin pushpin = sender as Pushpin; // scaling will shrink (less than 1) or enlarge (greater than 1) source element ScaleTransform st = new ScaleTransform(); st.ScaleX = 1.4; st.ScaleY = 1.4; // set center of scaling to center of pushpin st.CenterX = (pushpin as FrameworkElement).Height / 2; st.CenterY = (pushpin as FrameworkElement).Height / 2; pushpin.RenderTransform = st; } }

    Read the article

  • Bing maps silverlight control custom pushpin

    - by Razvi
    I tried to make a custom pushpin for the Bing Maps silverlight control, but I can only add 1 pushpin. At the second pushpin I get the following error: System.ArgumentException: Value does not fall within the expected range. at MS.Internal.XcpImports.CheckHResult(UInt32 hr) at MS.Internal.XcpImports.Collection_AddValue[T](PresentationFrameworkCollection`1 collection, CValue value) at MS.Internal.XcpImports.Collection_AddDependencyObject[T](PresentationFrameworkCollection`1 collection, DependencyObject value) at System.Windows.PresentationFrameworkCollection`1.AddDependencyObject(DependencyObject value) at System.Windows.Controls.UIElementCollection.AddInternal(UIElement value) at System.Windows.PresentationFrameworkCollection`1.Add(T value) at MapInfo.Silverlight.CitiesControl.MainPage.c_GetCitiesCompleted(Object sender, GetCitiesCompletedEventArgs e) Does anyone know what I might be doing wrong? I am setting the following properties before adding it to the map: public Location Location { get { return this.GetValue(MapLayer.PositionProperty) as Location; } set { this.SetValue(MapLayer.PositionProperty, value); } } this.SetValue(MapLayer.PositionOriginProperty, PositionOrigin.BottomLeft);

    Read the article

  • Changing Pushpin Text Color

    - by Yawus
    I'm attempting to display data through the text of a Pushpin object. However, the text color defaults to white which is nigh-invisible when the backdrop is a road-style MapView. Looking through the API, paying especially close attention to PushpinOptions, I couldn't find anything that manipulated text color. Considering that this seems to a fairly basic feature, I'm a little confused as to why it doesn't exist or at least is really hard to find. Am I missing something or does Bing Maps for Android really not let you change the default text color for a Pushpin object?

    Read the article

  • Silverlight Bing Maps - Pushpin

    - by user70192
    How do I make the Silverlight Bing Maps pushpin larger? The reason I want to make it larger is so that I can add more content into the head of the pushpin. However, I cannot figure out how to add the content I want to the head of the pushpin without it being cut off. Thank you,

    Read the article

  • Text not showing up in custom pushpins? Is there a way?

    - by Shakeeb Ahmad
    This is the code I am using to plot my custom pushpins on Bing Maps. I can't get the text to print on the pushpin icon which is just the default pushpin but in a different color. Is it even possible like this? Is there another way? I can't seem to find any, Help! var pushpinOptions = {icon: '/assets/greenpin.png', visible: true}; var pushpin = new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(lat, lng), pushpinOptions, {text: alphas[i] });

    Read the article

  • Silverlight - Bing Maps - Customize Pushpin Style

    - by user70192
    Hello, How do I customize the style of a pushpin on the Bing Maps Silverlight control? I have reviewed the documentation shown here (http://www.microsoft.com/maps/isdk/silverlightbeta/#MapControlInteractiveSdk.Tutorials.TutorialCustomPushpin). However, I am programmatically adding a variable number of Pushpins. Ideally, I would like to be able to set the style of each pushin, but I do not know how. Can someone show me how? Thank you!

    Read the article

  • MapItemsControls not updating Silverlight Bing Map

    - by Matt
    I'm using a MapItemsControl to control my Pushpin items within my Bing silverlight map. Right on the page load, I add a new pin programatically, and the pin shows up on the map. However I've now taken it further and I'm adding pins to my datasource via a click on the map. The new pins add to my datasource, but do not show up on the map. Do I need to rebind my datasource to my map control or somehow refresh the datasource? Here's some code <UserControl.Resources> <DataTemplate x:Key="PinData"> <m:Pushpin Location="{Binding Location}" PositionOrigin="BottomCenter" Width="Auto" Height="Auto" Cursor="Hand"> <m:Pushpin.Template> <ControlTemplate> <Grid> <myTestApp:MasterPin DataContext="{Binding}"/> </Grid> </ControlTemplate> </m:Pushpin.Template> </m:Pushpin> </DataTemplate> </UserControl.Resources> <Grid x:Name="LayoutRoot" Background="White"> <m:Map x:Name="myMap" CredentialsProvider="" Mode="Road" ScaleVisibility="Collapsed" > <m:MapItemsControl x:Name="mapItems" ItemTemplate="{StaticResource PinData}"/> </m:Map> </Grid> public partial class Map : UserControl { private List< BasePin > dataSource = new List< BasePin >(); public Map() { InitializeComponent(); _Initialize(); } private void _Initialize() { //this part works and adds a pin to the map dataSource.Add( new BaseSite( -33.881532, 18.440208 ) ); myMap.MouseClick += Map_MouseClick; mapItems.ItemsSource = dataSource; } public void Map_MouseClick(object sender, MapMouseEventArgs e)) { BasePin pin = new BasePin(); pin.Location = myMap.ViewportPointToLocation( e.ViewportPoint ); dataSource.Add( pin ); } }

    Read the article

  • Bing maps silverlight control pushpin scaling problems.

    - by Rares Musina
    Baiscally my problem is that i've adapted a piece of code found here http://social.msdn.microsoft.com/Forums/en-US/vemapcontroldev/thread/62e70670-f306-4bb7-8684-549979af91c1 which does exactly what I want it to do, that is scale some pushpin images according to the map's zoom level. The only problem is that I've adapted this code to run with the bing maps silverlight control (not virtual earth like in the original example) and now the images scale correclty, but they are repositioned and only reach the desired position when my zoom level is maximum. Any idea why? Help will be greatly appreciated :) Modified code below: var layer = new MapLayer(); map.AddChild(layer); //Sydney layer.AddChild(new Pin { ImageSource = new BitmapImage(new Uri("pin.png", UriKind.Relative)), MapInstance = map }, new Location(-33.86643, 151.2062), PositionMethod.Center); becomes something like layer.AddChild(new Pin { ImageSource = new BitmapImage(new Uri("pin.png", UriKind.Relative)), MapInstance = map }, new Location(-33.92485, 18.43883), PositionOrigin.BottomCenter); I am assuming it has something to do with a different way in which bing maps anchors its UIelements. Details on that are also very userful. Thank you!

    Read the article

  • Bing Maps - how to link to a push pin from a link outside the map

    - by Rajah
    I have a Virtual Earth Maps (Bing Maps??) to which I have added a set of pushpins. Each pushpin is labelled 1 to n. In addition to adding pushpins to the map, I also add text to the web-page that contains the description to each pushpin. I would like to add a link to the text outside the map, that when clicked will open the balloon associated with the corresponding pushpin. How do I open the balloon associated with a pushpin, through a link that exists outside the map? To get a better understanding, look at my map: link. When you click load, PushPins are added to the map. I would like to have a link from the list on the right of the map, that opens the corresponding PushPin. Thanks in advance!

    Read the article

  • Bing map silverlight control content rendering issue when page gets refresh

    - by M.Afnan
    When Bing map control loads for first time on any browser all pushpin on map are visible. Bing map control renders perfectly. Then I refresh browser it create rendering issue some custom pushpin on map gets disappeared. This behavior continues with pushpin. Pushpin are (.png) images and I am not using default bing map thumbtacks. May be it is issue of browser caching content or Bing map control rendering issues on various browsers. Waiting for your response.

    Read the article

  • WP7 - attempt to select and use application static resource in codebehind not working (no resources found).

    - by pearcewg
    With Windows Phone 7, I'm attempting to dynamically add controls to and object in codebehind, and apply a StaticResource to the new control. Xaml file sample: <phone:PhoneApplicationPage.Resources> <ControlTemplate x:Key="PushpinControlTemplateBlue" TargetType="my2:Pushpin"> ... </ControlTemplate> </phone:PhoneApplicationPage.Resources> Codebehind sample: >Pushpin myPush = new Pushpin(); >myPush.Location = new GeoCoordinate(52.569593, -0.9261151403188705); >myPush.Content = ""; >myPush.Template = (ControlTemplate)Application.Current.Resources["PushpinControlTemplateBlue"]; >mapMain.Children.Add(myPush); When I debug, and look at "Application.Current.Resources", there are no items in the collection, so the item is added to the controls list, but doesn't show up because it has no content. Is there something simple I'm doing wrong? How do I correctly access the resource?

    Read the article

  • Bing Map on Windows Phone - add click events to pushpins; display more details

    - by Will Gill
    I have a WP Phone app using a Bing Map control. I have an array of objects, and each object has a location. I iterate the array to place the pins on the map (see below). I have a touch event bound to each pin to allow the user to tap the pin to start an action. Now - I would like, on tap, to show information from the object that relates to that pin to be shown in a textbox. How can I retrieve the object from the array that corresponds to the pushpin that was tapped/clicked? foreach (wikiResult result in arrayResults) { double lat = double.Parse(result.Latitude, CultureInfo.InvariantCulture); double lng = double.Parse(result.Longitude, CultureInfo.InvariantCulture); statusTextBlock.Text = result.Latitude + " " + result.Longitude + " " + lat + " " + lng; GeoCoordinate d = new GeoCoordinate(lat, lng); Pushpin pin; pin = new Pushpin(); pin.Location = d; pin.Content = result.Name; pin.MouseLeftButtonUp += new MouseButtonEventHandler(pin1_MouseLeftButtonUp); myMap.Children.Add(pin); } void pin1_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { //display the content from the object in a text box } Many thanks in advance!

    Read the article

  • Silverlight Cream for November 21, 2011 -- #1171

    - by Dave Campbell
    In this Issue: Colin Eberhardt, Sumit Dutta, Morten Nielsen, Jesse Liberty, Jeff Blankenburg(-2-), Brian Noyes, and Tony Champion. Above the Fold: Silverlight: "PV Basics : Client-side Collections" Tony Champion WP7: "Pushpin Clustering with the Windows Phone 7 Bing Map control" Colin Eberhardt Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual Studio #LightSwitch Daily is up From SilverlightCream.com: Pushpin Clustering with the Windows Phone 7 Bing Map control Colin Eberhardt is back discussing Pushpins for a BingMaps app on WP7 and provides a utility class that clusters pushpins, allowing you to render 1000s of pins on an app ... all the explanation and all the code Part 22 - Windows Phone 7 - Tile Push Notification Part 22 in Sumit Dutta's WP7 series is about Tile Push Notification... nice tutorial with all the code listed Correctly displaying your current location Morten Nielsen demonstrates formatting the information from the GPS on your WP7 into something intelligible and useful Spiking the Pomodoro Timer Jesse Liberty put up a quick and dirty version of a Pomodoro timer for WP7.1 to explore the technical challenges of the Full Stack Phase 2 he's cranking up 31 Days of Mango | Day #11: Network Jeff Blankenburg's Number 10 in his 31 Days quest of WP7.1 is about the NetworkInformation namespace which gives you all sorts of info on the user's device network connection availability, type, etc. 31 Days of Mango | Day #11: Live Tiles Jeff Blankenburg takes off on Live Tiles for Day 11... big topic for a 1 day post, but he takes off on it... updating and Live Tiles too Working with Prism 4 Part 2: MVVM Basics and Commands Brian Noyes has part 2 of his Prism/MVVM series up at SilverlightShow... very nice tutorial on the basics of getting a view and viewmodel up, and setting up an ICommand to launch an Edit View... plus the code to peruse. PV Basics : Client-side Collections Tony Champion is startig a series on Silverlight 5 and Pivot Viewer... First up is some basics in dealing with the control in SL5 and talking about Client-side Collections... great informative tutorial and all the code Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • ASP.NET MVC Consume JSONResult in Bing Maps API

    - by rockinthesixstring
    I know there are a few topics on this, but I seem to be fumbling my way through with no results. I'm trying to use a controller to return JSON results to my Bin Maps functions. Here's what I have for my controller (yes it is properly returning JSON data. Function Regions() As JsonResult Dim rj As New List(Of RtnJson)() rj.Add(New RtnJson("135 Bow Meadows Drive, Cochrane, Alberta", "desc", "title")) rj.Add(New RtnJson("12 Bowridge Dr NW, Calgary, Alberta, Canada", "desc2", "title2")) Return Json(rj, JsonRequestBehavior.AllowGet) End Function Then in my script I have this, but it's not working. <script type="text/javascript"> var map = null; var centerLat = 51.045 ; var centerLon = -114.05722; var json_object = $.getJSON("<%: Url.Action("Regions", "Events")%>"); function LoadMap() { map = new VEMap('bingMap'); map.LoadMap(new VELatLong(centerLat, centerLon), 10); $.each(json_object, function () { alert(this.address); //this alert is returning "address is undefined" StartGeocoding(this.address, this.title, this.desc); }); } function StartGeocoding(address, title, desc) { map.Find(null, // what address, // where null, // VEFindType (always VEFindType.Businesses) null, // VEShapeLayer (base by default) null, // start index for results (0 by default) null, // max number of results (default is 10) null, // show results? (default is true) null, // create pushpin for what results? (ignored since what is null) true, // use default disambiguation? (default is true) false, // set best map view? (default is true) GeocodeCallback); // call back function } function GeocodeCallback(shapeLayer, findResults, places, moreResults, errorMsg) { var bestPlace = places[0]; // Add pushpin to the *best* place var location = bestPlace.LatLong; var newShape = new VEShape(VEShapeType.Pushpin, location); var desc = "Latitude: " + location.Latitude + "<br>Longitude:" + location.Longitude; newShape.SetDescription(desc); newShape.SetTitle(bestPlace.Name); map.AddShape(newShape); } $(document).ready(function () { LoadMap(); }); </script>

    Read the article

  • Can't create more than one overlay in Seadragon

    - by XGreen
    Hi everyone, I am trying to add overlays to a seadragon map I am making but for some reason that I can not figure our seadragon ignores all my overlays except the first one. Any help with this is much appreciated. var viewer = null; function init() { Seadragon.Config.autoHideControls = false; viewer = new Seadragon.Viewer("container"); viewer.addEventListener("open", addOverlays); viewer.addControl(makeControl(), Seadragon.ControlAnchor.TOP_RIGHT); $(viewer.getNavControl()).parent().parent().css({ 'top': 10, 'right': 10 }); viewer.openDzi("_assets/Mapdata/dzc_output.xml"); } function makeControl() { var control = document.createElement("a"); var controlText = document.createTextNode(""); control.href = "#"; // so browser shows it as link control.className = "control"; control.appendChild(controlText); Seadragon.Utils.addEvent(control, "click", onControlClick); return control; } function onControlClick(event) { Seadragon.Utils.cancelEvent(event); // don't process link if (!viewer.isOpen()) { return; } // These are the coordinates of europe on this map var x = 0.5398693914203284; var y = 0.21155952391206562; var z = 5; viewer.viewport.panTo(new Seadragon.Point(x, y)); viewer.viewport.zoomTo(z); viewer.viewport.ensureVisible(); } function addOverlays(viewer) { drawer = viewer.drawer; var img = document.createElement("img"); img.src = "_assets/Images/pushpin.png"; $(img).addClass('pushPin'); var overlays = [ { elmt: img, point: new Seadragon.Point(0.51, 0.22) }, { elmt: img, point: new Seadragon.Point(0.20, 0.13) } ]; for (var i = 0; i < overlays.length; i++) { drawer.addOverlay(overlays[i].elmt, overlays[i].point); } } Seadragon.Utils.addEvent(window, "load", init);

    Read the article

  • Virtual Earth (Bing) Pin "moves" when zoom level changes

    - by Ali
    Hi guys, Created a Virtual Earth (Bing) map to show a simple pin at a particular point. Everything works right now - the pin shows up, the title and description pop up on hover. The map is initially fully zoomed into the pin, but the STRANGE problem is that when I zoom out it moves slightly lower on the map. So if I started with the pin pointing somewhere in Toronto, if I zoom out enough the pin ends up i the middle of Lake Ontario! If I pan the map, the pin correctly stays in its proper location. When I zoom back in, it moves slightly up until it's back to its original correct position! I've looked around for a solution for a while, but I can't understand it at all. Please help!! Thanks a lot! import with javascript: http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2 $(window).ready(function(){ GetMap(); }); map = new VEMap('birdEye'); map.SetCredentials("hash key from Bing website"); map.LoadMap(new VELatLong(43.640144 ,-79.392593), 1 , VEMapStyle.BirdseyeHybrid, false, VEMapMode.Mode2D, true, null); var pin = new VEShape(VEShapeType.Pushpin, new VELatLong(43.640144 ,-79.392593)); pin.SetTitle("Goes to Title of the Pushpin"); pin.SetDescription("Goes as Description."); map.AddShape(pin);

    Read the article

  • Bing Maps Integrated With ASP.NET Pivot Grid v2010 vol 1

    Check out this slick demo which shows how sales data from the ASPxPivotGrid is plotted and displayed using the Bing.com maps service. The Bing Maps service provides you the capability to plot data geographically on a map. For example, this ASPxPivotGrid shows the quantity of products sold per country: We can plot this data on to a map because the Bing maps services provides developers with a JavaScript API to display maps, locate countries and businesses and create pushpin indicators! Now, we...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • drawing images and lines over UIScrollView

    - by Jorge
    I'm programming an app in which one of the ViewControllers is showing an UIScrollView that shows an image. I'd like to load an image (pushpin in png format) and draw it (and delete it) in some points of the UIScrollView image. I'd also would like to draw bezier paths in that image (and deleting them). I've programmed several apps but this is the first time I face graphic programming and don't know where to start from. Any suggestions? Thanks!

    Read the article

  • VS debugging and watching a variable for changes

    - by Shawn Mclean
    I have a property inside a class that is getting changed by something. The only place I change the value of this code is a line that looks like this: pushpin.Position.Altitude = -31; During visual studio debugging, is there a way to watch .Altitude for any changes made, preferably it breaks at the assignment statement that changes the value. If this is the correct way to track down this problem, could I have a step-by-step tutorial/instruction on how to do this? Thanks.

    Read the article

  • Building a Store Locator ASP.NET Application Using Google Maps API (Part 3)

    Over the past two weeks I've showed how to build a store locator application using ASP.NET and the free Google Maps API and Google's geocoding service. Part 1 looked at creating the database to record the store locations. This database contains a table named Stores with columns capturing each store's address and latitude and longitude coordinates. Part 1 also showed how to use Google's geocoding service to translate a user-entered address into latitude and longitude coordinates, which could then be used to retrieve and display those stores within (roughly) a 15 mile area. At the end of Part 1, the results page listed the nearby stores in a grid. In Part 2 we used the Google Maps API to add an interactive map to the search results page, with each nearby store displayed on the map as a marker. The map added in Part 2 certainly improves the search results page, but the way the nearby stores are displayed on the map leaves a bit to be desired. For starters, each nearby store is displayed on the map using the same marker icon, namely a red pushpin. This makes it difficult to match up the nearby stores listed in the grid with those displayed on the map. Hovering the mouse over a marker on the map displays the store number in a tooltip, but ideally a user could click a marker to see more detailed information about the store, such as its address, phone number, a photo of the storefront, and so forth. This third and final installment shows how to enhance the map created in Part 2. Specifically, we'll see how to customize the marker icons displayed in the map to make it easier to identify which marker corresponds to which nearby store location. We'll also look at adding rich popup windows to each marker, which includes detailed store information and can be updated further to include pictures and other HTML content. Read on to learn more! Read More >

    Read the article

  • Building a Store Locator ASP.NET Application Using Google Maps API (Part 3)

    Over the past two weeks I've showed how to build a store locator application using ASP.NET and the free Google Maps API and Google's geocoding service. Part 1 looked at creating the database to record the store locations. This database contains a table named Stores with columns capturing each store's address and latitude and longitude coordinates. Part 1 also showed how to use Google's geocoding service to translate a user-entered address into latitude and longitude coordinates, which could then be used to retrieve and display those stores within (roughly) a 15 mile area. At the end of Part 1, the results page listed the nearby stores in a grid. In Part 2 we used the Google Maps API to add an interactive map to the search results page, with each nearby store displayed on the map as a marker. The map added in Part 2 certainly improves the search results page, but the way the nearby stores are displayed on the map leaves a bit to be desired. For starters, each nearby store is displayed on the map using the same marker icon, namely a red pushpin. This makes it difficult to match up the nearby stores listed in the grid with those displayed on the map. Hovering the mouse over a marker on the map displays the store number in a tooltip, but ideally a user could click a marker to see more detailed information about the store, such as its address, phone number, a photo of the storefront, and so forth. This third and final installment shows how to enhance the map created in Part 2. Specifically, we'll see how to customize the marker icons displayed in the map to make it easier to identify which marker corresponds to which nearby store location. We'll also look at adding rich popup windows to each marker, which includes detailed store information and can be updated further to include pictures and other HTML content. Read on to learn more! Read More >Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

1 2  | Next Page >