Ajax call for popup

27 views
Skip to first unread message

Chuck Asher

unread,
Mar 9, 2017, 7:44:46 PM3/9/17
to Leaflet
I am either just too dumb or too new to Leaflet to figure this out; probably more of both though. I have created a map and have the points populated with about 1600 VA locations. When I populate the the info for a popup, the map takes forever to load and it's loading a lot of info, VISN, facility name, Address, mailing address and possible up to two phone numbers per location. I can't get it too load the popups and this may be because i am using div tags to format the data. But back to the load time issue, Is there some way to implement an ajax call to pull the data when a user clicks on a point? Also, do any of you have an example of using div tags in the popup?

Example:)

VISN:                 6
Facility:              VA Chief Business Office Purchased Care (CBOPC) - VA Health Administration Center
Address:             3773 Cherry Creek North Drive
                          Denver, CO 80209

Mailing Address:  810 Vermont Ave NW (00CFM)
                          Washington, DC  20420

Contact:
Primary Phone:    303-331-7500
Alt Phone:           303-331-7508

Chuck Asher

unread,
Mar 9, 2017, 7:46:23 PM3/9/17
to Leaflet
Forgot to add, I do not have a link to share as it is located on my local machine and has not been published to the internet yet

Arnie Shore

unread,
Mar 9, 2017, 9:12:38 PM3/9/17
to leafl...@googlegroups.com
Chuck, I use a Leaflet click handler that's invoked by an icon click.  That click handler performs an ajax call using the record id as the data retrieval argument.  I use the returned string - a table, in my usage - to populate a marker..openPopup() call.

FWIW, I use VA's services, so I can relate to your application.

--

---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages