Tag Info

Hot answers tagged

8

I can confirm that OL Canvas renderer redraws the whole layer when even a single feature needs to be redrawn. The exact point of the sources where this is implemented is this one in drawFeature. This has probably to do with the fact that the canvas is simply a bitmap so redrawing on top of it can produce artifacts if the new image is not perfectly placed on ...


6

I think the difference is likely due to the way that the Android phone with a GPS, and the iPhone using 3GS, are determining their location. I am not sure about all Android phones, but it is likely that they are all using similar GPS for location purposes. This could be verified if you provided the similar models that you tested with. Anyway, the point is ...


6

Here is one way to do that: Components used: Leaflet PouchDB (a framework that uses indexedDB in your browser) XHR2 (XMLHTTP) to fetch the files, since JQUERY does not yet support binary blob XMLHTTP KendoUI (an HTML5 web control library) Running the Demo: http://codepen.io/DrYSG/pen/hpqoD Delete any old DB (Press the Delete Button) Reload the page ...


4

For the OpenLayers.Format.GeoJSON feature collection use an OpenLayers.Layer.Vector instance. Examples from the OpenLayers Examples Gallery: http://openlayers.org/dev/examples/geojson.html http://openlayers.org/dev/examples/vector-formats.html http://dev.openlayers.org/docs/files/OpenLayers/Layer/Vector-js.html Use a zoom based strategy for displaying ...


4

If you want to ZoomTo a specific ZoomLevel , you can use Map.zoomTo like this: map.zoomTo(level); \\where level is an integer, indicating the zoom level If you just want to Zoom out one level, you can use Map.zoomOut like this: map.zoomOut()


3

Did you do read the coordinates at the exact same time? Because if not, you should know that the location accuracy in these devices can be poor, certainly could be 20meters. That said, the location accuraccy and also your current location will change slightly over time if you stand on the same spot, because conditions such as gps signal quality change ...


3

OpenLayers doesn't have knowledge of what features might have interactions with other features on redraw. As a result, when selecting a feature, it is very likely that OpenLayers redraws all of the features. (For example, if you have multiple features stacked up, and redrew only one of them, you could get weird side effects where the drawing isn't the same ...


3

You can have a look at this OpenLayers example. Below is the highlight of line from the code with mention the renderers. var wfs = new OpenLayers.Layer.Vector("States", { strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.WFS({ version: "1.1.0", srsName: "EPSG:900913", url: ...


3

I think your first solution, to project the Lat/Long coordinates to your preferred state plane is the right way to go. However, I'm not sure what you mean by "a Geometry Service". Do you mean you're using a 3rd-party web method to perform the coordinate transformation? If so, I would discourage that, as there's not a good reason to have such a dependency in ...


2

http://jsfiddle.net/a6pp9vwz/9/ working for me. Console log said "$ not defined". $ is a jQuery class, so you need a jQuery environment to enable AJAX requests. You can enable jQuery in JSFiddle in the "Frameworks & Extensions" tab.


2

OpenFloorPlan, based on D3.js, looks interesting, although I have not been able to find a demo online so I can't say much other than that it might work for you. Here are some slides from the FOSS4G NA 2013 conference.


2

Not knowing your use case, you might want to take a look at the D3.js library (Data Driven Documents) for data visualization. While I don't know if it supports "zoom levels" per se, but it does support zoomable maps. Take a look at their many examples here: https://github.com/mbostock/d3/wiki/Gallery


2

Treat the floor plan as a geographical area. OpenLayers or Leaflet don't care whether the stuff they are displaying is indoor or outdoor - as long as you can define a coordinate system, it will be fine.


1

SOLVED So here's what I did, and it finally works. yay First, I created a sld file and saved it to the some folder in PHP: $sld = "sld_here.."; $temp_link = sys_get_temp_dir()."/"; $tmpfname = tempnam($temp_link, $map_name); file_put_contents($tmpfname, $sld); echo $tmpfname; Then the file url is passed to JS using AJAX and set it to the layer using ...


1

This will give you a 5 mile geodesic circle around a predefined point. <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <title></title> <link rel="stylesheet" ...


1

Use your point as the basis for a circle geometry. The create circles sample shows how to use that class.


1

From the ArcGIS website: it looks like your simplest bet is the buffer tool you should be able to draw a buffer circle with the examples containing the buffer_analysis() command located on the page link above. There was also some discussion earlier about creating a simplified circle polygon instead of the buffer tool you might be intereseted in checking ...


1

the first stop to all things help related is ArcGIS.com. But also the developer site is where you will find what you need. You will have to create a template for your feature layer and handle the security but otherwise this sample should be what you want. Edit without widget and here is the code page


1

map.setCenter is useful, as it moves the map to the location as well as to a specified zoom level. My code function geolocate() { navigator.geolocation.getCurrentPosition(function (position) { var lonLat = new OpenLayers.LonLat(position.coords.longitude, position.coords.latitude) .transform( new ...


1

As it stands I think your "question" is too broad to be answered in the Q&A format of GIS Stack Exchange. However, your main question seems to be how to get started with HTML5 and the ArcGIS API for JavaScript and for that there are samples that you can peruse. If you are looking for answers on whether your architectural options are appropriate I ...


1

As @Sunil notes: for the tiles part, see the Tiles in local storage developer sample and for the feature layers see Local storage - experimental. Each sample is complete, in the sense that they're working demos, you'll still need to modify to suit your local circumstances.



Only top voted, non community-wiki answers of a minimum length are eligible