Ver Mensaje Individual
  #3 (permalink)  
Antiguo 14/07/2017, 10:22
Montes28
 
Fecha de Ingreso: septiembre-2010
Mensajes: 1.853
Antigüedad: 13 años, 7 meses
Puntos: 6
Respuesta: como asignar a variable un geojson remoto

Alexis88 tengo el geojson
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "layer": "Pluvi\u00f3metro", "geometry": { "type": "Point", "coordinates": [ -77.3385, 1.22767 ] }, "properties": { "nombre": "Pluvi\u00f3metro Mirador", "area": "Geoquimica", "metodologia": "Pluvi\u00f3metro", "icon": "http:\/\/192.168.102.33\/estacionesN\/img\/Pluviometro.png", "amenity": "bar" } }, { "type": "Feature", "layer": "Pluvi\u00f3metro", "geometry": { "type": "Point", "coordinates": [ -77.32183, 1.22183 ] }, .....................


le puedo hacer esto colocar el string var freeBus = { desde php
var freeBus = { "type": "FeatureCollection", "features": [ { "type": "Feature", "layer": "Pluvi\u00f3metro", "geometry": { "type": "Point", "coordinates": [ -77.3385, 1.22767 ] }, "properties": { "nombre": "Pluvi\u00f3metro Mirador", "area": "Geoquimica", "metodologia": "Pluvi\u00f3metro", "icon": "http:\/\/192.168.102.33\/estacionesN\/img\/Pluviometro.png", "amenity": "bar" } }, { "type": "Feature", "layer": "Pluvi\u00f3metro", "geometry": { "type": "Point", "coordinates": [ -77.32183, 1.22183 ] }, .....................


mira este ejemplo http://leafletjs.com/examples/geojson/example.html