Use database values to center map (php/MYSQL)

474
0
12-22-2020 09:31 AM
SteveCheshire
New Contributor II

Hello
Could anyone tell me how I would replace the longitude/latitude data which centers the map i.e.

var view = new MapView({
container: "viewDiv",
map: map,
center: [19.874268,39.576056], // longitude, latitude
zoom: 10
});

with MYSQL data from a database using .php e.g.

var view = new MapView({
container: "viewDiv",
map: map,
center: [<?= $rLongitude ?>,<?= $rLatitude ?>], // longitude, latitude
zoom: 10
});

I'm an absolute ArcGIS beginner so any help much appreciated.
Steve

0 Kudos
0 Replies