Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jquery]

A free and open source JavaScript library that is used by Web developers to navigate HTML documents, handle events, perform animations and add Ajax interactions to Web pages.

0
votes
1answer
70 views

turf.js point never found inside or within GeoJSON features loop

I have a GeoJSON http://radikal.com.mx/distrito.json and all I am trying to do is find if a turf point that has a longitude and latitude is inside or within that GeoJSON. No matter what point I use I ...
0
votes
1answer
72 views

Leaflet map with jQuery autocomplete: fitBounds (click input) on selection?

I'm trying to fire a click event on my search button and/or the input field as soon as a user selects something from the jQuery autocomplete <li>: https://jsfiddle.net/grh2dLyw/1/ I'm not sure ...
1
vote
1answer
113 views

Showing all features by real-time API with Leaflet Map

I want to show all URL parameters or features onto a map. I have made the variable with ajax query as well as inside the loop data is printing with variable but I want to show this data with map into ...
0
votes
0answers
20 views

OpenLayers 2 - Swap lines on deeper zoom for view port

Having two linestrings, one with overview path, which uses less points and draws incomplete line - Overview path. And then a detailed one where it loads a lot of points for correct route simulation. ...
0
votes
0answers
443 views

Dynamically created content in Leaflet popup using jQuery

I am trying to make a dynamically created dropdown list to submit user content from a Leaflet popup (each popup contains a different list based on condition). However, I somehow don't manage to clear ...
0
votes
1answer
118 views

Difficulty rendering a multipolygon from a GeoJSON using JQuery

I'm pulling polygon data (neighborhood boundaries in San Francisco) from an API on https://data.sfgov.org/Geographic-Locations-and-Boundaries/SF-Find-Neighborhoods/pty2-tcw4/data. While I made sure on ...
2
votes
2answers
156 views

Joining CSV to KML/GeoJSON in Leaflet webmap and showing joined data in popups?

I'm trying to create a Leaflet/Mapbox webmap with line layer (GeoJSON or KML) with some IDs and data coming from the .csv (after joining through this ID) file located on the same path as the index....
0
votes
1answer
226 views

input data coordinates to database from input data inside leaflet js

i have a problem with my update data coordinates form leaflet popup. i just want to make edit form inside leaflet popup. if i click marker in a map it shown coordinate with input form, if the building ...
1
vote
0answers
600 views

Response not working in AJAX/PHP

I am working on Google Maps API, where I have made a dynamic marker popup. Now I want to take the user information from the popup and save it to my MySQL database without reloading the page. So I am ...
1
vote
2answers
2k views

Filter GeoJSON by attribute in Leaflet using a button

I have a GeoJSON point layer group styled as a circle marker; it has a color attribute which can be one of many values: white, black, blue, red etc. I want to create a filter based on that attribute, ...
0
votes
2answers
1k views

Mapbox + JavaScript (Remove layer)

