Search Results

Search found 120 results on 5 pages for 'kml'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • Need guidance on a Google Map application that has to show 250 000 polylines.

    - by lucian.jp
    I am looking for advice for an application I am developing that uses Google Map. Summary: A user has a list of criteria for searching a street segment that fulfills the criteria. The street segments will be colored with 3 colors for showing those below average, average and over average. Then the user clicks on the street segment to see an information window showing the properties of that specific segment hiding those not selected until he/she closes the window and other polyline becomes visible again. This looks quite like the Monopoly City Streets game Hasbro made some month ago the difference being I do not use Flash, I can’t use Open Street Map because it doesn’t list street segment (if it does the IDs won’t be the same anyway) and I do not have to show Google sketch building over. Information: I have a database of street segments with IDs, polyline points and centroid. The database has 6,000,000 street segment records in it. To narrow the generated data a bit we focus on city. The largest city we must show has 250,000 street segments. This means 250,000 line segment polyline to show. Our longest polyline uses 9600 characters which is stored in two 8000 varchar columns in SQL Server 2008. We need to use the API v3 because it is faster than the API v2 and the application will be ported to iPhone. For now it's an ASP.NET 3.5 with SQl Server 2008 application. Performance is a priority. Problems: Most of the demo projects that do this are made with API v2. So besides tutorial on the Google API v3 reference page I have nothing to compare performance or technology use to achieve my goal. There is no available .NET wrapper for the API v3 yet. Generating a 250,000 line segment polyline creates a heavy file which takes time to transfer and parse. (I have found a demo of one polyline of 390,000 points. I think the encoder would be far less efficient with more polylines with less points since there will be less rounding.) Since streets segments are shown based on criteria, polylines must be dynamically created and cache can't be used. Some thoughts: KML/KMZ: Pros: Since it is a standard we can easily load Bing maps, Yahoo! maps, Google maps, Google Earth, with the same KML file. The data generation would be the same. Cons: LineString in KML cannot be encoded polyline like the Google map API can handle. So it would probably be bigger and slower to display. Zipping the file at the size it will take more processing time and require the client side to uncompress the data and I am not quite sure with 250,000 data how an iPhone would handle this and how a server would handle 40 users browsing at the same time. JavaScript file: Pros: JavaScript file can have encoded polyline and would significantly reduce the file to transfer. Cons: Have to create my own stripped version of API v3 to add overlays, create polyline, etc. It is more complex than just create a KML file and point to the source. GeoRSS: This option isn't adapted for my needs I think, but I could be wrong. MapServer: I saw some post suggesting using MapServer to generate overlays. Not quite sure for the connection with our database and the performance it would give. Plus it requires a plugin for generating KML. It seems to me that it wouldn't allow me to do better than creating my own KML or JavaScript file. Maintenance would be simpler without. Monopoly City Streets: The game is now over, but for those who know what I am talking about Monopoly City Streets was showing at max zoom level only the streets that the centroid was inside the Bounds of the window. Moving the map was sending request to the server for the new streets to show. While I think this was ingenious, I have no idea how to implement something similar. The only thing I thought about was to compare if the long was inside the bound of map area X and same with Y. While this could improve performance significantly at high zoom level, this would give nothing when showing a whole city. Clustering: While cluster is awesome for marker, it seems we cannot cluster polylines. I would have liked something like MarkerClusterer for polylines and be able to cluster by my 3 polyline colors. This will probably stay as a “would have been freaking awesome but forget it”. Arrow: I will have in a future version to show a direction for the polyline and will have to show an arrow at the centroid. Loading an image or marker will only double my data so creating a custom overlay will probably be my only option. I have found that demo for something similar I would like to achieve. Unfortunately, the demo is very slow, but I only wish to show 1 arrow per polyline and not multiple like the demo. This functionality will depend on the format of data since I don't think KML support custom overlays. Criteria: While the application is done with ASP.NET 3.5, the port to the iPhone won't use the web to show the application and be limited in screen size for selecting the criteria. This is why I was more orienting on a service or page generating the file based on criteria passed in parameters. The service would than generate the file I need to display the polylines on the map. I could also create an aspx page that does this. The aspx page is more documented than the service way. There should be a reason. Questions: Should I create a web service to returns the street segments file or create an aspx page that return the file? Should I create a JavaScript file with encoded polyline or a KML with longitude/latitude based on the fact that maximum longitude/latitude polyline have 9600 characters and I have to render maximum 250,000 line segment polyline. Or should I go with a MapServer that generate the overlay? Will I be able to display simple arrow on the polyline on the next version. In case of KML generation is it faster to create the file with XDocument, XmlDocument, XmlWriter and this manually or just serialize the street segment in the stream? This is more a brainstorming Stack Overflow question than an actual code problem. Any answer helping narrow the possibilities is as good as someone having all the knowledge to point me out a better choice.

    Read the article

  • Hiding Terrain in Google Maps

    - by Old Man
    I'm generating a KML file to show a map with placemarks in Google Earth. For this purpose the terrain (topographical detail) doesn't help; I just want solid color like you would see if you selected "Map" in Google Maps. What is the KML to do this? I can't find anything in the KML documentation.

    Read the article

  • Delaying execution of Javascript function relative to Google Maps / geoxml3 parser?

    - by Terra Fimeira
    I'm working on a implementing a Google map on a website with our own tiles overlays and KML elements. I've been previously requested to create code so that, for instance, when the page is loaded from a specific URL, it would initialize with one of the tile overlays already enabled. Recently, I've been requested to do the same for the buildings which are outlined by KML elements so that, arriving at the page with a specific URL, it would automatically zoom, center, and display information on the building. However, while starting with the tile overlays work, the building KML does not. After doing some testing, I've determined that when the code which checks the URL executes, the page is still loading the KML elements and thus do not exist for the code to compare to or use: Code for evaluating URL (placed at the end of onLoad="initialize()") function urlClick() { var currentURL = window.location.href; //Retrieve page URL var URLpiece = currentURL.slice(-6); //pull the last 6 digits (for testing) if (URLpiece === "access") { //If the resulting string is "access": access_click(); //Display accessibility overlay } else if (URLpiece === "middle") { //Else if the string is "middle": facetClick('Middle College'); //Click on building "Middle College" }; }; facetClick(); function facetClick(name) { //Convert building name to building ID. for (var i = 0; i < active.placemarks.length; i++) { if (active.placemarks[i].name === name) { sideClick(i) //Click building whose id matches "Middle College" }; }; }; Firebug Console Error active is null for (var i = 0; i < active.placemarks.length; i++) { active.placemarks is which KML elements are loaded on the page, and being null, means no KML has been loaded yet. In short, I have a mistiming and I can't seem to find a suitable place to place the URL code to execute after the KMl has loaded. As noted above, I placed it at the end of onLoad="initialize()", but it would appear that, instead of waiting for the KML to completely load earlier in the function, the remainder of the function is executed: onLoad="initialize()" information(); //Use the buttons variables inital state to set up description buttons(); //and button state button_hover(0); //and button description to neutral. //Create and arrange the Google Map. //Create basic tile overlays. //Set up parser to work with KML elements. myParser = new geoXML3.parser({ //Parser: Takes KML and converts to JS. map: map, //Applies parsed KML to the map singleInfoWindow: true, afterParse: useTheData //Allows us to use the parsed KML in a function }); myParser.parse(['/maps/kml/shapes.kml','/maps/kml/shapes_hidden.kml']); google.maps.event.addListener(map, 'maptypeid_changed', function() { autoOverlay(); }); //Create other tile overlays to appear over KML elements. urlClick(); I suspect one my issues lies in using the geoxml3 parser (http://code.google.com/p/geoxml3/) which converts our KML files to Javascript. While the page has completed loading all of the elements, the map on the page is still loading, including the KML elements. I have also tried placing urlClick() in the parser itself in various places which appear to execute after all the shapes have been parsed, but I've had no success there either. While I've been intending to strip out the parser, I would like to know if there is any way of executing the "urlClick" after the parser has returned the KML shapes. Ideally, I don't want to use an arbitrary means of defining a time to wait, such as "wait 3 seconds, and go", as my various browsers all load the page at different times; rather, I'm looking for some way to say "when the parser is done, execute" or "when the Google map is completely loaded, execute" or perhaps even "hold until the parser is complete before advancing to urlClick".

    Read the article

  • Android : Sample KML/GPX compatable with DDMS

    - by Drahcir
    I am testing out an Android application I wrote with google maps. The DDMS is not loading the KML/GPX files I found on the internet. What I assume is that the files are relatively old in format (Maximum 2007) and the DDMS cannot read them. I was wondering if there is somewhere I can download a sample KML or GPX file that I can use to test out my application.

    Read the article

  • How to transform a cached XML via XSL?

    - by TruMan1
    I have a PHP script that caches a remote XML file. I want to XSL transform it before caching, but don't know how to do this: <?php // Set this to your link Id $linkId = "0oiy8Plr697u3puyJy9VTUWfPrCEvEgJR"; // Set this to a directory that has write permissions // for this script $cacheDir = "temp/"; $cachetime = 15 * 60; // 15 minutes // Do not change anything below this line // unless you are absolutely sure $feedUrl="http://mydomain.com/messageService/guestlinkservlet?glId="; $cachefile = $cacheDir .$linkId.".xml"; header('Content-type: text/xml'); // Send from the cache if $cachetime is not exceeded if (file_exists($cachefile) && (time() - $cachetime < filemtime($cachefile))) { include($cachefile); echo "<!-- Cached ".date('jS F Y H:i', filemtime($cachefile))." -->\n"; exit; } $contents = file_get_contents($feedUrl . $linkId); // show the contents of the XML file echo $contents; // write it to the cache $fp = fopen($cachefile, 'w'); fwrite($fp, $contents); fclose($fp); ?> This is the XSL string I want to use to transform it: <xsl:template match="/"> <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <xsl:apply-templates select="messageList" /> </Document> </kml> </xsl:template> <xsl:template match="messageList"> <name>My Generated KML</name> <xsl:apply-templates select="message" /> </xsl:template> <xsl:template match="message"> <Placemark> <name><xsl:value-of select="esnName" /></name> <Point> <coordinates> <xsl:value-of select="latitude" />,<xsl:value-of select="longitude" /> </coordinates> </Point> </Placemark> </xsl:template> I want to actually transform XML input and save/return a KML format. Can someone please help adjust this script? This was given to me and I am a little new to it.

    Read the article

  • Android Maps Back Button

    - by aaronr
    I'm developing an application that shows a path on a map, determined by a KML file. Specifically, in the MapActivity that is starting the map: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); MapView mapView = (MapView) findViewById(R.id.mapview); mapView.setBuiltInZoomControls(true); Uri uri = Uri.parse("geo:0,0?q=http://urltokml"); Intent mapIntent = new Intent(Intent.ACTION_VIEW, uri); mapIntent.setData(uri); startActivity(Intent.createChooser(mapIntent, kmlFile)); finish(); } The map loads fine and after a few seconds the path described by the KML shows up. The problem is, when I press the "Back" button, it does not return to the previous screen but instead just hides the KML overlay. If the "Back" button is pressed again, it will return to the previous screen. Any ideas of how to solve this?

    Read the article

  • How to Use XSLT to Replace Coordinate Separator With List of Tuples?

    - by kuloch
    I have a space-separated list of coordinate tuples. Each tuple consists of a space-separated list of 2-dimensional coordinates. E.g. "1.1 2.8 1.2 2.9" represents a line from POINT(1.1 2.8) to POINT(1.2 2.9). I need this to instead be "1.1,2.8 1.2,2.9". How would I use XSLT to perform the replacement of space-to-comma between pairs of numbers? I have the "string(gml:LinearRing/gml:posList)". This is being used on a Java Web Service that spits out GML 3.1.1 features with geometries. The service supports optional KML output, by using XSLT to transform the GML document into a KML document (at least, the chunks deemed "important"). I am locked into XSLT 1.0, so regex from XSLT 2.0 is not an option. I am aware that GML uses lat/lon while KML uses lon/lat. That's being handled before XSLT, though it would be nice to have that also done with XSLT.

    Read the article

  • unzip strings in javascript

    - by sopppas
    anyone knows a simple JS library implementing the UNZIP algorithm? No disk-file access, only zip and unzip a string of values. there are ActiveX, using WinZIP and other client dependent software for ZIP, written in JS. but no pure algorithm implementation, is it really difficult or non-functional? i would use it for displaying KMZ files in a HTML page with the GMap object (google maps). The KMZ file is just a zipped KML file. I want to unzip a KMZ file and feed the KML to GMap.

    Read the article

  • Determine outer boundries of polygon from lat/lng point array

    - by DustinDavis
    I have a large array of lat/lng points. Could be up to 20k points. I'm plotting them using KML. What I want to do is to take only the outter most points and use them to draw a polygon instead. I already know how to draw a polygon in kml, I just need to figure out how to select only the outer most points of the group. Any ideas? I'd like to have at least 5 points to the polygon but no more than 25 points total. So far i've come up with checking for top most and bottom most points (basically crearing a square) using < & logic. The points will be in america & canada only if that matters. Thanks for any help.

    Read the article

  • Place text based divs in relative locations within a circle

    - by NickG
    Direct question - How would I place certain objects or small text within a certain area. For example, how would I replace the following image with html/javascript. --- I don't have enough reps to post an image :/ but try this URL - http://i.imgur.com/a3eWL.jpg Big picture - I am trying to create a kml file for Google Earth that when the point is clicked, the balloon description window pops up and I can display my html formatted diagram showing where the satellites are at that instant. Google Earth and KML docs allow for pretty much any html formatting within it, so currently looking for a good way to do this. Disclaimer: It has been a few years since i have done any html or javascript editing, so general examples and insight is greatful. Thanks

    Read the article

  • google maps export driving directions to kml file - java geogoogle

    - by maiky
    Hi Sorry at first for my poor grammar. I am writing a program in Java using geogoogle (Google Geocoder Java API) http://geo-google.sourceforge.net/ I need from two specific points to get the walking directions between these points and also these info to be exported in a KML file. Do you know how can I do it from Java? Is there an API that I can use? Perhaps making a call from the java program to google and handle the result - but how can it be done? Thanks in advance. PS. Google gives this functionality as i saw here http://www.gringod.com/2008/02/26/save-google-maps-driving-directions/ but I need all these to be called from Java.

    Read the article

  • working python xml

    - by ricardo
    hello all, my question is the following, which is the best way of working XML (kml) with python?, especially script serializable. thanks for your attention and answers

    Read the article

  • How can I create a Google Visualization intensity/heat map using a KMZ document?

    - by dommer
    I'd like to create a Google Visualization API intensity/heat map based on UK counties. To do this, it appears that I need to use a custom KML/KMZ file that contains the county mapping data (which I've located). Could anyone provide me with a sample of how I can display an intensity map based on a KMZ file? I know how to display Google Visualization intensity maps in general. I just can't find any examples that use a custom KMZ file.

    Read the article

  • How to get the line number an xml element is on via the Java w3c dom api

    - by Benju
    Is there a way to lookup the line number that a given element is at in an xml file via the w3c dom api? My use case for this is that we have 30,000+ maps in kml/xml format. I wrote a unit test that iterates over each file found on the hard drive (about 17GB worth) and tests that it is parseable by our application. When it fails I throw an exception that contains the element instance that was considered "invalid". In order for our mapping department (nobody here knows how to program) to easily track down the typo we would like to log the line number of the element that caused the exception. Can anybody suggest a way to do this? Please note we are using the W3C dom api included in the Android 1.6 SDK.

    Read the article

  • Google maps API - info window height and panning

    - by Tim Fountain
    I'm using the Google maps API (v2) to display a country overlay over a world map. The data comes from a KML file, which contains coords for the polygons along with a HTML description for each country. This description is displayed in the 'info window' speech bubble when that country is clicked on. I had some trouble initially as the info windows were not expanding to the size of the HTML content they contained, so the longer ones would spill over the edges (this seems to be a common problem). I was able to work around this by resetting the info window to a specific height as follows: GEvent.addListener(map, "infowindowopen", function(iw) { iw = map.getInfoWindow(); iw.reset(iw.getPoint(), iw.getTabs(), new GSize(300, 295), null, null); }); Not ideal, but it works. However now, when the info windows are opened the top part of them is sometimes obscured by the edges of the map, as the map does not pan to a position where all of the content can be viewed. So my questions: Is there any way to get the info windows to automatically use a height appropriate to their content, to avoid having to fix to a set pixel height? If fixing the height is the only option, is there any way to get the map to pan to a more appropriate position when the info windows open? I know that the map class has a panTo() method, but I can't see a way to calculate what the correct coords would be. Here's my full init code: google.load("maps", "2.x"); // Call this function when the page has been loaded function initialize() { var map = new google.maps.Map2(document.getElementById("map"), {backgroundColor:'#99b3cc'}); map.addControl(new GSmallZoomControl()); map.setCenter(new google.maps.LatLng(29.01377076013671, -2.7866649627685547), 2); gae_countries = new GGeoXml("http://example.com/countries.kmz"); map.addOverlay(gae_countries); GEvent.addListener(map, "infowindowopen", function(iw) { iw = map.getInfoWindow(); iw.reset(iw.getPoint(), iw.getTabs(), new GSize(300, 295), null, null); }); } google.setOnLoadCallback(initialize);

    Read the article

  • How to handle geo sitemaps?

    - by Floran
    I have a site with company profiles. I already have a sitemap.xml However, now I'm reading on KML geo sitemaps: http://www.seomoz.org/blog/understand-and-rock-the-google-venice-update I wondered how that may apply to a site with company profiles. Do I place 1 large KML file showing all the locations of businesses in the KML format? Or do I need to make that more specific? locatins-in-LA.kml for example? And what is the relationship between a kml file and a sitemap.xml? It seems that I need to have a reference to the kml files that should be included in the sitemap.xml, but if that is the case, I don't know how. Help! :)

    Read the article

  • Display regular street map on Google Earth

    - by carrier
    I'm writing an application that displays data using Google Earth. In certain situations, it would be more convenient if, rather than displaying satellite images, the surface of the earth would look more like the 'regular map' on Google Maps. Is this possible?

    Read the article

  • Replace ",**" with a linebreak using RegEx (or something else)

    - by John
    I'm getting started with RegEx and I was wondering if anyone could help me craft a statement to convert coordinates as follows: 145.00694,-37.80421,9 145.00686,-37.80382,9 145.00595,-37.8035,16 145.00586,-37.80301,16 to 145.00694,-37.80421 145.00686,-37.80382 145.00595,-37.8035 145.00586,-37.80301 (Strip off the last comma and value and turn it into a line break.) I can't figure out how to use wildcards to do something like that. Any help would be greatly appreciated! Thanks.

    Read the article

  • Embedded Google Earth Plug-Ins no longer working

    - by user1497162
    I really hope someone can help me. I just noticed that none of my website's Google Earth embedded plug-in's work anymore (in Safari, Chrome or Firefox)  All you can see now is blank space and small text that says "Information is temporarily unavailable." I have no idea why they would no longer be working.  Nothing has changed whatsoever. Example here: http://www.grandcanyonvirtualtour.com/_tours/phantom_ranch.html Any suggestions greatly appreciated!! Please note, I am not a coder -- I am a photographer who is learning how to integrate photographs into maps, so I apologize if any questions are elementary. Thanks, Sara I am on a MacBook Pro 2.4 GHz Intel Core i7; OS 10.7.4

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >