GoMap Plugin Json Problem
Hello everyone
I'm using goMap plugin.I wanna retrieve data from my json file but when I'm trying I can't see map or anything. I read
this topic but it doesn't work and i can't find my problem.
I'm sending my jSon file and script
Thanks in advance i really appreciate all the help
My Json File
- {
- "MyMarkers": [
- {
- "latitude" : "40.739228",
- "longitude" : "30.097307",
- "group" : "airport",
- "icon" : "images/marker-airport.png"
- },
- {
- "latitude" : "40.763301",
- "longitude" : "29.927779",
- "group" : "restaurant",
- "icon" : "images/marker-restaurant.png"
- }
- ]
- }
Original Script
- jQuery('#map').goMap({
- maptype: 'ROADMAP',
- latitude: 40.771942,
- longitude: 29.949655,
- zoom: 11,
- scaleControl: true,
- scrollwheel: false,
- markers: [
- {latitude: 40.739228, longitude: 30.097307, group: 'airport', icon: 'images/marker-airport.png', html: {
- content: 'Kocaeli Cengiz Topel Havalimanı<br />D-100 Karayolu üzeri 13 Km Kartepe/Kocaeli<br>+90 262 375 2222'
- }},
- {latitude: 40.763301, longitude: 29.927779, group: 'restaurant', icon: 'images/marker-restaurant.png', html: {
- content: 'Cafe De La Rue<br />Cumhuriyet Caddesi No : 186 İzmit/Kocaeli<br>+90262 325 36 36'
- }},
- {latitude: 40.762699, longitude: 29.927334, group: 'shop', icon: 'images/marker-shop.png', html: {
- content: 'Migros<br />Körfez Mah. Sanayi Cad İzmit/Kocaeli'
- }},
- {latitude: 40.762802, longitude: 29.924976, group: 'entertainment', icon: 'images/marker-entertainment.png', html: {
- content: 'Doping Cafe<br />Tepecik Mh. 41200 İzmit/Kocaeli'
- }},
- ]
- });
Edited Script
- $.getJSON('marker/marker.json, function(myMarkers){
$("#map").goMap({
markers: myMarkers
});
});