The attached script was created for the geojson file I created that works properly. <script> $(document).ready(function() { $(pz).click(function() { L.mapbox.featureLayer('...
1
vote
2answers
210 views

How to reference jQuery in Javascript API 3.23

I'd like to hookup jQuery in my application to use along side with Dojo just to be able to use animations and a few other styling type of things on my map layout, but am unsure of what the best ...
0
votes
0answers
54 views

MetaInfo element from jQuery vectorMap (for conversion to GeoJSON)

I've tried Phrogz' svg2geojson script (see previous question) to convert the jQuery SVG map eia930map.js from EIA Realtime Grid to GeoJSON. But I'm struggling with the required MetaInfo element. The ...
1
vote
0answers
77 views

Getting coordinates falling inside two known points using javascript

I'm working on a solution, where a parent track the vehicle in which his kids are travelling. Initially I will be getting all the geo fence data from the system (Like stopings) and store it in an ...
0
votes
1answer
450 views

Reference to layergroup object in Leaflet?

I want to build my custom layers control with JQuery. My JS is like: $(document).ready(function() { var map = L.map('map', { center: [39.73, -104.99], ...
0
votes
1answer
346 views

Get value from an input select with getBounds

I have an input select (or select box, whatever), with some values, examples: 72, 73, 74... Where each value is an area on a map. I need that value for each option selected, so as to zoom in on the ...
1
vote
0answers
281 views

Create button to cycle through different markers in a GeoJSON file on click

I am trying to create an interactive Leaflet map of a hiking trail. Along this trail, I have a number of 'waypoints', represented as markers in a GeoJSON file: var waypoints = [ { "Name": "Cabane ...
0
votes
1answer
153 views

Access ArcGIS Server Rest Service with jQuery

I am trying to use jQuery to access an ArcGIS Server rest service. I keep getting: Request header field X-Requested-With is not allowed by Access-Control-Allow-Headers in preflight response ESRI ...
1
vote
1answer
259 views

Change path to folder storing icons for Leaflet Layer

I have a Leaflet point layer that uses icons. I have a different folder for individual time steps, and I would like to use a jquery ui slider to change between them. Changing the slider should ...
1
vote
0answers
3k views

How I do rotate a map using Leaflet?

How rotate map using the leaflet? I was trying here, but nothing worked. I followed this tutorial, even though it was from the mapbox, I assumed it was useful: https://www.mapbox.com/mapbox-gl-js/...
1
vote
0answers
96 views

Center the map for printing [closed]

How to solve the problem I show in both images. I have a centered map where I want, when I click to print I would like it to print almost from the screen and reproduce the same position in the print. ...
1
vote
1answer
281 views

Zoom after search using autocomplete [closed]

How to do after a search, zoom in on the value found on the map? My code is: $("#txtSearch").autocomplete({ source: setoresComerciais.features.map(function(d){ return d.properties....
0
votes
1answer
318 views

Leaflet GeoJSON with Jquery UI autocomplete

How do a autocomplete when I search for something? I have this: <form> <div class="col-sm-11"> <input type="text" name="busca" id="txtSearch" class="form-control" ...
1
vote
1answer
955 views

Switching leaflet image overlay layers shows white blinks

I am switching between image overlay layers upon user entry (through a slider). Every time users get into this loop, a fast blink (with white background) is displaying, meaning that the old layer is ...
1
vote
1answer
786 views

Dynamically create leaflet popup via JavaScript Object

I want to dynamically populate a marker popup via a JavaScript object. I have a JavaScript object like so: {address: "92101 S Martin Ave.", address2: "", agent_name: "mr smith", animal: "sheep", ...
2
votes
0answers
201 views

dynamic zoom linked to a drop-down menu

I would like to get a dynamic zoom linked to a drop-down menu. For example I have a list connected to my database with all the regions and I would like that when the user choose a region that a zoom ...
1
vote
0answers
614 views

ajax $.post not working in bootstrap framework application using leaflet 1.20

I have a web application using Bootstrap and leaflet. My jquery ajax call does not work. <!-- jQuery --> <script src="js/jquery.js"></script> <link rel="stylesheet" href="...
-1
votes
1answer
198 views

how cartodb.createLayer function works

i am using cartodb.createLayer() function to prepare my web application. I have tried to pass vizjson url and metadata method both to get my layers from my carto account which has total of 8 layers in ...
0
votes
1answer
1k views

How to convert JavaScript array into geoJSON data?

I want to upload txt, xls and csv files into leaflet. Firstly I am trying it for txt files. Js reads my txt as a js array. Now that I want to convert my js array into geoJSON. But I am confused here. ...
1
vote
0answers
63 views

How to use the points which come from the leaflet file layer plugin?

I am using leaflet file layer plugin.I have added a kml file which includes some points. I want to do sth by using these points. But I don't know if the plugin saves this data or not. How can I use ...
2
votes
1answer
197 views

Leaflet popup not pointed to marker when collapse

In my application I am using leaflet popup to display more details regarding the marker (Vehicle). User should be able to collapse and expand the popup. Fist user click on the marker it will display ...
3
votes
2answers
460 views

Zoom on Linestring object in Leaflet

I'm using Leaflet and trying zooming on a LineString object from a geojson file. Here is an extract of my file (with a lot of LineString objects): { "type": "FeatureCollection", "features": [ ...
0
votes
1answer
641 views

OpenLayers 4 set map target with jQuery

I have a div element <div id="map" class="map"></div> And I have a map var map = new ol.Map({ layers: [map_layer], target: 'map', view: Map_1_view }); I try this to set ...
1
vote
0answers
159 views

how can I bind layers from database or add new layer(s) to existing layer?

First of all, I have to say that I'm new to the OpenLayers. I was used OpenLayers 4 in this project. We have a map with group layers that can visible or invisible any of them. var map = new ol.Map({ ...
3
votes
2answers
478 views

How to extract GeoJSON vector layer coordinates from DOM, Openlayers 3

I created a GeoJSON vector layer using OpenLayers 3 API, the vector layer is a county map. My goal is by clicking, I will be able to select the county and extract the coordinates. (like shown below) ...
2
votes
0answers
417 views

Multiple tables from PostGIS to Leaflet with PHP and jQuery

I recently found this example: https://northlandia.wordpress.com/2015/04/20/connecting-postgis-to-leaflet-using-php/comment-page-1/#comment-627 It is very helpful and it works fine for one PostGIS ...
0
votes
1answer
237 views

multipolygon: switch coordinate arrays with javascript/jquery [closed]

I have a geojson with multiple arrays, such as: [[10.77932197941255,52.03584196145097],[10.77932197941255,52.03575906909681],[10.779636389761993,52.03575906909681],[10.779636389761993,52....
3
votes
1answer
3k views

dynamic content in leaflet popup window

I can add static html code to a Leaflet popup window but can not load a Dygraph chart into a popup window. How does one load dynamic content into a Leaflet popup window? Here is a simple jsfiddle with ...
1
vote
0answers
174 views

Search data outside of nested geoJSON in API response from Leaflet Search or Leaflet Fuse

I have this JSON from this API (see : http://staging-lrsm.anagraph.io/wp-json/wp/v2/story) [![API RESPONSE][1]][1] Then I use the below code to access the GeoJSON by jQuery: var map = L.map('...
1
vote
3answers
617 views

Leaflet Sidebar - How to get data based on the GeoJSON you clicked?

I am having trouble getting my GeoJSON data to appear on my sidebar when I click on a marker? As right now, I am able to click on a marker and make the sidebar appear, but without any information. ...
1
vote
0answers
293 views

OL3 how as when hovering over a list item, change the style fetures?

Why not work setStyle to feature? I try: jQuery(document).ready(function($) { $('#tsthov').hover(function(){ var fetbid = mySource8.getFeatureById("41"); console.log(fetbid.getStyle()); ...
2
votes
1answer
315 views

Leaflet GeoJSON and JQuery Autocomplete issue

I am using jquery autocomplete to search polygons. the JQuery UI uses an array as a data source. I created 4 arrays, the first 3 for each of the three GeoJSON layers. They load okay. Then I concat ...
0
votes
0answers
134 views

Openlayers 3 - Geoserver jQuery clipping layers

I have 3 layers, a base map, roads and a raster image with colors. The roads and raster are taken from geoserver. What I'm trying to do, is to paint the roads with the raster color but when I do it, ...
1
vote
0answers
297 views

Polygon not drawn in OpenLayers 3?

I am trying to get some polygon features drawn on my map. point features are working fine. even the coordinates of my polygon are correct, i draw them as point features on my map to check that. i am ...
1
vote
1answer
192 views

Using Get function jQuery calling Carto data on Leaflet?

I have problems with a get call for populate an empty geoJson. My purpose is the following: I want to create a geometry. (Working) Write into carto database. (Working) Get the recent geometry and ...
3
votes
2answers
139 views

How does the IdentifyTask handle proxy/cross-origin issues?

Background: I'm trying to perform an Identify against an ArcGIS Server layer, without using the ArcGIS Server JS API, and am running into issues which don't occur when using the ArcGIS Server JS API. ...
1
vote
1answer
3k views

Removing layer and redrawing it again in Leaflet?

I have a geoJSON polygon in my map and I want to update its color after changing the values by getting a JSON value. So I wrote the below code which changes the property value successfully. var ...
0
votes
2answers
800 views

Updating color of GeoJSON polygon when property is updated?

I have a geoJSON polygon in my map and I want to update its color after changing the values by getting a JSON value. So I wrote the below code which changes the property value successfully. var ...
1
vote
1answer
132 views

Display custom fields/content in popup for existing ArcGIS Map API Service

I'm using the ArcGIS Map API "Historic_National_Boundaries_NEW (FeatureServer) > Year_2000" present over here : API Link It has two pre-defined fields 'OBJECTID' and 'NAME_2' (for each country) ...
1
vote
1answer
564 views

How to hide other features that are not currently selected in leaflet?

If I load a JSON file I essentially get to do functions for each feature : var highlight = { 'color': '#149c14', 'weight': 4, 'opacity': 1 }; ` $.getJSON("/data/geojson/...