Search Results

Search found 14829 results on 594 pages for 'sharepoint api'.

Page 85/594 | < Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >

  • What are Sharepoint(MOSS 2007) Developement/Deployment best practices.

    - by Satish
    We are deploying sharepoint MOSS 2007 at our work. I'm trying to come up with a sharepoint development and deployment methodology. We have Dev/QA/Prod environments and I need a way, preferably automated to deploy changes from Dev to QA and from there to prod. We are creating site collections web parts etc. Some of it is done directly within sharepoint, some through Sharepoint designer or visual studio. I'm looking for a way to extract this and deploy it to other enviornments. I tried stsadm backup/restore import/export etc but they all move the data along with it as well. I just need the structure deployed. Content deployment paths and jobs does the same thing as well. We use MSBuild & Curisecontrol.net for other .net projects to automate build/deployment process. I'm looking for something similar with sharepoint if possible. What are your best practices for this? Since my team is learning we don't have a defined process and we are open to change our development process if needed.

    Read the article

  • No item exist at http://<servername>....Item may have been deleted ......

    - by Prakash
    I have a data view webpart of some other list on my Dispform.aspx page. I have added edit and create new links in it. Create new item link is workin fine but when I m clicking on edit, its showing me error: No item exist at http:....listname/Dispform.aspx?ID=1&Source=http://...listname/Allitems.aspx. It may have been deleted or renamed by other user. I found this post related to it. http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/e368d7c7-8878-4f74-a62b-9ebad50c6b9a But now in my case the problem is I don't wanna customize Allitems.aspx, and what I have understood in the above post guys have suggested that to change the query string.I can only customize DispForm.aspx. Now the query string which is passing by default is ID=@ID from Allitems.aspx to DispForm.aspx...and I have to use this ID query string variable in my parameter if I m passing it on to the next page. Anyone knows how to fix this? Thanks in advance,

    Read the article

  • XSL - How to disable output escaping for an attribute?

    - by Kobi
    I've had the following <a> tag: <a href="http://myserver/_forms?url={@FileRef}&amp;id=5">...</a> One of the files is called "File's got apostrophe.xml". The output of the XSL is: <a href="http://myserver/_forms?url=/blah/File&amp;#39;s got apostrophe.xml&id=5">...</a> The problem is the the apostrophe is HTML-escaped (twice?) into &amp;#39;, which breaks the link. I've also tried using <xsl:attribute>, with same results: <a> <xsl:attribute name="href"> <xsl:value-of select="concat('http://myserver/_forms?url=', @FileRef, '&amp;id=5')" disable-output-escaping="yes" /> </xsl:attribute> </a> Outputting <xsl:value-of select="@FileRef" disable-output-escaping="yes" /> works well - the unescaped value is printed on the page. How can I set the attribute without escaping the string?

    Read the article

  • using APIs with oauth for single user

    - by Josh
    I'm trying to make use of various APIs including twitter, youtube, etc because we want to embed recent entries (tweets, videos) on our website. However, since I'm just retrieving my own data, I'm wondering how I can do this simpler than the multi-step process required by OAuth. Twitter provides me with my own access token I can use directly, so that kinda works, but I can't find any such token in the YouTube documentation. So how am I supposed to make use of the api if I just want to get a simple list of stuff? how exaclty am I supposed to authenticate my own website to use my own account? I think i might have things all wrong and if so please point me in the right direction. I tried using rss feeds but they don't give me as much control over what I retrieve as using the API directly... any insight or suggestions are appreciated!

    Read the article

  • Use Java exceptions internally for REST API user errors?

    - by user303396
    We have a REST API that works great. We're refactoring and deciding how to internally handle errors by the users of our API. For example the user needs to specify the "movie" url parameter which should take the value of "1984", "Crash", or "Avatar". First we check to see if it has a valid value. What would be the best approach if the movie parameter is invalid? return null from one of the internal methods and check for the null in the main API call method throw an exception from the internal method and catch exceptions in the main API method I think it would make our code more readable and elegant to use exceptions. However, we're reluctant because we'd be potentially throwing many exceptions because of user API input errors, our code could be perfect. This doesn't seem to be the proper use of exceptions. If there are heavy performance penalties with exceptions, which would make sense with stack traces needing to be collected, etc., then we're unnecessarily spending resources when all we need to do is tell the user the parameter is wrong. These are REST API methods, so we're not propogating the exceptions to the users of the API, nor would we want to even if possible. So what's the best practice here? Use ugly nulls or use java's exception mechanism?

    Read the article

  • Is this the best way to make an API request using PHP CURL?

    - by Abs
    Hello all, I have a site that has a simple API which can be used via http. I wish to make use of the API and submit data about 1000-1500 times at one time. Here is their API: http://api.jum.name/ I have constructed the URL to make a submission but now I am wondering what is the best way to make these 1000-1500 API GET requests? Here is the PHP CURL implementation I was thinking of: $add = 'http://www.mysite.com/3rdparty/API/api.php?fn=post&username=test&password=tester&url=http://google.com&category=21&title=story a&content=content text&tags=Season,news'; curl_setopt ($ch, CURLOPT_URL, "$add"); curl_setopt ($ch, CURLOPT_POST, 0); curl_setopt ($ch, CURLOPT_COOKIEFILE, 'files/cookie.txt'); curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, 0); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE); $postdata = curl_exec ($ch); Shall I close the CURL connection every time I make a submission? Can I re-write the above in a better way that will make these 1000-1500 submissions quicker? Thanks all

    Read the article

  • Using Network load balancing to distribute load for SharePoint2010 – Part3 of building my own development SharePoint2010 Farm

    - by ybbest
    Part1 of building my own development SharePoint2010 Farm Part2 of building my own development SharePoint2010 Farm Part3 of building my own development SharePoint2010 Farm In my last post, I have installed SharePoint2010 in one of the server (WFE One) and configured using the OOB SharePoint configuration wizard. In this post I will show you how to use OOB windows network load balancing to distribute load for SharePoint2010 site. 1. Install SharePoint in another server WFE Two (you can follow the steps in my last post), but instead of choosing create new Farm, you need to select “connect to existing farm” this time. 2. Click next then click retrieve database names button and select the farm configuration database. 3. Click next and enter the passphrase you specified when you first installed the SharePoint Farm. 4. Click the advanced settings and select Use this machine to host the web site. 5. Click OK to finish the configurations 6. Next, Install NLB in the two WFE (web front end) SharePoint servers 7. Configure NLB to create the cluster. Go to Start—Administrative Tools—Network Load Balancing Manager 8. Right-click the Network Load Balancing Clusters Node and select New Cluster. 9. Type in the host name that is to be part of the new cluster. 10. Type in the IP address for the cluster. 11. Select the Multicast for this cluster.(The default one is Unicast) 12. You can configure the Port Rules for the clustering , but I will leave the default here. 13. Add another WEF to the cluster. 14. Type in the host name that is to be part of the new cluster. 15. Set the Priority to 2. 16. Click Next to complete the cluster setup. 17. Create an entry in the DNS for the new cluster. 18. Add the binding to the IIS site in the IIS Manager 19. Change the Alternate access mapping for you default site collection from http://sp2010wefone to http://team 20. Browse to http://Team , you will be redirected to the SharePoint site.

    Read the article

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

    Last week's article, Building a Store Locator ASP.NET Application Using Google Maps API (Part 1), was the first in a multi-part article series exploring how to add store locator-type functionality to your ASP.NET website using the free Google Maps API. Part 1 started with an examination of the database used to power the store locator, which contains a single table named Stores with columns capturing the store number, its address and its latitude and longitude coordinates. Next, we looked at using Google Maps API's geocoding service to translate a user-entered address, such as San Diego, CA or 92101 into its latitude and longitude coordinates. Knowing the coordinates of the address entered by the user, we then looked at writing a SQL query to return those stores within (roughly) 15 miles of the user-entered address. These nearby stores were then displayed in a grid, listing the store number, the distance from the address entered to each store, and the store's address. While a list of nearby stores and their distances certainly qualifies as a store locator, most store locators also include a map showing the area searched, with markers denoting the store locations. This article looks at how to use the Google Maps API, a sprinkle of JavaScript, and a pinch of server-side code to add such functionality to our store locator. 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

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

    Over the past couple of months I've been working on a couple of projects that have used the free Google Maps API to add interactive maps and geocoding capabilities to ASP.NET websites. In a nutshell, the Google Maps API allow you to display maps on your website, to add markers onto the map, and to compute the latitude and longitude of an address, among many other tasks. With some Google Maps API experience under my belt, I decided it would be fun to implement a store locator feature and share it here on 4Guys. A store locator lets a visitor enter an address or postal code and then shows the nearby stores. Typically, store locators display the nearby stores on both a map and in a grid, along with the distance between the entered address and each store within the area. To see a store locator in action, check out the Wells Fargo store locator. This article is the first in a multi-part series that walks through how to add a store locator feature to your ASP.NET application. In this inaugural article, we'll build the database table to hold the store information. Next, we'll explore how to use the Google Maps API's geocoding feature to allow for flexible address entry and how to translate an address into latitude and longitude pairs. Armed with the latitude and longitude coordinates, we'll see how to retrieve nearby locations as well as how to compute the distance between the address entered by the visitor and the each nearby store. (A future installment will examine how to display a map showing the nearby stores.) 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

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

    Over the past couple of months I've been working on a couple of projects that have used the free Google Maps API to add interactive maps and geocoding capabilities to ASP.NET websites. In a nutshell, the Google Maps API allow you to display maps on your website, to add markers onto the map, and to compute the latitude and longitude of an address, among many other tasks. With some Google Maps API experience under my belt, I decided it would be fun to implement a store locator feature and share it here on 4Guys. A store locator lets a visitor enter an address or postal code and then shows the nearby stores. Typically, store locators display the nearby stores on both a map and in a grid, along with the distance between the entered address and each store within the area. To see a store locator in action, check out the Wells Fargo store locator. This article is the first in a multi-part series that walks through how to add a store locator feature to your ASP.NET application. In this inaugural article, we'll build the database table to hold the store information. Next, we'll explore how to use the Google Maps API's geocoding feature to allow for flexible address entry and how to translate an address into latitude and longitude pairs. Armed with the latitude and longitude coordinates, we'll see how to retrieve nearby locations as well as how to compute the distance between the address entered by the visitor and the each nearby store. (A future installment will examine how to display a map showing the nearby stores.) Read on to learn more! Read More >

    Read the article

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

    Last week's article, Building a Store Locator ASP.NET Application Using Google Maps API (Part 1), was the first in a multi-part article series exploring how to add store locator-type functionality to your ASP.NET website using the free Google Maps API. Part 1 started with an examination of the database used to power the store locator, which contains a single table named Stores with columns capturing the store number, its address and its latitude and longitude coordinates. Next, we looked at using Google Maps API's geocoding service to translate a user-entered address, such as San Diego, CA or 92101 into its latitude and longitude coordinates. Knowing the coordinates of the address entered by the user, we then looked at writing a SQL query to return those stores within (roughly) 15 miles of the user-entered address. These nearby stores were then displayed in a grid, listing the store number, the distance from the address entered to each store, and the store's address. While a list of nearby stores and their distances certainly qualifies as a store locator, most store locators also include a map showing the area searched, with markers denoting the store locations. This article looks at how to use the Google Maps API, a sprinkle of JavaScript, and a pinch of server-side code to add such functionality to our store locator. Read on to learn more! Read More >

    Read the article

  • Using the Java SE 8 Date Time API with JPA 2.1

    - by reza_rahman
    Most of you are hopefully aware of the new Date Time API included in Java SE 8. If you are not, you should check them out right now using the Java Tutorial Trail dedicated to the topic. It is a significantly leap forward in processing temporal data in Java. For those who already use Joda-Time the changes will look very familiar - very simplistically speaking the Java SE 8 feature is basically Joda-Time standardized. Quite naturally you will likely want to use the new Date Time APIs in your JPA domain model to better represent temporal data. The problem is that JPA 2.1 will not support the new API out of the box. So what are you to do? Fortunately you can make use of fairly simple JPA 2.1 Type Converters to use the Date Time API in your JPA domain classes. Steven Gertiser shows you how to do it in an extremely well written blog entry. Besides explaining the problem and the solution the entry is actually very good for getting a better understanding of JPA 2.1 Type Converters as well. I think such a set of converters may be a good fit for Apache DeltaSpike as a Java EE 7 extension? In case you are wondering about Java SE 8 support in the JPA specification itself, Nick Williams has already entered an excellent, well researched JIRA entry asking for such support in a future version of the JPA specification that's well worth looking at. Another possibility of course is for JPA providers to start supporting the Date Time API natively before anything is formalized in the specification. What do you think?

    Read the article

  • Google+ Platform Office Hours for May 16th, 2012: Hangouts API v1.1

    Google+ Platform Office Hours for May 16th, 2012: Hangouts API v1.1 This week we discussed the latest release of the Hangouts API, v1.1. JD Salazar and Richard Dunn from the Hangouts API engineering team joined us to help your answer questions. Discussion this session on Google+: goo.gl You can learn more about our office hours here: goo.gl 0:29 - Introductions 2:50 - Richard gives us an overview of what's new in Hangouts API v1.1 8:57 - What are the default scales for the static overlays? 9:25 - Will the static overlay scale ratio change during the hangout? 10:13 - What is the resolution of the feed? How do I ensure my overlays match the quality? 12:49 - How do I know if an image resource has failed to load? 16:33 - Can we have animated gifs as overlays? 19:44 - Loaded overlays do not clear upon deletion. How many can I load before I encounter issues? 21:48 - Are sound overlays played to all participants or only locally? What about sound cancellation? 23:27 - How do you uninstall a Hangout app? 25:41 - Can I make an app that uses drag and drop onto the film strip? 26:55 - Can we embed participant thumbnails elsewhere on the screen? 28:33 - How can I determine a consistent ordering for hangout participants? 31:35 - Can I access Picasa photos uploaded by another user within a hangout? Gerwin demonstrates his solution. 31:14 - How do I know when my hangout app has been unloaded for the purposes of doing cleanup? 39:28 - Will face tracking ever support multiple faces? 40:41 - Can I use WebGL in a hangouts app? 42:09 - I'm having issues with <b>...</b> From: GoogleDevelopers Views: 2032 18 ratings Time: 53:05 More in Science & Technology

    Read the article

  • Best way to implement user-powered data validation

    - by vegetables
    I run a product recommendation engine and I'm hitting a few snags. I'm looking to see if anyone has any recommendations on what I should do to minimize these issues. Here's how the site works: Users come to the site and are presented with product recommendations based on some criteria. If a user knows of a product that is not in our system, they can add it by providing the product name and manufacturer. We take that information, and: Hit one API to gather all the product meta-data (and to validate the product spelling, etc). If the product is not in this first API, we do not allow it in our system. Use the information from step 1 to hit another API for pricing information (gathered from many places online). For the sake of discussion, assume that I am searching both APIs in the most efficient/successful manner possible. For the most part, this works very well. I'd say ~80% of our data is perfectly accurate, but there are a few issues: Sometimes the pricing API (Step 2) doesn't have any information for the product. The way the pricing API is built, it will always return something (theoretically, the closest possible match), and there's no guarantee that the product name is spelled exactly the same way in both APIs, so there's no automated way of knowing if it's the right product. When the pricing API finds the right product, occasionally it has outdated, or even invalid pricing data (e.g. if it screen-scraped the wrong price from a website). Since the site was fairly small at first, I was able to manually verify every product that was added to the website. However, the site has grown to the point where this is taking several hours per day, and is just not efficient use of my time. So, my question is: Aside from hiring someone (or getting an intern) to validate all the data manually, what would be the best system of letting my userbase self-manage the data. Specifically, how can I allow users to edit the data while minimizing the risk of someone ambushing my website, or accidentally setting the data incorrectly.

    Read the article

  • RESTful applications logic and cross resource operations

    - by Gaz_Edge
    I have an RESTful api that allows my users to receive enquiries about their business e.g. 'I would like to book service x on date y. Is this available?'. The api saves this information as a resource to the following URI users/{userId}/enquiries/{enquiryId} The information shown when this resource is retrieved are the standard sort of things you'd expect from an enquiry - email, first_name, last_name, address, message The api also allows customers to be created for a user. The customer has a login and password and also a profile. The following URIs expose these two resources PUT users/{userId}/customers/{customerId} PUT users/{userId}/customers/{customerId}/profile The problem I am having is that I would like to have the ability to allow users to create a customer from an enquiry. For example, the user is able to offer their service on the date requested and will then want to setup a customer with login details etc to allow them to manage the rest of the process. The obvious answer would be to use a URI like users/{userId}/enquiries/{enquiryId}/convert-to-client The problem with this is is that it somewhat goes against a lot of what I've been reading about how to implement REST (specifically from the book Restful Web Services which suggests that URIs should point to resources not operations on resources). The other option would be to get the client application (i.e. the code that calls the api) to handle some of this application logic. This doesn't quite feel right to me. I have implemented in my design that the client app is fairly dumb. It knows just enough to display the results from the API, and does not contain any application logic. Would be great to hear what others views are on the best way of setting this up Am I wrong to have no application logic in the client app? How would I perform this operation purely in the REST api?

    Read the article

  • Requires valid signature error, facebook api

    - by soField
    i'am using this example http://github.com/facebook/connect-js/blob/master/examples/jquery/login.html works fine , but when i change query part to read my statuses i am getting exception Requires valid signature for instance this query select message from status where uid=myuid

    Read the article

  • Multiple markers in Googe Maps API v3 that link to different pages when clicked

    - by Dave
    I have a map with multiple markers, which I populate via an array. Each marker is clickable and should take the user to a different url per marker. The problem is that all the markers, while displaying the correct title, all use the url of the last entry in the array. Here is my code: var myOptions = { zoom: 9, center: new google.maps.LatLng(40.81940575,-73.95647955), mapTypeId: google.maps.MapTypeId.TERRAIN } var map = new google.maps.Map(document.getElementById("bigmap"), myOptions); setMarkers(map, properties); var properties = [ ['106 Ft Washington Avenue',40.8388485,-73.9436015,'Mjg4'], ['213 Bennett Avenue',40.8574384,-73.9333426,'Mjkz'], ['50 Overlook Terrace',40.8543752,-73.9362542,'Mjky'], ['850 West 176 Street',40.8476012,-73.9417571,'OTM='], ['915 West End Avenue',40.8007478,-73.9692155,'Mjkx']]; function setMarkers(map, buildings) { var image = new google.maps.MarkerImage('map_marker.png', new google.maps.Size(19,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var shadow = new google.maps.MarkerImage('map_marker_shadow.png', new google.maps.Size(28,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var bounds = new google.maps.LatLngBounds; for (var i in buildings) { var myLatLng = new google.maps.LatLng(buildings[i][1], buildings[i][2]); bounds.extend(myLatLng); var marker = new google.maps.Marker({ position: myLatLng, map: map, shadow: shadow, icon: image, title: buildings[i][0] }); google.maps.event.addListener(marker, 'click', function() { window.location = ('detail?b=' + buildings[i][3]); }); } map.fitBounds(bounds); } Using this code, clicking any marker take the user to 'detail?b=Mjkx' What am I doing wrong?

    Read the article

  • Toggling on/off Markers in Google Maps API v3

    - by Douglas
    I'm having trouble getting the setMap(null); function that everyone seems to be recommending to work. I believe it may be a problem with the way I've implemented the markers. If someone could take a look and let me know if you see something wrong I'd greatly appreciate it. LINK: http://www.dougglover.com/samples/UOITMap/v2/

    Read the article

  • json-simple API

    - by cp
    Hello Is there a javadoc for json-simple? I am trying to make a JSONObject from an existing map among other calls and this trial by casting is getting too much, grin. thx.

    Read the article

  • Getting a friend count from facebook (possibly using api)

    - by Patrick
    Im used to working with twitter, where friend/follower totals are available in a simple xml request. My goal is a simple "enter your username/user id, and display your friends count". Is there something like this for facebook? From what i gather, ill have to make an application, and have anyone who wants to grab their friends total actually install that app from within their own facebook profile. Anyone have any experience with this?

    Read the article

  • Google maps API : custom infowindow : V2 : Input element not clickable : G_MAP_FLOAT_PANE

    - by PlanetUnknown
    I'm trying to make a custom infowindow. Version = 2. I have added my DIV to the map as follows - $("#infoWindowClass").appendTo(map.getPane(G_MAP_MARKER_MOUSE_TARGET_PANE)); The infoWindowClass is - #infoWindowClass { position:absolute; padding:10px; height: 155px; width: 225px; background-color: #E7F8CD; color: #3F3F3F; border:0.5px solid #8D8D8D; font-size:80%; } Per documentation, this is above all other DIV layers. This DIV has two input fields, however I can't click on any of them. I manually added the z-index to 990 for this DIV but the input fields are still not clickable. Any pointers ?

    Read the article

  • Picasa API for C# error

    - by pho3nix
    My Code: foreach (PicasaEntry entryAlbuns in feedAlbuns.Entries) { AlbumAccessor ac = new AlbumAccessor(entryAlbuns); PhotoQuery photos = new PhotoQuery(PicasaQuery.CreatePicasaUri("admin@localhost", ac.AlbumTitle)); PicasaFeed feedPhotos = service.Query(photos); } When debugger step in line PicasaFeed feedPhotos = service.Query(photos); get an error The remote server returned an error: (404) Not Found. Check parameters accepted: PS: Because security reasons i replaced my email account to admin@localhost.

    Read the article

  • google maps api v3 - loop through overlays - overlayview methods

    - by user317005
    what's wrong with the code below? when i execute it, the map doesn't even show up. but when i put the overlayview methods outside the for-loop and manually assign a lat/lng then it magically works?! but does anyone know how i can loop through an array of lats/lngs (=items) using the overlayview methods? i hope this makes sense, just don't know how else to explain it. and unfortunately, i run my code on my localhost var overlay; OverlayTest.prototype = new google.maps.OverlayView(); [taken out: options] var map = new google.maps.Map(document.getElementById('map_canvas'), options); var items = [ ['lat','lng'],['lat','lng'] ]; for (var i = 0; i < items.length; i++) { var latlng = new google.maps.LatLng(items[i][0], items[i][1]); var bounds = new google.maps.LatLngBounds(latlng); overlay = new OverlayTest(map, bounds); function OverlayTest(map, bounds) { [taken out: not important] this.setMap(map); } OverlayTest.prototype.onAdd = function() { [taken out: not important] } OverlayTest.prototype.draw = function() { [taken out: not important] } }

    Read the article

  • google maps api v3 - loop through overlays - overlayview methods

    - by user317005
    how can i loop through an array within the overlayview class? $(document).ready(function() { var overlay; var myLatlng = new google.maps.LatLng(51.501743,-0.140461); var myOptions = { zoom: 13, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); OverlayTest.prototype = new google.maps.OverlayView(); var items = [ [51.501743,-0.140461], [51.506209,-0.146796], ]; for([loop])//loop through array { var latlng = new google.maps.LatLng(items[i][0], items[i][1]); var bounds = new google.maps.LatLngBounds(latlng); overlay = new OverlayTest(map, bounds); var element_id = 'map_' + i; function OverlayTest(map, bounds) { this.bounds_ = bounds; this.map_ = map; this.div_ = null; this.setMap(map); } OverlayTest.prototype.onAdd = function() { var div = ''; this.div_ = div; var panes = this.getPanes(); panes.mapPane.innerHTML = div; } OverlayTest.prototype.draw = function() { var overlayProjection = this.getProjection(); var sw = overlayProjection.fromLatLngToDivPixel(this.bounds_.getSouthWest()); var ne = overlayProjection.fromLatLngToDivPixel(this.bounds_.getNorthEast()); var div = document.getElementById(element_id); div.style.left = sw.x + 'px'; div.style.top = ne.y + 'px'; } } }); the above code doesn't work, but when i manually assign a lat/lng to the overlayview class it magically works (see below)?! $(document).ready(function() { var overlay; var myLatlng = new google.maps.LatLng(51.501743,-0.140461); var myOptions = { zoom: 13, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } var map = new google.maps.Map(document.getElementById('map_canvas'), myOptions); OverlayTest.prototype = new google.maps.OverlayView(); var items = [ [51.501743,-0.140461], [51.506209,-0.146796], ]; var latlng = new google.maps.LatLng(51.506209,-0.146796);//manually assign lat/lng var bounds = new google.maps.LatLngBounds(latlng); overlay = new OverlayTest(map, bounds); function OverlayTest(map, bounds) { this.bounds_ = bounds; this.map_ = map; this.div_ = null; this.setMap(map); } OverlayTest.prototype.onAdd = function() { var div = ''; this.div_ = div; var panes = this.getPanes(); panes.mapPane.innerHTML = div; } OverlayTest.prototype.draw = function() { var overlayProjection = this.getProjection(); var sw = overlayProjection.fromLatLngToDivPixel(this.bounds_.getSouthWest()); var ne = overlayProjection.fromLatLngToDivPixel(this.bounds_.getNorthEast()); var div = document.getElementById('map_1'); div.style.left = sw.x + 'px'; div.style.top = ne.y + 'px'; } });

    Read the article

< Previous Page | 81 82 83 84 85 86 87 88 89 90 91 92  | Next Page >